[BusyBox-cvs] busybox/networking tftp.c,1.16,1.17

Glenn McGrath bug1 at busybox.net
Thu Dec 19 20:16:26 UTC 2002


Update of /var/cvs/busybox/networking
In directory winder:/tmp/cvs-serv3779/networking

Modified Files:
	tftp.c 
Log Message:
Bugfix, wastn retrieving last block, patch by Jean-Christophe Dubois


Index: tftp.c
===================================================================
RCS file: /var/cvs/busybox/networking/tftp.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- tftp.c	9 Dec 2002 21:52:29 -0000	1.16
+++ tftp.c	19 Dec 2002 20:16:22 -0000	1.17
@@ -279,8 +279,6 @@
 				}
 
 				cp += len;
-			} else if (finished) {
-				break;
 			}
 		}
 
@@ -306,8 +304,11 @@
 			}
 
 
-			/* receive packet */
+			if (finished) {
+				break;
+			}
 
+			/* receive packet */
 
 			memset(&from, 0, sizeof(from));
 			fromlen = sizeof(from);
@@ -359,7 +360,7 @@
 
 		} while (timeout && (len >= 0));
 
-		if (len < 0) {
+		if ((finished) || (len < 0)) {
 			break;
 		}
 




More information about the busybox-cvs mailing list