Author: hpoussin
Date: Sun Jun 25 04:51:28 2006
New Revision: 22606
URL:
http://svn.reactos.org/svn/reactos?rev=22606&view=rev
Log:
StartServiceCtrlDispatcher must be called during main, and does return only at service
stop.
Modified:
trunk/reactos/base/services/dhcp/dhclient.c
Modified: trunk/reactos/base/services/dhcp/dhclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/dhcp/dhclien…
==============================================================================
--- trunk/reactos/base/services/dhcp/dhclient.c (original)
+++ trunk/reactos/base/services/dhcp/dhclient.c Sun Jun 25 04:51:28 2006
@@ -126,6 +126,18 @@
return 1;
}
+static VOID CALLBACK
+DispatchMain(DWORD argc, LPTSTR *argv)
+{
+ dispatch();
+}
+
+static SERVICE_TABLE_ENTRY ServiceTable[2] =
+{
+ {TEXT("DHCP"), DispatchMain},
+ {NULL, NULL}
+};
+
int
main(int argc, char *argv[])
{
@@ -177,7 +189,7 @@
DH_DbgPrint(MID_TRACE,("Going into dispatch()\n"));
- dispatch();
+ StartServiceCtrlDispatcher(ServiceTable);
/* not reached */
return (0);