[Resmon-devel] [resmon commit] r375 - trunk/lib/Resmon

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Wed May 12 14:53:55 EDT 2010


Author: mark
Date: 2010-05-12 14:53:55 -0400 (Wed, 12 May 2010)
New Revision: 375

Modified:
   trunk/lib/Resmon/Status.pm
Log:
Fix listening on an alternate IP (refs #6)

Modified: trunk/lib/Resmon/Status.pm
===================================================================
--- trunk/lib/Resmon/Status.pm	2010-05-12 18:09:43 UTC (rev 374)
+++ trunk/lib/Resmon/Status.pm	2010-05-12 18:53:55 UTC (rev 375)
@@ -431,7 +431,11 @@
     my $port = shift;
     $self->{authuser} = shift;
     $self->{authpass} = shift;
-    $ip = INADDR_ANY if(!defined($ip) || $ip eq '' || $ip eq '*');
+    if(!defined($ip) || $ip eq '' || $ip eq '*') {
+        $ip = INADDR_ANY;
+    } else {
+        $ip = inet_aton($ip);
+    }
     $port ||= 81;
 
     my $handle = IO::Socket->new();



More information about the Resmon-devel mailing list