From: minima Date: Sat, 21 Sep 2002 14:05:00 +0000 (+0000) Subject: added a check that connect ip addresses resolve X-Git-Tag: R_1_50~1 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=403e6bac61ed5d509aeda5b49557481ac88bc08c;p=spider.git added a check that connect ip addresses resolve --- diff --git a/Changes b/Changes index 84c06d8a..9c0dfc99 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +21Sep02======================================================================= +1. make some detail changes for connects out in Msg.pm 17Sep02======================================================================= 1. Added shu command for Charlie's (K1XX) benefit (together with the rest of our butterfingered sysops) who miss the '/' out of sh/u frequently enough diff --git a/perl/Msg.pm b/perl/Msg.pm index ef43b0bc..cf15ff76 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -212,7 +212,10 @@ sub connect { blocking($sock, 0); $conn->{blocking} = 0; + # does the host resolve? my $ip = gethostbyname($to_host); + return undef unless $ip; + # my $r = $sock->connect($to_port, $ip); my $r = connect($sock, pack_sockaddr_in($to_port, $ip)); return undef unless $r || _err_will_block($!);