X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-apis.c;h=9b2df3f30f1176d4a9e2fc89afa91ddce4b346d1;hb=fc19b7d7974f9c64dffc40e180464d595a9805cd;hp=55e68c932d7442381e1208d352fb3495e813dce8;hpb=efe18167d6ce59b263c179a6e2d01aa875c05cf8;p=src%2Fapp-framework-binder.git diff --git a/src/afb-apis.c b/src/afb-apis.c index 55e68c93..9b2df3f3 100644 --- a/src/afb-apis.c +++ b/src/afb-apis.c @@ -63,7 +63,9 @@ static int apis_count = 0; static const char plugin_register_function[] = "pluginRegister"; static const struct afb_poll_itf upoll_itf = { - .update = (void*)upoll_update, + .on_readable = (void*)upoll_on_readable, + .on_writable = (void*)upoll_on_writable, + .on_hangup = (void*)upoll_on_hangup, .close = (void*)upoll_close }; @@ -85,10 +87,10 @@ void afb_apis_free_context(int apiidx, void *context) free(context); } -static struct afb_poll itf_poll_open(int fd, uint32_t events, void (*process)(void *closure, int fd, uint32_t events), void *closure) +static struct afb_poll itf_poll_open(int fd, void *closure) { struct afb_poll result; - result.data = upoll_open(fd, events, process, closure); + result.data = upoll_open(fd, closure); result.itf = result.data ? &upoll_itf : NULL; return result; } @@ -309,6 +311,7 @@ static void trapping_handle(struct afb_req req, void(*cb)(struct afb_req)) timerset = 1; /* TODO: check statuses */ sevp.sigev_notify = SIGEV_THREAD_ID; sevp.sigev_signo = SIGALRM; + sevp.sigev_value.sival_ptr = NULL; #if defined(sigev_notify_thread_id) sevp.sigev_notify_thread_id = (pid_t)syscall(SYS_gettid); #else