Que request for event notification.
| 2902 | |
| 2903 | // Que request for event notification. |
| 2904 | ISC_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 | |
| 2938 | namespace |
nothing calls this directly
no test coverage detected