X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-apis.c;h=9dcb18098cec5b8de4942d81747e329e4390cc8e;hb=21974dca8364f3d267dd912e92521f6252dddf02;hp=8dfac519ee404444915d89b03c0019244677229b;hpb=677717c5c86f107b2d196d70796a9be7db3532df;p=src%2Fapp-framework-binder.git diff --git a/src/afb-apis.c b/src/afb-apis.c index 8dfac519..9dcb1809 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; } @@ -367,9 +369,8 @@ int afb_apis_handle(struct afb_req req, struct AFB_clientCtx *context, const cha v = a->plugin->apis; for (j = 0 ; v->name ; j++, v++) { if (!strncasecmp(v->name, verb, lenverb) && !v->name[lenverb]) { - req.context = context->contexts[i]; + req.context = &context->contexts[i]; handle(req, v); - context->contexts[i] = req.context; return 1; } }