rc = afb_evt_add_watch(wreq->stubws->listener, event);
if (rc >= 0)
- rc = afb_proto_ws_call_subscribe(wreq->call, afb_evt_event_name(event), afb_evt_event_id(event));
+ rc = afb_proto_ws_call_subscribe(wreq->call, afb_evt_event_fullname(event), afb_evt_event_id(event));
if (rc < 0)
ERROR("error while subscribing event");
return rc;
int rc, rc2;
struct server_req *wreq = CONTAINER_OF_XREQ(struct server_req, xreq);
- rc = afb_proto_ws_call_unsubscribe(wreq->call, afb_evt_event_name(event), afb_evt_event_id(event));
+ rc = afb_proto_ws_call_unsubscribe(wreq->call, afb_evt_event_fullname(event), afb_evt_event_id(event));
rc2 = afb_evt_remove_watch(wreq->stubws->listener, event);
if (rc >= 0 && rc2 < 0)
rc = rc2;
struct client_event *ev;
ev = stubws->events;
- while (ev != NULL && (ev->eventid != eventid || 0 != strcmp(afb_evt_event_name(ev->event), name)))
+ while (ev != NULL && (ev->eventid != eventid || 0 != strcmp(afb_evt_event_fullname(ev->event), name)))
ev = ev->next;
return ev;
struct afb_stub_ws *stubws = closure;
afb_proto_ws_client_call(stubws->proto, xreq->verb, afb_xreq_json(xreq), afb_session_uuid(xreq->context.session), xreq);
- afb_xreq_addref(xreq);
+ afb_xreq_unhooked_addref(xreq);
}
static void client_on_description_cb(void *closure, struct json_object *data)
struct afb_xreq *xreq = request;
afb_xreq_success(xreq, result, *info ? info : NULL);
- afb_xreq_unref(xreq);
+ afb_xreq_unhooked_unref(xreq);
}
static void on_reply_fail(void *closure, void *request, const char *status, const char *info)
struct afb_xreq *xreq = request;
afb_xreq_fail(xreq, status, *info ? info : NULL);
- afb_xreq_unref(xreq);
+ afb_xreq_unhooked_unref(xreq);
}
static void on_event_create(void *closure, const char *event_name, int event_id)
assert(!stubws->listener); /* check client */
api.closure = stubws;
api.itf = &ws_api_itf;
- api.noconcurrency = 0;
+ api.group = NULL;
return api;
}