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.6 by pjm2, Fri Jan 26 17:47:18 2001 UTC vs.
Revision 1.8 by pjm2, Mon Jan 29 09:19:16 2001 UTC

# Line 88 | Line 88 | sub tcp_configure() {
88      chop $response;
89      $last_modified = $response;
90      
91 <    print "Config last modified: ". scalar localtime $last_modified . "\n";
91 >    print "Config last modified: ". (scalar localtime $last_modified/1000) . "\n";
92  
93      print $sock "FILELIST\n";
94      $response = <$sock>;
# Line 107 | Line 107 | sub tcp_configure() {
107      chop $response;
108      $tcp_update_time = $response;
109      
110 <    print "UDP packet period: $udp_update_time seconds.\nTCP heartbeat period: $tcp_update_time.\n";
110 >    print "UDP packet period: $udp_update_time seconds.\nTCP heartbeat period: $tcp_update_time seconds.\n";
111  
112      print $sock "ENDCONFIG\n";
113      $response = <$sock>;
# Line 170 | Line 170 | sub send_udp_packet() {
170  
171      my($hostname) = hostname();
172      $hostname =~ s/\..*$//g;
173 <    my($domainname) = `cat /etc/resolv.conf`;
174 <    $domainname =~ s/domain\s*([^\s]*?)/$1/;
173 >    `cat /etc/resolv.conf` =~ /domain\s+([^\s]+)/;
174 >    my($domainname) = $1;
175      my($machine_name) = "$hostname.$domainname";
176      my($ip) = inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost');
177  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines