From d950ca774f5c8e51a6113e694fe670fc5a3576ee Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 29 Sep 2003 12:31:22 +0000 Subject: [PATCH] * syslog.cc (vsyslog): Print debug message if ReportEventA fails. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/syslog.cc | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7618b5149..bfe73b6d8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2003-09-29 Corinna Vinschen + + * syslog.cc (vsyslog): Print debug message if ReportEventA fails. + 2003-09-28 Pierre Humblet * sigproc.cc (proc_subproc): Restrict permissions on ppid_handle. diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc index f8b17149c..c0a34ca02 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc @@ -360,8 +360,9 @@ vsyslog (int priority, const char *message, va_list ap) debug_printf ("RegisterEventSourceA failed with %E"); return; } - ReportEventA (hEventSrc, eventType, 0, 0, - cygheap->user.sid (), 1, 0, msg_strings, NULL); + if (!ReportEventA (hEventSrc, eventType, 0, 0, + cygheap->user.sid (), 1, 0, msg_strings, NULL)) + debug_printf ("ReportEventA failed with %E"); DeregisterEventSource (hEventSrc); } else