mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-13 07:36:43 +00:00
Only dispatch a callback if it is non-null.
(Logical change 1.158) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@550 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
6ef7bdb950
commit
6b9a85376c
18
lib/evt.c
18
lib/evt.c
@ -608,8 +608,14 @@ saEvtDispatch(
|
||||
if (error != SA_AIS_OK) {
|
||||
break;
|
||||
}
|
||||
callbacks.saEvtEventDeliverCallback(evt->led_sub_id, event_handle,
|
||||
evt->led_user_data_size);
|
||||
|
||||
/*
|
||||
* Only call if there was a function registered
|
||||
*/
|
||||
if (callbacks.saEvtEventDeliverCallback) {
|
||||
callbacks.saEvtEventDeliverCallback(evt->led_sub_id,
|
||||
event_handle, evt->led_user_data_size);
|
||||
}
|
||||
break;
|
||||
|
||||
case MESSAGE_RES_EVT_CHAN_OPEN_CALLBACK:
|
||||
@ -635,8 +641,14 @@ saEvtDispatch(
|
||||
resa->ica_c_handle);
|
||||
}
|
||||
}
|
||||
callbacks.saEvtChannelOpenCallback(resa->ica_invocation,
|
||||
|
||||
/*
|
||||
* Only call if there was a function registered
|
||||
*/
|
||||
if (callbacks.saEvtChannelOpenCallback) {
|
||||
callbacks.saEvtChannelOpenCallback(resa->ica_invocation,
|
||||
resa->ica_c_handle, error);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user