CVS commit by ossi: handle socket() failure and correctly report gethostbyname() failure.
M +5 -1 drv_imap.c 1.24 --- isync/src/drv_imap.c #1.23:1.24 @@ -1266,5 +1266,5 @@ imap_open_store( store_conf_t *conf ) he = gethostbyname( srvc->host ); if (!he) { - perror( "gethostbyname" ); + error( "IMAP error: Cannot resolve server '%s'\n", srvc->host ); goto bail; } @@ -1274,4 +1274,8 @@ imap_open_store( store_conf_t *conf ) s = socket( PF_INET, SOCK_STREAM, 0 ); + if (s < 0) { + perror( "socket" ); + exit( 1 ); + } infon( "Connecting to %s:%hu... ", inet_ntoa( addr.sin_addr ), ntohs( addr.sin_port ) ); ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel