diff options
Diffstat (limited to 'src/afb-api-so-v1.c')
-rw-r--r-- | src/afb-api-so-v1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-api-so-v1.c b/src/afb-api-so-v1.c index f4562ec5..f367820d 100644 --- a/src/afb-api-so-v1.c +++ b/src/afb-api-so-v1.c @@ -96,7 +96,8 @@ static int service_start_cb(void *closure, int share_session, int onneed, struct /* get the initialisation */ init = dlsym(desc->handle, afb_api_so_v1_service_init); - if (init == NULL) { + onevent = dlsym(desc->handle, afb_api_so_v1_service_event); + if (init == NULL && onevent == NULL) { /* not an error when onneed */ if (onneed != 0) return 0; @@ -107,7 +108,6 @@ static int service_start_cb(void *closure, int share_session, int onneed, struct } /* get the event handler if any */ - onevent = dlsym(desc->handle, afb_api_so_v1_service_event); desc->service = afb_svc_create_v1(apiset, share_session, init, onevent); if (desc->service == NULL) { /* starting error */ |