From: Stephen L Johnson Date: Mon, 20 Mar 2000 02:52:52 +0000 (+0000) Subject: moved alarm(0) calling to in eval statement where it belongs X-Git-Tag: spong-2_7-alpha5~27 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=338d815c0636c3bcd3fbbf5e4570a6d11c086c51;p=spong.git moved alarm(0) calling to in eval statement where it belongs --- diff --git a/src/spong-server.pl b/src/spong-server.pl index 9f0816a..ee34cd5 100755 --- a/src/spong-server.pl +++ b/src/spong-server.pl @@ -226,6 +226,7 @@ sub listen_for_updates { while( 1 ) { next unless ( $client = $sock->accept() ); my $paddr = $client->peerhost(); + &debug("Connection from $paddr",6); # &validate_connection( $paddr ); - need to do something here... @@ -241,14 +242,15 @@ sub listen_for_updates { alarm($SPONG_SERVER_ALARM) if $SPONG_SERVER_ALARM; $header = <$client>; chomp $header; + &debug("msg header = $header",6); while( defined( $line = <$client> ) ) { last if ($cnt += length($line)) > 100000; $message .= $line; } + alarm(0); $ok = 1; }; - alarm(0); undef $client; if ( ! $ok ) {