|
|
|
@ -2172,10 +2172,10 @@ int connection_initiate(conn_t *co, const char *host, int port,
|
|
|
|
|
#ifdef WIN32
|
|
|
|
|
host_ = gethostbyname(host);
|
|
|
|
|
#else
|
|
|
|
|
r=__resolvehost(host, buf, __TMPBUFLEN, &host_);
|
|
|
|
|
r = __resolvehost(host, buf, __TMPBUFLEN, &host_);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if(errno) {
|
|
|
|
|
if(r) {
|
|
|
|
|
r = ENOENT;
|
|
|
|
|
free(buf);
|
|
|
|
|
goto __fail_3;
|
|
|
|
@ -2191,7 +2191,7 @@ int connection_initiate(conn_t *co, const char *host, int port,
|
|
|
|
|
addr.sin_addr.s_addr = *(uint32_t*)(host_->h_addr);
|
|
|
|
|
r=connect(sd, (struct sockaddr*)&addr, sizeof(addr));
|
|
|
|
|
|
|
|
|
|
if ( r!= 0) {
|
|
|
|
|
if ( r != 0) {
|
|
|
|
|
printf("connect error %d %s \n",r, strerror(errno));
|
|
|
|
|
close(sd);
|
|
|
|
|
free(buf);
|
|
|
|
|