X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ws-json1.c;h=88f9b358fe6e2cdea3e971bea9ae7978b95c23de;hb=e4f3a7e470ee37967bf50769b469ce209b421e1b;hp=351a5d0980a72d98f762a26354fc1c93e9be2451;hpb=f3a1fb9e40f2d609d128b7a0b3eb3e963cdea0b5;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ws-json1.c b/src/afb-ws-json1.c index 351a5d09..88f9b358 100644 --- a/src/afb-ws-json1.c +++ b/src/afb-ws-json1.c @@ -129,6 +129,10 @@ static void aws_on_hangup(struct afb_ws_json1 *ws) struct afb_wsreq { + /* + * CAUTION: 'context' field should be the first because there + * is an implicit convertion to struct afb_context + */ struct afb_context context; int refcount; struct afb_ws_json1 *aws; @@ -412,7 +416,7 @@ static void aws_emit(struct afb_ws_json1 *aws, int code, const char *id, size_t json_object_array_add(msg, json_object_new_string(token)); /* emits the reply */ - txt = json_object_to_json_string(msg); + txt = json_object_to_json_string_ext(msg, JSON_C_TO_STRING_PLAIN); afb_ws_text(aws->ws, txt, strlen(txt)); json_object_put(msg); }