Skip to content

Commit

Permalink
Allow FoE write of 0byte file (#769)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nakarlsson and Andreas Karlsson authored Dec 6, 2023
1 parent c5db274 commit 1817b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soem/ethercatfoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1817b8b

Please sign in to comment.