Skip to content

Commit

Permalink
Send keep-alive request to remote after successful upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Feb 17, 2016
1 parent b95bfc9 commit bc0901e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nmrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ int nmrp_do(struct nmrpd_args *args)
printf("Ignoring extra upload request.\n");
}
ethsock_set_timeout(sock, args->ul_timeout);
tx.msg.code = NMRP_C_KEEP_ALIVE_REQ;
break;
}

Expand Down Expand Up @@ -589,6 +590,7 @@ int nmrp_do(struct nmrpd_args *args)
printf("OK\nWaiting for remote to respond.\n");
upload_ok = 1;
ethsock_set_timeout(sock, args->ul_timeout);
tx.msg.code = NMRP_C_KEEP_ALIVE_REQ;
expect = NMRP_C_NONE;
} else if (status == -2) {
expect = NMRP_C_TFTP_UL_REQ;
Expand Down

0 comments on commit bc0901e

Please sign in to comment.