libupload: Fixing tftp return value
authorErwan Velu <erwanaliasr1@gmail.com>
Wed, 20 Apr 2011 18:12:24 +0000 (20:12 +0200)
committerErwan Velu <erwanaliasr1@gmail.com>
Wed, 20 Apr 2011 18:12:24 +0000 (20:12 +0200)
The default return value for the tftp mode.
This made the tftp to return error even if the upload was succesful.

com32/libupload/upload_tftp.c

index 8c65c9b..5e73c1c 100644 (file)
@@ -138,7 +138,7 @@ static int upload_tftp_write(struct upload_backend *be)
     struct tftp_state tftp;
     char buffer[512+4+6];
     int nlen;
-    int err=0;
+    int err=TFTP_OK;
     const union syslinux_derivative_info *sdi =
        syslinux_derivative_info();
     const char *data = be->outbuf;
@@ -193,7 +193,7 @@ static int upload_tftp_write(struct upload_backend *be)
            return err;
     } while (chunk == 512);
 
-    return 0;
+    return TFTP_OK;
 }
 
 struct upload_backend upload_tftp = {