diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-12-03 10:25:31 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-12-03 10:25:31 +0000 |
commit | d0b97f7e1fc0460080883155ab6ce65e27f59c6d (patch) | |
tree | d7a2281c530a097290eec1d948e9c189545fe058 /lib/security.c | |
parent | 199a0311e2b0eff5366f2ed4545278c115c5f9da (diff) |
Curl_GetFTPResponse() takes a different set of parameters and now return a
proper CURLcode. The default timeout for reading one response is now also
possible to change while running.
Diffstat (limited to 'lib/security.c')
-rw-r--r-- | lib/security.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/security.c b/lib/security.c index 06dec3258..653772ab3 100644 --- a/lib/security.c +++ b/lib/security.c @@ -414,14 +414,14 @@ sec_prot_internal(struct connectdata *conn, int level) } if(level){ + int code; if(Curl_ftpsendf(conn, "PBSZ %u", s)) return -1; - nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL); - if(nread < 0) + if(Curl_GetFTPResponse(&nread, conn, &code)) return -1; - if(conn->data->state.buffer[0] != '2'){ + if(code/100 != '2'){ failf(conn->data, "Failed to set protection buffer size."); return -1; } @@ -437,8 +437,7 @@ sec_prot_internal(struct connectdata *conn, int level) if(Curl_ftpsendf(conn, "PROT %c", level["CSEP"])) return -1; - nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL); - if(nread < 0) + if(Curl_GetFTPResponse(&nread, conn, NULL)) return -1; if(conn->data->state.buffer[0] != '2'){ @@ -496,8 +495,7 @@ Curl_sec_login(struct connectdata *conn) if(Curl_ftpsendf(conn, "AUTH %s", (*m)->name)) return -1; - nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, &ftpcode); - if(nread < 0) + if(Curl_GetFTPResponse(&nread, conn, &ftpcode)) return -1; if(conn->data->state.buffer[0] != '3'){ |