Skip to content
Snippets Groups Projects
Commit c2bfe600 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Curl_send/recv_plain: return errno on failure

When send() and recv() fail, we now store the errno value to allow the
app to access it.

Bug: http://curl.haxx.se/bug/view.cgi?id=3128121
Reported by: Yuri
parent 63598059
No related branches found
No related tags found
No related merge requests found
......@@ -301,6 +301,7 @@ ssize_t Curl_send_plain(struct connectdata *conn, int num,
} else {
failf(conn->data, "Send failure: %s",
Curl_strerror(conn, err));
conn->data->state.os_errno = err;
*code = CURLE_SEND_ERROR;
}
}
......@@ -355,6 +356,7 @@ ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
} else {
failf(conn->data, "Recv failure: %s",
Curl_strerror(conn, err));
conn->data->state.os_errno = err;
*code = CURLE_RECV_ERROR;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment