windows-giveupallcallbacks-20071204
[openafs.git] / src / WINNT / afsd / afsd_init.c
index 64364ca..0e833da 100644 (file)
@@ -47,6 +47,7 @@ extern int cm_deleteReadOnly;
 extern afs_int32 cm_BPlusTrees;
 #endif
 extern afs_int32 cm_OfflineROIsValid;
+extern afs_int32 cm_giveUpAllCBs;
 extern const char **smb_ExecutableExtensions;
 
 osi_log_t *afsd_logp;
@@ -1129,6 +1130,14 @@ int afsd_InitCM(char **reasonP)
     } 
     afsi_log("CM OfflineReadOnlyIsValid is %u", cm_deleteReadOnly);
     
+    dummyLen = sizeof(DWORD);
+    code = RegQueryValueEx(parmKey, "GiveUpAllCallBacks", NULL, NULL,
+                           (BYTE *) &dwValue, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+        cm_giveUpAllCBs = (unsigned short) dwValue;
+    } 
+    afsi_log("CM GiveUpAllCallBacks is %u", cm_giveUpAllCBs);
+    
     RegCloseKey (parmKey);
 
     cacheBlocks = ((afs_uint64)cacheSize * 1024) / blockSize;