projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
86b2012
)
added a check that connect ip addresses resolve
author
minima
<minima>
Sat, 21 Sep 2002 14:05:00 +0000
(14:05 +0000)
committer
minima
<minima>
Sat, 21 Sep 2002 14:05:00 +0000
(14:05 +0000)
Changes
patch
|
blob
|
history
perl/Msg.pm
patch
|
blob
|
history
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
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 ef43b0bc24618b6033aa52520a009defdae1318e..cf15ff76a8ce2242762d01248339d0ea1c61e22e 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-212,7
+212,10
@@
sub connect {
blocking($sock, 0);
$conn->{blocking} = 0;
blocking($sock, 0);
$conn->{blocking} = 0;
+ # does the host resolve?
my $ip = gethostbyname($to_host);
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($!);
# my $r = $sock->connect($to_port, $ip);
my $r = connect($sock, pack_sockaddr_in($to_port, $ip));
return undef unless $r || _err_will_block($!);