Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
7350f985
Commit
7350f985
authored
17 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
TFTP now reports the "not defined" TFTP error code 0 as an error,
not success.
parent
d030dfa6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES
+3
-0
3 additions, 0 deletions
CHANGES
lib/tftp.c
+6
-1
6 additions, 1 deletion
lib/tftp.c
with
9 additions
and
1 deletion
CHANGES
+
3
−
0
View file @
7350f985
...
...
@@ -10,6 +10,9 @@ Dan F (5 September 2007)
- 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
...
...
This diff is collapsed.
Click to expand it.
lib/tftp.c
+
6
−
1
View file @
7350f985
...
...
@@ -115,6 +115,9 @@ typedef enum {
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
;
...
...
@@ -588,6 +591,7 @@ CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
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
);
...
...
@@ -790,7 +794,7 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
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
)
{
...
...
@@ -803,6 +807,7 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
case
TFTP_ERR_DISKFULL
:
code
=
CURLE_REMOTE_DISK_FULL
;
break
;
case
TFTP_ERR_UNDEF
:
case
TFTP_ERR_ILLEGAL
:
code
=
CURLE_TFTP_ILLEGAL
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment