added a check that connect ip addresses resolve
authorminima <minima>
Sat, 21 Sep 2002 14:05:00 +0000 (14:05 +0000)
committerminima <minima>
Sat, 21 Sep 2002 14:05:00 +0000 (14:05 +0000)
Changes
perl/Msg.pm

diff --git a/Changes b/Changes
index 84c06d8a461898e70bbc7ab31c71ffbaf29480d9..9c0dfc9988be9735931e0e64c881024eb6cb79e7 100644 (file)
--- 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 
index ef43b0bc24618b6033aa52520a009defdae1318e..cf15ff76a8ce2242762d01248339d0ea1c61e22e 100644 (file)
@@ -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($!);