avoid some spurious error messages when no agent is found
[monkeysphere-validation-agent.git] / Crypt / Monkeysphere / MSVA.pm
index bd81606b306e294b2ed2ab1ca3bac441579c0243..cadfee6e5b576bc07c9f59a1f35403e5785c14cf 100755 (executable)
   sub getpidswithsocketinode {
     my $sockid = shift;
 
+    if (! defined ($sockid)) {
+      msvalog('verbose', "No client socket ID to check.  The MSVA is probably not running as a service.\n");
+      return [];
+    }
     # this appears to be how Linux symlinks open sockets in /proc/*/fd,
     # as of at least 2.6.26:
     my $socktarget = sprintf('socket:[%d]', $sockid);