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

check that bind() returns success

This commit is contained in:
Daniel Stenberg 2005-09-04 18:33:20 +00:00
parent e55f502e2f
commit a3d776187a

View File

@ -537,6 +537,10 @@ CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
/* Bind to any interface, random UDP port */
rc = bind(state->sockfd, &state->local_addr, sizeof(state->local_addr));
if(rc) {
failf(conn->data, "failed to bind\n");
return CURLE_COULDNT_CONNECT;
}
Curl_pgrsStartNow(conn->data);