ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/ihost-perl/ihost.pl
(Generate patch)

Comparing projects/cms/source/host/ihost-perl/ihost.pl (file contents):
Revision 1.33 by pjm2, Tue Mar 20 12:58:22 2001 UTC vs.
Revision 1.34 by pjm2, Thu Mar 22 08:53:59 2001 UTC

# Line 361 | Line 361 | EOF
361   # send_tcp_heartbeat
362   # Establishes a TCP connection to an i-scream filter.
363   # The heartbeat is used as a guaranteed "I'm alive" delivery mechanism.
364 + # If we need to reconfigure, then we complete the heartbeat before
365 + # doing so.
366   #-----------------------------------------------------------------------
367   sub send_tcp_heartbeat() {
368  
369 +    my ($doReconfigure) = 0;
370 +
371      my($sock) = new IO::Socket::INET(
372                                       PeerAddr => $filter_addr,
373                                       PeerPort => $tcp_port,
# Line 410 | Line 414 | sub send_tcp_heartbeat() {
414      if ($response eq "ERROR\n") {
415          close($sock);
416          print "Server configuration changed.  Reconfiguring with filter manager.\n";
417 <        &tcp_configure();
414 <        return;
417 >        $doReconfigure = 1;
418      }
419      if (!$response eq "OK\n") {
420          close($sock);
# Line 431 | Line 434 | sub send_tcp_heartbeat() {
434      
435      close($sock);
436      print "^";
437 +    
438 +    &tcp_configure() if $doReconfigure;
439      
440      return;
441   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines