Add 'afb_service_call_sync' function
[src/app-framework-binder.git] / src / afb-stub-ws.c
index 042ed25..c7b4b2e 100644 (file)
@@ -354,7 +354,7 @@ static void server_req_subcall_cb(struct afb_xreq *xreq, const char *api, const
 
        sc = malloc(sizeof *sc);
        if (!sc) {
-
+               callback(cb_closure, 1, afb_msg_json_internal_error());
        } else {
                sc->callback = callback;
                sc->closure = cb_closure;
@@ -1156,15 +1156,3 @@ void afb_stub_ws_addref(struct afb_stub_ws *stubws)
        __atomic_add_fetch(&stubws->refcount, 1, __ATOMIC_RELAXED);
 }
 
-/*
-static void client_disconnect(struct afb_stub_ws *stubws)
-{
-       if (stubws->fd >= 0) {
-               afb_ws_destroy(stubws->ws);
-               stubws->ws = NULL;
-               close(stubws->fd);
-               stubws->fd = -1;
-       }
-}
-*/
-