X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-ws.c;h=4b870d456af845be828ef57f97d8a248071e0935;hb=5d248158cc380d0a164fa56b46a7bdede4115407;hp=5c3dcd4764a5a9ee23b4e45d3b6a5537f2f15c71;hpb=0b838a6101edc810098ee0645d3bfd966096ae07;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-ws.c b/src/afb-api-ws.c index 5c3dcd47..4b870d45 100644 --- a/src/afb-api-ws.c +++ b/src/afb-api-ws.c @@ -856,6 +856,11 @@ static int api_ws_client_connect(struct api_ws *api) return -1; } +static struct afb_api_itf ws_api_itf = { + .call = api_ws_client_call_cb, + .service_start = api_ws_service_start_cb +}; + /* adds a afb-ws-service client api */ int afb_api_ws_add_client(const char *path) { @@ -877,8 +882,7 @@ int afb_api_ws_add_client(const char *path) /* record it as an API */ afb_api.closure = api; - afb_api.call = api_ws_client_call_cb; - afb_api.service_start = api_ws_service_start_cb; + afb_api.itf = &ws_api_itf; if (afb_apis_add(api->api, afb_api) < 0) goto error3;