Author: ekohl Date: Sun Dec 4 10:53:43 2011 New Revision: 54580
URL: http://svn.reactos.org/svn/reactos?rev=54580&view=rev Log: [EVENTLOG] - Open the application log if the desired log does not exist. - Log eventlog service stop and shutdown.
Modified: trunk/reactos/base/services/eventlog/eventlog.c trunk/reactos/base/services/eventlog/rpc.c
Modified: trunk/reactos/base/services/eventlog/eventlog.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/even... ============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] Sun Dec 4 10:53:43 2011 @@ -63,6 +63,12 @@ { case SERVICE_CONTROL_STOP: DPRINT(" SERVICE_CONTROL_STOP received\n"); + + LogfReportEvent(EVENTLOG_INFORMATION_TYPE, + 0, + EVENT_EventlogStopped, 0, NULL, 0, NULL); + + /* Stop listening to incoming RPC messages */ RpcMgmtStopServerListening(NULL); UpdateServiceStatus(SERVICE_STOPPED); @@ -86,6 +92,11 @@
case SERVICE_CONTROL_SHUTDOWN: DPRINT(" SERVICE_CONTROL_SHUTDOWN received\n"); + + LogfReportEvent(EVENTLOG_INFORMATION_TYPE, + 0, + EVENT_EventlogStopped, 0, NULL, 0, NULL); + UpdateServiceStatus(SERVICE_STOPPED); return ERROR_SUCCESS;
Modified: trunk/reactos/base/services/eventlog/rpc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/rpc.... ============================================================================== --- trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] Sun Dec 4 10:53:43 2011 @@ -103,6 +103,13 @@ lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile); break; } + } + + /* Use the application log if the desired log does not exist */ + if (lpLogHandle->LogFile == NULL) + { + lpLogHandle->LogFile = LogfListItemByName(L"Application"); + lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile); } }