X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-stub-ws.c;h=40addd0bb85987be0b49c557eb2bbed6177ca3c6;hb=e80c1a7ae27456d546e202b1c498e9337d42ce14;hp=4c6fafac53f72d9c79654ed48d44cc6d176b0f50;hpb=5b5968815dc672467f40ed6b49f05a590bdb8b4d;p=src%2Fapp-framework-binder.git diff --git a/src/afb-stub-ws.c b/src/afb-stub-ws.c index 4c6fafac..40addd0b 100644 --- a/src/afb-stub-ws.c +++ b/src/afb-stub-ws.c @@ -341,12 +341,12 @@ static void server_event_push_cb(void *closure, const char *event, int eventid, json_object_put(object); } -static void server_event_broadcast_cb(void *closure, const char *event, struct json_object *object) +static void server_event_broadcast_cb(void *closure, const char *event, struct json_object *object, const uuid_binary_t uuid, uint8_t hop) { struct afb_stub_ws *stubws = closure; if (stubws->proto != NULL) - afb_proto_ws_server_event_broadcast(stubws->proto, event, object); + afb_proto_ws_server_event_broadcast(stubws->proto, event, object, uuid, hop); json_object_put(object); } @@ -457,9 +457,9 @@ static void client_on_event_push_cb(void *closure, const char *event_name, int e ERROR("unreadable push event"); } -static void client_on_event_broadcast_cb(void *closure, const char *event_name, struct json_object *data) +static void client_on_event_broadcast_cb(void *closure, const char *event_name, struct json_object *data, const uuid_binary_t uuid, uint8_t hop) { - afb_evt_broadcast(event_name, data); + afb_evt_rebroadcast(event_name, data, uuid, hop); } /*****************************************************/ @@ -523,15 +523,14 @@ static void server_on_call_cb(void *closure, struct afb_proto_ws_call *call, con wreq->call = call; /* init the context */ - if (afb_context_connect(&wreq->xreq.context, sessionid, NULL) < 0) + if (afb_context_connect_validated(&wreq->xreq.context, sessionid) < 0) goto unconnected; - wreq->xreq.context.validated = 1; server_record_session(stubws, wreq->xreq.context.session); if (wreq->xreq.context.created) afb_session_set_autoclose(wreq->xreq.context.session, 1); /* makes the call */ - wreq->xreq.cred = afb_cred_mixed_on_behalf_import(stubws->cred, sessionid, user_creds); + wreq->xreq.cred = afb_cred_mixed_on_behalf_import(stubws->cred, &wreq->xreq.context, user_creds); wreq->xreq.request.called_api = stubws->apiname; wreq->xreq.request.called_verb = verb; wreq->xreq.json = args;