[syslinux:master] libupload: Fixing tftp return value

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Apr 25 15:29:20 PDT 2011


Commit-ID:  079618ded3af27e3d428cb387289ef6f666ccf38
Gitweb:     http://syslinux.zytor.com/commit/079618ded3af27e3d428cb387289ef6f666ccf38
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Wed, 20 Apr 2011 20:12:24 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Wed, 20 Apr 2011 20:12:24 +0200

libupload: Fixing tftp return value

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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/com32/libupload/upload_tftp.c b/com32/libupload/upload_tftp.c
index 8c65c9b..5e73c1c 100644
--- a/com32/libupload/upload_tftp.c
+++ b/com32/libupload/upload_tftp.c
@@ -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 = {



More information about the Syslinux-commits mailing list