Changeset 6cac643 for protocols/jabber
- Timestamp:
- 2008-04-14T12:59:15Z (17 years ago)
- Branches:
- master
- Children:
- b79308b
- Parents:
- 2625d6d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/s5bytestream.c
r2625d6d r6cac643 353 353 struct bs_transfer *bt = data; 354 354 short revents; 355 int gret; 355 356 356 357 if ( ( fd != 0 ) && !jabber_bs_poll( bt, fd, &revents ) ) … … 366 367 hints.ai_socktype = SOCK_STREAM; 367 368 368 if ( getaddrinfo( bt->sh->host, bt->sh->port, &hints, &rp) != 0 )369 return jabber_bs_abort( bt, "getaddrinfo() failed: %s", strerror( errno) );369 if ( ( gret = getaddrinfo( bt->sh->host, bt->sh->port, &hints, &rp ) ) != 0 ) 370 return jabber_bs_abort( bt, "getaddrinfo() failed: %s", gai_strerror( gret ) ); 370 371 371 372 ASSERTSOCKOP( bt->tf->fd = fd = socket( rp->ai_family, rp->ai_socktype, 0 ), "Opening socket" ); … … 923 924 { 924 925 struct jabber_transfer *tf = bt->tf; 925 int fd ;926 int fd,gret; 926 927 char hostname[ HOST_NAME_MAX + 1 ]; 927 928 struct addrinfo hints, *rp; … … 936 937 hints.ai_flags = AI_NUMERICSERV; 937 938 938 if ( getaddrinfo( hostname, "0", &hints, &rp) != 0 )939 return jabber_bs_abort( bt, "getaddrinfo() ");939 if ( ( gret = getaddrinfo( hostname, "0", &hints, &rp ) ) != 0 ) 940 return jabber_bs_abort( bt, "getaddrinfo() failed: %s", gai_strerror( gret ) ); 940 941 941 942 memcpy( saddr, rp->ai_addr, rp->ai_addrlen );
Note: See TracChangeset
for help on using the changeset viewer.