aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 95fdf8119..4e7f4f8ea 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -702,6 +702,17 @@ singleipconnect(struct connectdata *conn,
nosigpipe(conn, sockfd);
+ if(data->set.fsockopt) {
+ /* activate callback for setting socket options */
+ error = data->set.fsockopt(data->set.sockopt_client,
+ sockfd,
+ CURLSOCKTYPE_IPCXN);
+ if (error) {
+ sclose(sockfd); /* close the socket and bail out */
+ return CURL_SOCKET_BAD;
+ }
+ }
+
/* possibly bind the local end to an IP, interface or port */
res = bindlocal(conn, sockfd);
if(res) {