Use AFS_RXDEADTIME instead of hardcoding a value of 50
[openafs.git] / src / afs / afs_server.c
index 142fe8d..5c3b48e 100644 (file)
@@ -297,14 +297,10 @@ static void CheckVLServer(sa, areq)
        return;
     rx_SetConnDeadTime(tc->id, 3);
 
-#ifdef RX_ENABLE_LOCKS
-    AFS_GUNLOCK();
-#endif /* RX_ENABLE_LOCKS */
+    RX_AFS_GUNLOCK();
     code = VL_ProbeServer(tc->id);
-#ifdef RX_ENABLE_LOCKS
-    AFS_GLOCK();
-#endif /* RX_ENABLE_LOCKS */
-    rx_SetConnDeadTime(tc->id, 50);
+    RX_AFS_GLOCK();
+    rx_SetConnDeadTime(tc->id, AFS_RXDEADTIME);
     afs_PutConn(tc, SHARED_LOCK);
     /*
      * If probe worked, or probe call not yet defined (for compatibility
@@ -582,13 +578,9 @@ void afs_CheckServers(adown, acellp)
 
            XSTATS_START_TIME(AFS_STATS_FS_RPCIDX_GETTIME);
            start = osi_Time();         /* time the gettimeofday call */
-#ifdef RX_ENABLE_LOCKS
-           AFS_GUNLOCK();
-#endif /* RX_ENABLE_LOCKS */
+           RX_AFS_GUNLOCK();
            code = RXAFS_GetTime(tc->id, &tv.tv_sec, &tv.tv_usec);
-#ifdef RX_ENABLE_LOCKS
-           AFS_GLOCK();
-#endif /* RX_ENABLE_LOCKS */
+           RX_AFS_GLOCK();
            end = osi_Time();
            XSTATS_END_TIME;
            /*
@@ -639,7 +631,7 @@ void afs_CheckServers(adown, acellp)
                afs_setTimeHost = tc->srvr->server;
            }
            if (setTimer)
-               rx_SetConnDeadTime(tc->id, 50);
+               rx_SetConnDeadTime(tc->id, AFS_RXDEADTIME);
            if (code >= 0 && (sa->sa_flags & SRVADDR_ISDOWN) && (tc->srvr == sa)) {
                /* server back up */
                print_internet_address("afs: file server ", sa, " is back up", 2);