summaryrefslogtreecommitdiff
path: root/tests/service/testservice.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/service/testservice.c')
-rw-r--r--tests/service/testservice.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/service/testservice.c b/tests/service/testservice.c
index 32796b8..98d688d 100644
--- a/tests/service/testservice.c
+++ b/tests/service/testservice.c
@@ -30,19 +30,7 @@ void __cdecl _tmain( int argc, TCHAR *argv[] ) {
/* called as service, dispatch the main service thread */
if( argc < 2 ) {
- SERVICE_TABLE_ENTRY dispatch_table[2] =
- { { SERVICE_NAME, wolf_service_main },
- { NULL, NULL } };
- BOOL res;
-
- res = StartServiceCtrlDispatcher( dispatch_table );
- if( !res ) {
- WOLF_LOG_GET_LAST_ERROR( GetLastError( ), errbuf, 512 );
- wolf_log( WOLF_LOG_ERR, WOLF_CATEGORY_TESTSERVICE, WOLF_MSG_TESTSERVICE_CANT_DISPATCH_SERVICE,
- _( "Unable to dispatch service '%s': %s (%d)" ),
- SERVICE_NAME, errbuf, GetLastError( ) );
- }
-
+ (void)wolf_service_start( SERVICE_NAME, &wolf_service_main );
return;
}