- Added test case 1007 to test permission problem when uploading with TFTP
(to validate bug #1790403).
+- TFTP now reports the "not defined" TFTP error code 0 as an error,
+ not success.
+
Daniel S (5 September 2007)
- Continued the work on a fix for #1779054
(http://curl.haxx.se/bug/view.cgi?id=1779054). My previous fix from August
TFTP_ERR_UNKNOWNID,
TFTP_ERR_EXISTS,
TFTP_ERR_NOSUCHUSER, /* This will never be triggered by this code */
+
+ /* The remaining error codes are internal to curl */
+ TFTP_ERR_NONE = -100,
TFTP_ERR_TIMEOUT,
TFTP_ERR_NORESPONSE
} tftp_error_t;
state->conn = conn;
state->sockfd = state->conn->sock[FIRSTSOCKET];
state->state = TFTP_STATE_START;
+ state->error = TFTP_ERR_NONE;
((struct sockaddr *)&state->local_addr)->sa_family =
(unsigned short)(conn->ip_addr->ai_family);
return code;
/* If we have encountered an error */
- if(state->error) {
+ if(state->error != TFTP_ERR_NONE) {
/* Translate internal error codes to curl error codes */
switch(state->error) {
case TFTP_ERR_DISKFULL:
code = CURLE_REMOTE_DISK_FULL;
break;
+ case TFTP_ERR_UNDEF:
case TFTP_ERR_ILLEGAL:
code = CURLE_TFTP_ILLEGAL;
break;