Revision: 14353
Author: adrian.chadd
Date: Mon Nov  2 21:37:35 2009
Log: Try to fix issue 75 - too many pinger processes.

This is intended to not open >1 pinger process at a time.


http://code.google.com/p/lusca-cache/source/detail?r=14353

Modified:
  /branches/LUSCA_HEAD/src/icmp.c

=======================================
--- /branches/LUSCA_HEAD/src/icmp.c     Wed Apr  1 15:34:06 2009
+++ /branches/LUSCA_HEAD/src/icmp.c     Mon Nov  2 21:37:35 2009
@@ -190,6 +190,16 @@
      const char *args[2];
      int rfd;
      int wfd;
+
+    /*
+     * Some of the error handling just calls icmpClose() without  
re-opening things.
+     * icmpClose() actually calls icmpOpen() itself!
+     * Until that mess is fully tidied up, just ensure that only one  
pinger is
+     * opened at any one time.
+     */
+    if (icmp_sock != -1)
+        return;
+
      if (strcmp("none", Config.Program.pinger) == 0) {
        debug(37, 1) ("Pinger not started - disabled in configuration file.\n");
        return;

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to