X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fafb-websock.c;h=1292d1f1467bd0c65811e0adeb516d525f689511;hb=fc19b7d7974f9c64dffc40e180464d595a9805cd;hp=797724ce5129ec8f33549fa571ce0b8c7af855da;hpb=b75bbfd9bd96ad8bb7174a768ae70cf3e8c5af7a;p=src%2Fapp-framework-binder.git diff --git a/src/afb-websock.c b/src/afb-websock.c index 797724ce..1292d1f1 100644 --- a/src/afb-websock.c +++ b/src/afb-websock.c @@ -27,10 +27,6 @@ #include #include -/* -#include -#include -*/ #include "websock.h" @@ -425,7 +421,7 @@ static struct afb_arg wsreq_get(struct afb_wsreq *wsreq, const char *name) arg.value = NULL; } arg.size = 0; - arg.is_file = 0; + arg.path = NULL; return arg; } @@ -436,7 +432,7 @@ static void wsreq_iterate(struct afb_wsreq *wsreq, int (*iterator)(void *closure struct json_object_iterator end = json_object_iter_end(wsreq->request); arg.size = 0; - arg.is_file = 0; + arg.path = NULL; while(!json_object_iter_equal(&it, &end)) { arg.name = json_object_iter_peek_name(&it); arg.value = json_object_get_string(json_object_iter_peek_value(&it)); @@ -509,6 +505,7 @@ static void wsreq_reply(struct afb_wsreq *wsreq, int retcode, const char *status /* emits the reply */ message = json_object_to_json_string(reply); websock_text(wsreq->aws->ws, message, strlen(message)); + json_object_put(reply); /* TODO eliminates the wsreq */ }