소스 검색

[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 15 년 전
부모
커밋
0579ddc834
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      src/net/udp/tftp.c

+ 2
- 2
src/net/udp/tftp.c 파일 보기

@@ -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…
취소
저장