Author: ekohl
Date: Thu Oct 2 16:20:42 2014
New Revision: 64465
URL:
http://svn.reactos.org/svn/reactos?rev=64465&view=rev
Log:
[SERVICES]
ScmWaitForServiceConnect: Log some more warnings and errors.
Modified:
trunk/reactos/base/system/services/database.c
Modified: trunk/reactos/base/system/services/database.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
==============================================================================
--- trunk/reactos/base/system/services/database.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/database.c [iso-8859-1] Thu Oct 2 16:20:42 2014
@@ -1339,6 +1339,9 @@
#ifdef USE_ASYNCHRONOUS_IO
OVERLAPPED Overlapped = {0};
#endif
+ LPCWSTR lpErrorStrings[3];
+ WCHAR szBuffer1[20];
+ WCHAR szBuffer2[20];
DPRINT("ScmWaitForServiceConnect()\n");
@@ -1369,6 +1372,15 @@
{
DPRINT1("CancelIo() failed (Error: %lu)\n",
GetLastError());
}
+
+ _ultow(PipeTimeout, szBuffer1, 10);
+ lpErrorStrings[0] = Service->lpDisplayName;
+ lpErrorStrings[1] = szBuffer1;
+
+ ScmLogEvent(EVENT_CONNECTION_TIMEOUT,
+ EVENTLOG_ERROR_TYPE,
+ 2,
+ lpErrorStrings);
return ERROR_SERVICE_REQUEST_TIMEOUT;
}
@@ -1425,6 +1437,14 @@
DPRINT1("CancelIo() failed (Error: %lu)\n",
GetLastError());
}
+ _ultow(PipeTimeout, szBuffer1, 10);
+ lpErrorStrings[0] = szBuffer1;
+
+ ScmLogEvent(EVENT_READFILE_TIMEOUT,
+ EVENTLOG_ERROR_TYPE,
+ 2,
+ lpErrorStrings);
+
return ERROR_SERVICE_REQUEST_TIMEOUT;
}
else if (dwError == WAIT_OBJECT_0)
@@ -1456,18 +1476,20 @@
return dwError;
}
}
- else
- {
- if (dwProcessId != Service->lpImage->dwProcessId)
- {
-/*
- LPWSTR Strings[3]
-
- ScmLogError(EVENT_SERVICE_DIFFERENT_PID_CONNECTED,
- 3,
- lpStrings);
-*/
- }
+
+ if (dwProcessId != Service->lpImage->dwProcessId)
+ {
+ _ultow(Service->lpImage->dwProcessId, szBuffer1, 10);
+ _ultow(dwProcessId, szBuffer2, 10);
+
+ lpErrorStrings[0] = Service->lpDisplayName;
+ lpErrorStrings[1] = szBuffer1;
+ lpErrorStrings[2] = szBuffer2;
+
+ ScmLogEvent(EVENT_SERVICE_DIFFERENT_PID_CONNECTED,
+ EVENTLOG_WARNING_TYPE,
+ 3,
+ lpErrorStrings);
}
DPRINT("ScmWaitForServiceConnect() done\n");