summaryrefslogtreecommitdiff
path: root/lib/tftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-06-10 23:39:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-06-10 23:40:35 +0200
commit6cd084a3b5129d9ab8db3e5bc0f094943d7eef89 (patch)
tree26d32ff78ce1a9897cee17b50196e7c401959be7 /lib/tftp.c
parent72c7c1d64e101675520387c0d758b63f71d4c48a (diff)
downloadcurl-6cd084a3b5129d9ab8db3e5bc0f094943d7eef89.tar.gz
Curl_pgrsDone: return int and acknowledge return code
Since Curl_pgrsDone() itself calls Curl_pgrsUpdate() which may return an abort instruction or similar we need to return that info back and subsequently properly handle return codes from Curl_pgrsDone() where used. (Spotted by a Coverity scan)
Diffstat (limited to 'lib/tftp.c')
-rw-r--r--lib/tftp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tftp.c b/lib/tftp.c
index 85404de8b..7202b94d3 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -1036,7 +1036,8 @@ static CURLcode tftp_done(struct connectdata *conn, CURLcode status,
(void)status; /* unused */
(void)premature; /* not used */
- Curl_pgrsDone(conn);
+ if(Curl_pgrsDone(conn))
+ return CURLE_ABORTED_BY_CALLBACK;
/* If we have encountered an error */
code = tftp_translate_code(state->error);