Changeset 913545e
- Timestamp:
- 2008-06-28T18:38:52Z (16 years ago)
- Branches:
- master
- Children:
- f5d1b31
- Parents:
- 47b571d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
win32.c
r47b571d r913545e 1 1 /********************************************************************\ 2 * BitlBee -- An IRC to other IM-networks gateway 3 * 4 * Copyright 2002-2004 Wilmer van der Gaast and others 2 * BitlBee -- An IRC to other IM-networks gateway * 3 * * 4 * Copyright 2002-2004 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 7 /* Main file (Windows specific part) 7 /* Main file (Windows specific part) */ 8 8 9 9 /* … … 39 39 switch (dwControl) 40 40 { 41 41 case SERVICE_CONTROL_STOP: 42 42 /* FIXME */ 43 44 45 46 47 48 49 50 51 43 break; 44 45 case SERVICE_CONTROL_INTERROGATE: 46 break; 47 48 default: 49 break; 50 51 } 52 52 } 53 53 … … 95 95 SERVICE_STATUS status; 96 96 97 98 99 100 return; 101 102 103 97 handle = RegisterServiceCtrlHandler("bitlbee", service_ctrl); 98 99 if (!handle) 100 return; 101 102 status.dwServiceType = SERVICE_WIN32_OWN_PROCESS; 103 status.dwServiceSpecificExitCode = 0; 104 104 105 105 bitlbee_init(argc, argv); … … 126 126 127 127 int main( int argc, char **argv) 128 { 128 { 129 129 int i; 130 130 WSADATA WSAData; … … 140 140 } 141 141 142 142 WSAStartup(MAKEWORD(1,1), &WSAData); 143 143 144 144 if (!debug) { … … 271 271 void log_message(int level, char *message, ...) 272 272 { 273 274 273 HANDLE hEventSource; 274 LPTSTR lpszStrings[2]; 275 275 WORD elevel; 276 277 278 276 va_list ap; 277 278 va_start(ap, message); 279 279 280 280 if (debug) { … … 285 285 } 286 286 287 288 289 290 291 287 hEventSource = RegisterEventSource(NULL, TEXT("bitlbee")); 288 289 lpszStrings[0] = TEXT("bitlbee"); 290 lpszStrings[1] = g_strdup_vprintf(message, ap); 291 va_end(ap); 292 292 293 293 switch (level) { … … 300 300 } 301 301 302 303 304 305 0, 306 0, 307 NULL,308 2, 309 0, 310 lpszStrings,311 NULL); 312 313 314 302 if (hEventSource != NULL) { 303 ReportEvent(hEventSource, 304 elevel, 305 0, 306 0, 307 NULL, 308 2, 309 0, 310 lpszStrings, 311 NULL); 312 313 DeregisterEventSource(hEventSource); 314 } 315 315 316 316 g_free(lpszStrings[1]);
Note: See TracChangeset
for help on using the changeset viewer.