summaryrefslogtreecommitdiff
path: root/apps/netutils/tftpc/tftpc_put.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/netutils/tftpc/tftpc_put.c')
-rw-r--r--apps/netutils/tftpc/tftpc_put.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/netutils/tftpc/tftpc_put.c b/apps/netutils/tftpc/tftpc_put.c
index c292244a6..b36599718 100644
--- a/apps/netutils/tftpc/tftpc_put.c
+++ b/apps/netutils/tftpc/tftpc_put.c
@@ -217,9 +217,17 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server,
{
/* Failed to receive a good packet */
- if (nbytes >= 0)
+ if (nbytes == 0)
{
- ndbg("tftp_recvfrom short packet: %d bytes\n", nbytes);
+ ndbg("Connection lost: %d bytes\n", nbytes);
+ }
+ else if (nbytes > 0)
+ {
+ ndbg("Short packet: %d bytes\n", nbytes);
+ }
+ else
+ {
+ ndbg("Recveid failure\n");
}
/* Break out to bump up the retry count */