windows-shutdown-20090628
[openafs.git] / src / WINNT / afsd / cm_daemon.c
index b930a94..63e5c89 100644 (file)
@@ -45,7 +45,7 @@ int cm_bkgWaitingForCount;    /* true if someone's waiting for cm_bkgQueueCount to
 cm_bkgRequest_t *cm_bkgListp;          /* first elt in the list of requests */
 cm_bkgRequest_t *cm_bkgListEndp;       /* last elt in the list of requests */
 
-static int daemon_ShutdownFlag = 0;
+int daemon_ShutdownFlag = 0;
 static int cm_nDaemons = 0;
 static time_t lastIPAddrChange = 0;
 
@@ -533,7 +533,7 @@ void cm_Daemon(long parm)
         }
 
         /* allow an exit to be called prior to stopping the service */
-        hHookDll = LoadLibrary(AFSD_HOOK_DLL);
+        hHookDll = cm_LoadAfsdHookLib();
         if (hHookDll)
         {
             BOOL hookRc = TRUE;
@@ -601,7 +601,8 @@ void cm_InitDaemon(int nDaemons)
     cm_nDaemons = (nDaemons > CM_MAX_DAEMONS) ? CM_MAX_DAEMONS : nDaemons;
     
     if (osi_Once(&once)) {
-        lock_InitializeRWLock(&cm_daemonLock, "cm_daemonLock");
+        lock_InitializeRWLock(&cm_daemonLock, "cm_daemonLock", 
+                               LOCK_HIERARCHY_DAEMON_GLOBAL);
         osi_EndOnce(&once);
 
        /* creating IP Address Change monitor daemon */