Skip to content

Commit 934d5cb

Browse files
author
Andreas Karlsson
committed
Allow FoE write of 0byte file
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
1 parent c5db274 commit 934d5cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soem/ethercatfoe.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ int ecx_FOEwrite(ecx_contextt *context, uint16 slave, char *filename, uint32 pas
214214
ec_clearmbx(&MbxOut);
215215
aFOEp = (ec_FOEt *)&MbxIn;
216216
FOEp = (ec_FOEt *)&MbxOut;
217-
dofinalzero = FALSE;
217+
dofinalzero = TRUE;
218218
fnsize = (uint16)strlen(filename);
219219
maxdata = context->slavelist[slave].mbx_l - 12;
220220
if (fnsize > maxdata)

0 commit comments

Comments
 (0)