#ifdef AFSIFS
int i;
#endif
+ if (!msgp)
+ msgp = "unspecified assert";
if (filep)
LogEvent(EVENTLOG_ERROR_TYPE, MSG_SERVICE_ERROR_STOP_WITH_MSG_AND_LOCATION,
buf_ForceTrace(TRUE);
afsi_log("--- begin dump ---");
+ cm_MemDumpDirStats(afsi_file, "a", 0);
+ cm_MemDumpBPlusStats(afsi_file, "a", 0);
cm_DumpCells(afsi_file, "a", 0);
cm_DumpVolumes(afsi_file, "a", 0);
cm_DumpSCache(afsi_file, "a", 0);
{
case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
+ if (ctrlCode == SERVICE_CONTROL_SHUTDOWN)
+ afsi_log("SERVICE_CONTROL_SHUTDOWN");
+ else
+ afsi_log("SERVICE_CONTROL_STOP");
+
ServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
ServiceStatus.dwWin32ExitCode = NO_ERROR;
ServiceStatus.dwCheckPoint = 1;
powerStateSuspended = 1;
if (osVersion.dwMajorVersion >= 6) {
cm_SuspendSCache();
- smb_StopListeners();
+ smb_StopListeners(0);
}
dwRet = NO_ERROR;
break;
powerStateSuspended = 1;
if (osVersion.dwMajorVersion >= 6) {
cm_SuspendSCache();
- smb_StopListeners();
+ smb_StopListeners(0);
}
dwRet = NO_ERROR;
break;
case PBT_APMRESUMECRITICAL:
afsi_log("SERVICE_CONTROL_APMRESUMECRITICAL");
if (osVersion.dwMajorVersion >= 6)
- smb_RestartListeners();
+ smb_RestartListeners(0);
dwRet = NO_ERROR;
break;
case PBT_APMRESUMESUSPEND:
afsi_log("SERVICE_CONTROL_APMRESUMEAUTOMATIC");
powerStateSuspended = 0;
if (osVersion.dwMajorVersion >= 6)
- smb_RestartListeners();
+ smb_RestartListeners(0);
dwRet = NO_ERROR;
break;
default:
dwResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, szKeyName, 0, KEY_QUERY_VALUE, &hKey);
if (dwResult != ERROR_SUCCESS)
- return;
+ return 0;
while (dwIndex < MAX_DRIVES) {
dwDriveSize = sizeof(szDriveToMapTo);
RegCloseKey (parmKey);
}
- if (verifyServiceSig && cacheSize < 716800) {
+ if (verifyServiceSig
+#ifndef _WIN64
+ && cacheSize < 716800
+#endif
+ ) {
trustVerified = VerifyTrust(filename);
} else {
afsi_log("Signature Verification disabled");
SetServiceStatus(StatusHandle, &ServiceStatus);
#endif
+ /* Notify any volume status handlers that the cache manager has started */
+ cm_VolStatus_Service_Started();
+
/* the following ifdef chooses the mode of operation for the service. to enable
* a runtime flag (instead of compile-time), pioctl() would need to dynamically
* determine the mode, in order to use the correct ioctl special-file path. */
LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_SERVICE_RUNNING);
}
- /* Notify any volume status handlers that we have started */
- cm_VolStatus_Service_Started();
-
/* allow an exit to be called when started */
hHookDll = LoadLibrary(AFSD_HOOK_DLL);
if (hHookDll)