VirtualBox

Changeset 58578 in vbox


Ignore:
Timestamp:
Nov 5, 2015 1:17:02 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103936
Message:

Main/glue/NativeEventQueue.cpp: fix too pessimistic return value if the waiting was successful (especially the VINF_INTERRUPTED case triggered sometimes by valgrind) and use the same error handling on Darwin and all other platforms using XPCOM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/NativeEventQueue.cpp

    r47801 r58578  
    521521        /** @todo check how Ctrl-C works on Darwin. */
    522522        rc = waitForEventsOnDarwin(cMsTimeout);
    523         if (rc == VERR_TIMEOUT)
    524             rc = processPendingEvents(mEventQ);
    525523# else // !RT_OS_DARWIN
    526524        rc = waitForEventsOnXPCOM(mEventQ, cMsTimeout);
     525# endif // !RT_OS_DARWIN
    527526        if (    RT_SUCCESS(rc)
    528527            ||  rc == VERR_TIMEOUT)
    529             rc = processPendingEvents(mEventQ);
    530 # endif // !RT_OS_DARWIN
     528        {
     529            int rc2 = processPendingEvents(mEventQ);
     530            /* If the wait was successful don't fail the whole operation. */
     531            if (RT_FAILURE(rc) && RT_FAILURE(rc2))
     532                rc = rc2;
     533        }
    531534    }
    532535
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette