MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / API_ROUTINE isc_wait_for_event

Function API_ROUTINE isc_wait_for_event

src/yvalve/why.cpp:2904–2935  ·  view source on GitHub ↗

Que request for event notification.

Source from the content-addressed store, hash-verified

2902
2903// Que request for event notification.
2904ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS* userStatus, isc_db_handle* dbHandle,
2905 USHORT length, const UCHAR* eventsData, UCHAR* buffer)
2906{
2907 StatusVector status(userStatus);
2908 CheckStatusWrapper statusWrapper(&status);
2909 YEvents* events = NULL;
2910
2911 RefPtr<WaitCallback> callback(FB_NEW WaitCallback(buffer));
2912
2913 try
2914 {
2915 RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle));
2916
2917 events = attachment->queEvents(&statusWrapper, callback, length, eventsData);
2918
2919 if (status.getState() & IStatus::STATE_ERRORS)
2920 return status[1];
2921
2922 callback->sem.enter();
2923 }
2924 catch (const Exception& e)
2925 {
2926 e.stuffException(&statusWrapper);
2927 }
2928
2929 if (events)
2930 {
2931 events->release();
2932 }
2933
2934 return status[1];
2935}
2936
2937
2938namespace

Callers

nothing calls this directly

Calls 6

translateHandleFunction · 0.85
queEventsMethod · 0.45
getStateMethod · 0.45
enterMethod · 0.45
stuffExceptionMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected