Merge pull request #3 from hefloryd/master

Handle final empty packet
pull/6/head
Hans-Erik Floryd 2014-10-28 16:20:27 +01:00
commit 0dd9da434c
1 changed files with 6 additions and 0 deletions

View File

@ -493,6 +493,12 @@ void FOE_data ()
DPRINT("FOE_data packet error,packet: %d foeheaader.packet: %d\n",packet,FOEvar.foepacket);
FOE_abort (FOE_ERR_PACKETNO);
}
else if (data_len == 0)
{
DPRINT("FOE_data completed\n");
res = FOE_send_ack ();
FOE_init ();
}
else if (FOEvar.fposition + data_len > FOEvar.fend)
{
DPRINT("FOE_data disk full\n");