From 61980e136ed59ad036d079bc166026f2329cfd73 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Wed, 17 Feb 2016 12:14:16 +0100 Subject: [PATCH] Ignore additional upload requests --- nmrp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nmrp.c b/nmrp.c index f06d959..81d9a9c 100644 --- a/nmrp.c +++ b/nmrp.c @@ -518,10 +518,11 @@ int nmrp_do(struct nmrpd_args *args) break; case NMRP_C_TFTP_UL_REQ: - if (++ulreqs > 5) { - fprintf(stderr, "Device re-requested file upload %d " - "times; aborting.\n", ulreqs); - tx.msg.code = NMRP_C_CLOSE_REQ; + if (++ulreqs > 1) { + if (verbosity) { + printf("Ignoring upload request %d.\n", ulreqs); + } + ethsock_set_timeout(sock, args->ul_timeout); break; } -- 2.25.1