Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
stefanha authored and Marty Connor committed Jan 18, 2010
1 parent c124f63 commit 0579ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/udp/tftp.c
Expand Up @@ -773,7 +773,7 @@ static int tftp_rx_oack ( struct tftp_request *tftp, void *buf, size_t len ) {
/* Abort request if only trying to determine file size */
if ( tftp->flags & TFTP_FL_SIZEONLY ) {
rc = 0;
tftp_send_error ( tftp, TFTP_ERR_UNKNOWN_TID, "TFTP Aborted" );
tftp_send_error ( tftp, 0, "TFTP Aborted" );
tftp_done ( tftp, rc );
return rc;
}
Expand Down Expand Up @@ -808,7 +808,7 @@ static int tftp_rx_data ( struct tftp_request *tftp,
if ( tftp->flags & TFTP_FL_SIZEONLY ) {
/* If we get here then server doesn't support SIZE option */
rc = -ENOTSUP;
tftp_send_error ( tftp, TFTP_ERR_UNKNOWN_TID, "TFTP Aborted" );
tftp_send_error ( tftp, 0, "TFTP Aborted" );
goto done;
}

Expand Down

0 comments on commit 0579ddc

Please sign in to comment.