Merge pull request #452 from OpenEtherCATsociety/AK-fix-SoE-mapping
Fix bug in ecx_readIDNmap(), Osize and Isizepull/454/head
commit
b01ceb9905
|
@ -329,7 +329,7 @@ int ecx_readIDNmap(ecx_contextt *context, uint16 slave, int *Osize, int *Isize)
|
||||||
if ((wkc > 0) && (psize >= 4) && ((entries = etohs(SoEmapping.currentlength) / 2) > 0) && (entries <= EC_SOE_MAXMAPPING))
|
if ((wkc > 0) && (psize >= 4) && ((entries = etohs(SoEmapping.currentlength) / 2) > 0) && (entries <= EC_SOE_MAXMAPPING))
|
||||||
{
|
{
|
||||||
/* command word (uint16) is always mapped but not in list */
|
/* command word (uint16) is always mapped but not in list */
|
||||||
*Osize = 16;
|
*Osize += 16;
|
||||||
for (itemcount = 0 ; itemcount < entries ; itemcount++)
|
for (itemcount = 0 ; itemcount < entries ; itemcount++)
|
||||||
{
|
{
|
||||||
psize = sizeof(SoEattribute);
|
psize = sizeof(SoEattribute);
|
||||||
|
@ -348,7 +348,7 @@ int ecx_readIDNmap(ecx_contextt *context, uint16 slave, int *Osize, int *Isize)
|
||||||
if ((wkc > 0) && (psize >= 4) && ((entries = etohs(SoEmapping.currentlength) / 2) > 0) && (entries <= EC_SOE_MAXMAPPING))
|
if ((wkc > 0) && (psize >= 4) && ((entries = etohs(SoEmapping.currentlength) / 2) > 0) && (entries <= EC_SOE_MAXMAPPING))
|
||||||
{
|
{
|
||||||
/* status word (uint16) is always mapped but not in list */
|
/* status word (uint16) is always mapped but not in list */
|
||||||
*Isize = 16;
|
*Isize += 16;
|
||||||
for (itemcount = 0 ; itemcount < entries ; itemcount++)
|
for (itemcount = 0 ; itemcount < entries ; itemcount++)
|
||||||
{
|
{
|
||||||
psize = sizeof(SoEattribute);
|
psize = sizeof(SoEattribute);
|
||||||
|
|
Loading…
Reference in New Issue