Browse Source

[tftp] Abort requests with error code 0

There is no defined error code for aborting a request but 0 is commonly
used.  This patch switches the abort request error code from
TFTP_ERR_UNKNOWN_TID (5) to 0.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v1.0.0-rc1
Stefan Hajnoczi 14 years ago
parent
commit
0579ddc834
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/net/udp/tftp.c

+ 2
- 2
src/net/udp/tftp.c View File

@@ -773,7 +773,7 @@ static int tftp_rx_oack ( struct tftp_request *tftp, void *buf, size_t len ) {
773 773
 	/* Abort request if only trying to determine file size */
774 774
 	if ( tftp->flags & TFTP_FL_SIZEONLY ) {
775 775
 		rc = 0;
776
-		tftp_send_error ( tftp, TFTP_ERR_UNKNOWN_TID, "TFTP Aborted" );
776
+		tftp_send_error ( tftp, 0, "TFTP Aborted" );
777 777
 		tftp_done ( tftp, rc );
778 778
 		return rc;
779 779
 	}
@@ -808,7 +808,7 @@ static int tftp_rx_data ( struct tftp_request *tftp,
808 808
 	if ( tftp->flags & TFTP_FL_SIZEONLY ) {
809 809
 		/* If we get here then server doesn't support SIZE option */
810 810
 		rc = -ENOTSUP;
811
-		tftp_send_error ( tftp, TFTP_ERR_UNKNOWN_TID, "TFTP Aborted" );
811
+		tftp_send_error ( tftp, 0, "TFTP Aborted" );
812 812
 		goto done;
813 813
 	}
814 814
 

Loading…
Cancel
Save