Преглед на файлове

[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 години
родител
ревизия
0579ddc834
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2
    2
      src/net/udp/tftp.c

+ 2
- 2
src/net/udp/tftp.c Целия файл

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

Loading…
Отказ
Запис