]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-give-up-callbacks-20070707
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 7 Jul 2007 14:38:33 +0000 (14:38 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 7 Jul 2007 14:38:33 +0000 (14:38 +0000)
don't try so hard to give up all callbacks.  If the server doesn't
respond in 10 seconds, too bad!

cleanup the server probe code a bit.  reorganize the code so that we
can avoid unnecessary pointer evaluation.  add a missing include file.

(cherry picked from commit 90bc0a7f3108372bfc9408127fea17d37025c9ae)

src/WINNT/afsd/cm_callback.c
src/WINNT/afsd/cm_server.c

index 23d189860229b1c793bb1ad28160631006525b7a..44df24f486f1dc4685c9767779b394125e769a05 100644 (file)
@@ -1800,7 +1800,9 @@ cm_GiveUpAllCallbacks(cm_server_t *tsp)
         code = cm_ConnByServer(tsp, cm_rootUserp, &connp);
         if (code == 0) {
             rxconnp = cm_GetRxConn(connp);
+            rx_SetConnDeadTime(rxconnp, 10);
            code = RXAFS_GiveUpAllCallBacks(rxconnp);
+            rx_SetConnDeadTime(rxconnp, ConnDeadtimeout);
            rx_PutConnection(rxconnp);
         }
     }
index 5e4ffda3da48abcc3597b66f8f3b00cb6a0c2abf..a9b27d33527234bd781971bd9b7a059d00e940b8 100644 (file)
@@ -22,6 +22,7 @@
 #include <string.h>
 
 #include "afsd.h"
+#include <WINNT\syscfg.h>
 #include <osi.h>
 #include <rx/rx.h>
 
@@ -87,21 +88,21 @@ cm_PingServer(cm_server_t *tsp)
                  wasDown ? "down" : "up",
                  tsp->capabilities);
 
+        rxconnp = cm_GetRxConn(connp);
        if (wasDown)
-           rx_SetConnDeadTime(connp->callp, 10);
+           rx_SetConnDeadTime(rxconnp, 10);
        if (tsp->type == CM_SERVER_VLDB) {
-           code = VL_ProbeServer(connp->callp);
+           code = VL_ProbeServer(rxconnp);
        }
        else {
            /* file server */
-           rxconnp = cm_GetRxConn(connp);
            code = RXAFS_GetCapabilities(rxconnp, &caps);
            if (code == RXGEN_OPCODE)
                code = RXAFS_GetTime(rxconnp, &secs, &usecs);
-           rx_PutConnection(rxconnp);
        }
        if (wasDown)
-           rx_SetConnDeadTime(connp->callp, ConnDeadtimeout);
+           rx_SetConnDeadTime(rxconnp, ConnDeadtimeout);
+        rx_PutConnection(rxconnp);
        cm_PutConn(connp);
     }  /* got an unauthenticated connection to this server */