[Bug 733805] WAKE_EVENT() reports false negatives on W32
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sat Jul 26 20:15:29 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=733805
GStreamer | gstreamer (core) | unspecified
--- Comment #1 from LRN <lrn1986 at gmail.com> 2014-07-27 03:15:27 UTC ---
Created an attachment (id=281800)
View: https://bugzilla.gnome.org/attachment.cgi?id=281800
Review: https://bugzilla.gnome.org/review?bug=733805&attachment=281800
Prevent false-negative from WAKE_EVENT() on W32
SetEvent() seems to not call SetLastError(0) internally, so checking last
error after calling SetEvent() may return the error from an earlier W32 API
call. Fix this by calling SetlastError(0) explicitly.
Currently WAKE_EVENT() code is cramped into a macro and doesn't look to be
entirely correct. Particularly, it does not check the return value of
SetEvent(), only the thread-local W32 error value. It is likely that SetEvent()
actually just returns non-zero value, but the code mistakenly thinks that the
call has failed, because GetLastError() seems to indicate so.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list