1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

check Curl_ftpsendf return codes

This commit is contained in:
Daniel Stenberg 2001-10-31 15:06:38 +00:00
parent 69d5d88259
commit 4118c68df1
2 changed files with 14 additions and 7 deletions

View File

@ -245,7 +245,8 @@ krb4_auth(void *app_data, struct connectdata *conn)
return AUTH_CONTINUE;
}
Curl_ftpsendf(conn, "ADAT %s", p);
if(Curl_ftpsendf(conn, "ADAT %s", p))
return -2;
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL);
if(nread < 0)
@ -312,7 +313,8 @@ void Curl_krb_kauth(struct connectdata *conn)
save = Curl_set_command_prot(conn, prot_private);
Curl_ftpsendf(conn, "SITE KAUTH %s", conn->data->state.user);
if(Curl_ftpsendf(conn, "SITE KAUTH %s", conn->data->state.user))
return;
nread = Curl_GetFTPResponse(conn->data->state.buffer,
conn, NULL);
@ -378,8 +380,8 @@ void Curl_krb_kauth(struct connectdata *conn)
}
memset (tktcopy.dat, 0, tktcopy.length);
Curl_ftpsendf(conn,
"SITE KAUTH %s %s", name, p);
if(Curl_ftpsendf(conn, "SITE KAUTH %s %s", name, p))
return;
nread = Curl_GetFTPResponse(conn->data->state.buffer,
conn, NULL);

View File

@ -413,7 +413,9 @@ sec_prot_internal(struct connectdata *conn, int level)
}
if(level){
Curl_ftpsendf(conn, "PBSZ %u", s);
if(Curl_ftpsendf(conn, "PBSZ %u", s))
return -1;
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL);
if(nread < 0)
return -1;
@ -431,7 +433,9 @@ sec_prot_internal(struct connectdata *conn, int level)
conn->buffer_size = s;
}
Curl_ftpsendf(conn, "PROT %c", level["CSEP"]);
if(Curl_ftpsendf(conn, "PROT %c", level["CSEP"]))
return -1;
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL);
if(nread < 0)
return -1;
@ -488,7 +492,8 @@ Curl_sec_login(struct connectdata *conn)
}
infof(data, "Trying %s...\n", (*m)->name);
Curl_ftpsendf(conn, "AUTH %s", (*m)->name);
if(Curl_ftpsendf(conn, "AUTH %s", (*m)->name))
return -1;
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, &ftpcode);
if(nread < 0)