]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-rx-init-fallback-20060421
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 21 Apr 2006 16:03:34 +0000 (16:03 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 21 Apr 2006 16:03:34 +0000 (16:03 +0000)
when the cache manager is being frequently restarted (especially during
debugging) the 7001/udp port is often not freed appropriately.  This
prevents the cache manager from running.  This patch allows the cache
manager to retry with a random port number.

src/WINNT/afsd/afsd_init.c

index c4214c9cc29b4734ce91268f15a76891ef90a12b..1da704a08513c3b6a65e7b3b410790bd48e08ff0 100644 (file)
@@ -1169,9 +1169,13 @@ int afsd_InitCM(char **reasonP)
      * which is used for callback RPC messages.
      */
     code = rx_Init(htons(cm_callbackport));
+    if (code != 0) {
+       afsi_log("rx_Init code %x - retrying with a random port number", code);
+       code = rx_Init(0);
+    }
     afsi_log("rx_Init code %x", code);
     if (code != 0) {
-        *reasonP = "afsd: failed to init rx client on port 7001";
+        *reasonP = "afsd: failed to init rx client";
         return -1;
     }