- return svc;
-
-error:
- svc_free(svc);
- return NULL;
-}
-
-/*
- * Creates a new service
- */
-struct afb_svc *afb_svc_create_v1(
- const char *api,
- struct afb_apiset *apiset,
- int share_session,
- int (*start)(struct afb_service service),
- void (*on_event)(const char *event, struct json_object *object)
-)
-{
- int rc;
- struct afb_svc *svc;
-
- /* allocates the svc handler */
- svc = afb_svc_alloc(api, apiset, share_session);
- if (svc == NULL)
- goto error;