+Changes in version 0.1.2.10-rc - 2007-03-??
+ o Major bugfixes (Windows)
+ - Do not load the NT services library functions (which may not exist)
+ just to detect if we're a service trying to shut down.
+
+
Changes in version 0.1.2.9-rc - 2007-03-02
o Major bugfixes (Windows):
- On MinGW, use "%I64u" to printf/scanf 64-bit integers, instead
* is a job for arguments, not globals. */
static char **backup_argv;
static int backup_argc;
-static int nt_service_is_stopped(void);
+static int nt_service_is_stopping(void);
static char* nt_strerror(uint32_t errnum);
#else
-#define nt_service_is_stopped() (0)
+#define nt_service_is_stopping() (0)
#endif
/** If our router descriptor ever goes this long without being regenerated
second_elapsed_callback(0,0,NULL);
for (;;) {
- if (nt_service_is_stopped())
+ if (nt_service_is_stopping())
return 0;
#ifndef MS_WINDOWS
exit(1);
}
-/** If we're compiled to run as an NT service, and the service has been
+/** If we're compiled to run as an NT service, and the service wants to
* shut down, then change our current status and return 1. Else
* return 0.
*/
static int
-nt_service_is_stopped(void)
+nt_service_is_stopping(void)
+/* XXXX this function would probably _love_ to be inline, in 0.2.0. */
{
- nt_service_loadlibrary();
+ /* If we haven't loaded the function pointers, we can't possibly be an NT
+ * service trying to shut down. */
+ if (!service_fns.loaded)
+ return 0;
if (service_status.dwCurrentState == SERVICE_STOP_PENDING) {
service_status.dwWin32ExitCode = 0;