[Bug 733805] WAKE_EVENT() reports false negatives on W32
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Jul 28 00:15:07 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=733805
GStreamer | gstreamer (core) | unspecified
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |slomo at coaxion.net
Resolution| |FIXED
Target Milestone|HEAD |1.5.1
--- Comment #2 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-07-28 07:15:01 UTC ---
It should probably become an inline function or a multi-line macro :) The comma
operator is not very nice.
commit b87c55f6ed83e11a483f43d6bc29a9d4a79c786f
Author: Руслан Ижбулатов <lrn1986 at gmail.com>
Date: Sun Jul 27 03:06:16 2014 +0000
poll: 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.
https://bugzilla.gnome.org/show_bug.cgi?id=733805
--
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