--- projects/cms/source/host/ihost-perl/ihost.pl 2001/02/01 03:17:32 1.10 +++ projects/cms/source/host/ihost-perl/ihost.pl 2001/02/01 09:10:52 1.11 @@ -8,8 +8,8 @@ # methods as you see fit. # - pjm2@ukc.ac.uk # -# $Author: tdb $ -# $Id: ihost.pl,v 1.10 2001/02/01 03:17:32 tdb Exp $ +# $Author: pjm2 $ +# $Id: ihost.pl,v 1.11 2001/02/01 09:10:52 pjm2 Exp $ #------------------------------------------------------------ $| = 1; @@ -77,10 +77,14 @@ sub tcp_configure() { PeerAddr => $filter_manager_addr, PeerPort => $filter_manager_port, Proto => 'tcp' - ) or die "Could not perform configuration via TCP: $!\n"; + ); + if (!defined $sock) { + print "IHOST ERROR: Could not connect to $filter_manager_addr:$filter_manager_port.\n"; + print "Please check that there is an i-scream server at this address.\n"; + print "Program ended.\n"; + exit(1); + } - die "Could not connect to the i-scream filter manager: $!\n" unless $sock; - # Now run through the configuration process. my($response); @@ -254,9 +258,11 @@ sub send_tcp_heartbeat() { PeerAddr => $filter_addr, PeerPort => $tcp_port, Proto => 'tcp' - ) or die "Could not perform heartbeat via TCP: $!\n"; - - die "Could not connect to the i-scream filter: $!\n" unless $sock; + ); + if (!defined $sock) { + print "IHOST WARNING: Failed to deliver a heartbeat to the i-scream filter.\n"; + return; + } # Now run through the configuration process. my($response);