X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fafb-websock.c;h=878df0425e8fe3b443077b2c37cbf8322ca14918;hb=83ce3b29a598141f8f28afde655beb07ec78c312;hp=1292d1f1467bd0c65811e0adeb516d525f689511;hpb=fc19b7d7974f9c64dffc40e180464d595a9805cd;p=src%2Fapp-framework-binder.git diff --git a/src/afb-websock.c b/src/afb-websock.c index 1292d1f1..878df042 100644 --- a/src/afb-websock.c +++ b/src/afb-websock.c @@ -30,8 +30,6 @@ #include "websock.h" -#include "local-def.h" - #include "afb-req-itf.h" #include "afb-method.h" #include "afb-hreq.h" @@ -369,9 +367,7 @@ static int aws_handle_json(struct afb_websock *aws, struct json_object *obj) r.data = wsreq; r.itf = &wsreq_itf; - rc = afb_apis_handle(r, aws->context, api, lenapi, verb, lenverb); - if (rc == 0) - wsreq_fail(wsreq, "ail", "api not found"); + afb_apis_call(r, aws->context, api, lenapi, verb, lenverb); return 1; error: @@ -416,11 +412,12 @@ static struct afb_arg wsreq_get(struct afb_wsreq *wsreq, const char *name) if (json_object_object_get_ex(wsreq->request, name, &value)) { arg.name = name; arg.value = json_object_get_string(value); + arg.size = strlen(arg.value); } else { arg.name = NULL; arg.value = NULL; + arg.size = 0; } - arg.size = 0; arg.path = NULL; return arg; }