summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_event.c
diff options
context:
space:
mode:
authorKeith Burns (alagalah) <alagalah@gmail.com>2018-03-06 15:55:22 -0800
committerDave Wallace <dwallacelf@gmail.com>2018-03-09 19:40:39 +0000
commit0d2b0d5497b61afb5c964373c7bed974d78762a0 (patch)
treef72eb2722844201871caddea65bb02c2895a70a1 /src/vcl/vcl_event.c
parent51c52c0adc9bf79ca6508ee1327d3b972e80b5c6 (diff)
VCL API for external callback for listener/connect event
Change-Id: Ic59355683b581945d10a2df97d9b2deae87a998e Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Diffstat (limited to 'src/vcl/vcl_event.c')
-rw-r--r--src/vcl/vcl_event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vcl/vcl_event.c b/src/vcl/vcl_event.c
index 64f55b9fb0b..f6e20de2769 100644
--- a/src/vcl/vcl_event.c
+++ b/src/vcl/vcl_event.c
@@ -96,7 +96,7 @@ vce_get_event_handler (vce_event_thread_t *evt, vce_event_key_t *evk)
vce_event_handler_reg_t *
vce_register_handler (vce_event_thread_t *evt, vce_event_key_t *evk,
- vce_event_callback_t cb)
+ vce_event_callback_t cb, void *cb_args)
{
vce_event_handler_reg_t *handler;
vce_event_handler_reg_t *old_handler = 0;
@@ -135,6 +135,7 @@ vce_register_handler (vce_event_thread_t *evt, vce_event_key_t *evk,
handler->replaced_handler_idx = (p) ? p[0] : ~0;
handler->ev_idx = ~0; //This will be set by the event thread if event happens
handler->evk = evk->as_u64;
+ handler->handler_fn_args = cb_args;
hash_set (evt->handlers_index_by_event_key, evk->as_u64, handler_index);
@@ -275,4 +276,4 @@ vce_start_event_thread (vce_event_thread_t *evt, u8 max_events)
return pthread_create (&(evt->thread), NULL /* attr */ ,
vce_event_thread_fn, evt);
-} \ No newline at end of file
+}