Mercurial > hg
comparison mcabber/connwrap/connwrap.c @ 1266:3bd496b9a9f7
Fix proxy usage when SSL is disabled
Thanks to "Dr. Guildo" for the report.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 12 Aug 2007 16:19:52 +0200 |
parents | eb38963e082f |
children | 3067c096cfc4 |
comparison
equal
deleted
inserted
replaced
1265:18ef697e706d | 1266:3bd496b9a9f7 |
---|---|
496 | 496 |
497 return rc; | 497 return rc; |
498 } | 498 } |
499 #endif | 499 #endif |
500 if ( !(*state & CW_CONNECT_WANT_SOMETHING)) { | 500 if ( !(*state & CW_CONNECT_WANT_SOMETHING)) { |
501 rc = connect(sockfd, serv_addr, addrlen); | 501 rc = cw_connect(sockfd, serv_addr, addrlen, 0); |
502 } else { /* check if the socket is connected correctly */ | 502 } else { /* check if the socket is connected correctly */ |
503 int optlen = sizeof(int), optval; | 503 int optlen = sizeof(int), optval; |
504 if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, | 504 if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, |
505 (socklen_t*)&optlen) || optval) | 505 (socklen_t*)&optlen) || optval) |
506 return -1; | 506 return -1; |