X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fclient.pl;h=2e6a4f1727452652d1b32f3ccf7353e2016cedd9;hb=e0278322b79d09a997ed7df948c57b58f02b139c;hp=8a19719ef54ec26333bc6f140d5af1fb3c11e1b2;hpb=d6f207760a7908f4ea933125f1c2c36cbe4fb209;p=spider.git diff --git a/perl/client.pl b/perl/client.pl index 8a19719e..2e6a4f17 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -98,7 +98,7 @@ sub rec_socket cease(1); } if (defined $msg) { - my ($sort, $call, $line) = $msg =~ /^(\w)(\S+)\|(.*)$/; + my ($sort, $call, $line) = $msg =~ /^(\w)([A-Z0-9\-]+)\|(.*)$/; if ($sort eq 'D') { my $snl = $mynl; @@ -225,6 +225,8 @@ sub doconnect $rfh = new IO::File; $wfh = new IO::File; $pid = open2($rfh, $wfh, "$line") or die "can't do $line $!"; + die "no receive channel $!" unless $rfh; + die "no transmit channel $!" unless $wfh; dbg('connect', "got pid $pid"); $wfh->autoflush(1); } else { @@ -259,6 +261,7 @@ sub dochat for (;;) { if ($csort eq 'telnet') { $line = $sock->get(); + cease(11) unless $line; # the socket has gone away? $line =~ s/\r\n/\n/og; chomp; } elsif ($csort eq 'ax25' || $csort eq 'prog') {