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.22 by pjm2, Thu Mar 1 10:49:27 2001 UTC vs.
Revision 1.23 by pjm2, Thu Mar 1 18:53:42 2001 UTC

# Line 304 | Line 304 | sub send_tcp_heartbeat() {
304  
305      print $sock "HEARTBEAT\n";
306      $response = <$sock>;
307 <    chop $response or return;
307 >    return if (!defined $response);
308 >    chop $response;
309      if (!$response eq "OK") {
310          close($sock);
311          print "Server gave wrong response to HEARTBEAT: $response\n";
# Line 313 | Line 314 | sub send_tcp_heartbeat() {
314      
315      print $sock "CONFIG\n";
316      $response = <$sock>;
317 <    chop $response or return;
317 >    return if (!defined $response);
318 >    chop $response;
319      if (!$response eq "OK") {
320          close($sock);
321          print "Server gave wrong response to CONFIG: $response\n";
# Line 322 | Line 324 | sub send_tcp_heartbeat() {
324  
325      print $sock "$file_list\n";
326      $response = <$sock>;
327 <    chop $response or return;
327 >    return if (!defined $response);
328 >    chop $response;
329      if (!$response eq "OK") {
330          close($sock);
331          print "Server gave wrong response to file list: $response\n";
# Line 331 | Line 334 | sub send_tcp_heartbeat() {
334      
335      print $sock "$last_modified\n";
336      $response = <$sock>;
337 <    chop $response or return;
337 >    return if (!defined $response);
338 >    chop $response;
339      if ($response eq "ERROR") {
340          close($sock);
341          &tcp_configure();
# Line 344 | Line 348 | sub send_tcp_heartbeat() {
348      }
349      
350      print $sock "ENDHEARTBEAT\n";
351 <    $response = <$sock> or return;
351 >    $response = <$sock>;
352 >    return if (!defined $response);
353      chop $response;
354      if (!$response eq "OK") {
355          close($sock);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines