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:
nakarlsson 2023-12-06 19:54:05 +01:00 committed by GitHub
parent c5db2741ee
commit 1817b8b4fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ int ecx_FOEwrite(ecx_contextt *context, uint16 slave, char *filename, uint32 pas
ec_clearmbx(&MbxOut);
aFOEp = (ec_FOEt *)&MbxIn;
FOEp = (ec_FOEt *)&MbxOut;
dofinalzero = FALSE;
dofinalzero = TRUE;
fnsize = (uint16)strlen(filename);
maxdata = context->slavelist[slave].mbx_l - 12;
if (fnsize > maxdata)