diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-10-03 08:58:40 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-10-03 08:58:40 +0000 |
commit | 4bf28cb904212e37a31403a21c3d9db1f921367d (patch) | |
tree | a15715231d2814b0136e7b36c8535588328ff186 /lib | |
parent | 1abde9009a1451308557792d7e467eed5bd0534e (diff) |
exported symbols must use lowercase "curl_", and I also fixed two compiler
warnings, one C99 thing and the bad pointer sent to the callback
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connect.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/connect.c b/lib/connect.c index b0615661f..d386a1bc5 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -682,10 +682,11 @@ singleipconnect(struct connectdata *conn, * for a largest possible struct sockaddr only. We should add some space for * the other fields we are using. Hence the addr_storage size math. */ - char addr_storage[sizeof(struct Curl_sockaddr)- + char addr_storage[sizeof(struct curl_sockaddr)- sizeof(struct sockaddr)+ sizeof(struct Curl_sockaddr_storage)]; - struct Curl_sockaddr* addr=(struct Curl_sockaddr*)&addr_storage; + struct curl_sockaddr *addr=(struct curl_sockaddr*)&addr_storage; + const void *iptoprint; addr->family=ai->ai_family; addr->socktype=conn->socktype; @@ -697,7 +698,7 @@ singleipconnect(struct connectdata *conn, /* optionally use callback to get the socket */ sockfd = (data->set.fopensocket)? data->set.fopensocket(data->set.opensocket_client, CURLSOCKTYPE_IPCXN, - &addr): + addr): socket(addr->family, addr->socktype, addr->protocol); if (sockfd == CURL_SOCKET_BAD) return CURL_SOCKET_BAD; @@ -706,7 +707,7 @@ singleipconnect(struct connectdata *conn, /* FIXME: do we have Curl_printable_address-like with struct sockaddr* as argument? */ - const void *iptoprint = &((const struct sockaddr_in*)(&addr->addr))->sin_addr; + iptoprint = &((const struct sockaddr_in*)(&addr->addr))->sin_addr; #ifdef ENABLE_IPV6 if(addr->family==AF_INET6) iptoprint= &((const struct sockaddr_in6*)(&addr->addr))->sin6_addr; |