]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-give-up-callbacks-20070707
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 7 Jul 2007 14:36:59 +0000 (14:36 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 7 Jul 2007 14:36:59 +0000 (14:36 +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.

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

index 6228a8d6e2c565491418fbc9844ce01b0a174b89..e33f6185f4185647d2f745bb4ece7c9fb060cc0c 100644 (file)
@@ -1796,7 +1796,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 766306cb0192828be334138bd8b3f22f5ce64a18..4a9b325fb0369e301dc349974069fe197c64e996 100644 (file)
@@ -18,6 +18,7 @@
 #include <string.h>
 
 #include "afsd.h"
+#include <WINNT\syscfg.h>
 #include <osi.h>
 #include <rx/rx.h>
 
@@ -83,21 +84,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 */