Allow FoE write of 0byte file (#769)
If FoE write of a file is done, no check of incoming size is performed. If the file is 0byte, a FoE Write Request is sent but no ACK since dofinalzero is initialized to FALSE. fixes #766 Co-authored-by: Andreas Karlsson <andreas.karlsson@rt-labs.com>
This commit is contained in:
parent
c5db2741ee
commit
1817b8b4fe
|
@ -214,7 +214,7 @@ int ecx_FOEwrite(ecx_contextt *context, uint16 slave, char *filename, uint32 pas
|
||||||
ec_clearmbx(&MbxOut);
|
ec_clearmbx(&MbxOut);
|
||||||
aFOEp = (ec_FOEt *)&MbxIn;
|
aFOEp = (ec_FOEt *)&MbxIn;
|
||||||
FOEp = (ec_FOEt *)&MbxOut;
|
FOEp = (ec_FOEt *)&MbxOut;
|
||||||
dofinalzero = FALSE;
|
dofinalzero = TRUE;
|
||||||
fnsize = (uint16)strlen(filename);
|
fnsize = (uint16)strlen(filename);
|
||||||
maxdata = context->slavelist[slave].mbx_l - 12;
|
maxdata = context->slavelist[slave].mbx_l - 12;
|
||||||
if (fnsize > maxdata)
|
if (fnsize > maxdata)
|
||||||
|
|
Loading…
Reference in New Issue