HANDLE hAFSDWorkerThread[WORKER_THREADS];
#endif
+/* for the IFS version, set the event DoTerminate, on which all
+ worker threads wait. they will exit, and then everything else
+ can uninitialize. */
HANDLE WaitToTerminate, DoTerminate;
int GlobalStatus;
dwResult = WNetCancelConnection2(szDriveToMapTo, 0, TRUE);
}
#else
- /* FIXFIX */
+ /* FIXFIX: implement */
#endif
}
afsi_log("Disconnect from GlobalAutoMap of %s to %s %s", szDriveToMapTo, szSubMount, dwResult ? "succeeded" : "failed");
}
#else
- /* FIXFIX */
+ /* FIXFIX: implement */
#endif
RegCloseKey(hKey);
ServiceStatus.dwWaitHint = 0;
ServiceStatus.dwControlsAccepted = 0;
SetServiceStatus(StatusHandle, &ServiceStatus);
+
+ {
+ HANDLE h; char *ptbuf[1];
+ h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
+ ptbuf[0] = "Incorrect module versions loaded";
+ ReportEvent(h, EVENTLOG_ERROR_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
+ DeregisterEventSource(h);
+ }
/* exit if initialization failed */
return;
SetServiceStatus(StatusHandle, &ServiceStatus);
#endif
+/* 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. */
#ifndef AFSIFS
code = afsd_InitSMB(&reason, MessageBox);
if (code != 0) {
rx_Finalize();
afsi_log("rx finalization complete");
- smb_Shutdown();
+#ifndef AFSIFS
+ smb_Shutdown();
afsi_log("smb shutdown complete");
+#endif
RpcShutdown();
SetEvent(WaitToTerminate);
#else
SetEvent(DoTerminate);
+ dc_release_hooks();
#endif
}
}