diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-05-12 03:52:02 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-05-12 19:21:39 -0700 |
commit | 0cf29634f36160c69d2759456315df878793e23f (patch) | |
tree | a317fae7e7423863976c3b1dccf94b6186d94e58 | |
parent | f20d1e390f25dd9f566c69968286b2ff4406ca87 (diff) |
binding: bluetooth-map: remove training newline from message parsing
Bug-AGL: SPEC-2351 SPEC-2392
Change-Id: I17713334bfcf941a9d766acb34cdde7c26fcf701
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r-- | binding/bluetooth-map-bmessage.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/binding/bluetooth-map-bmessage.c b/binding/bluetooth-map-bmessage.c index 146c7db..ab51b51 100644 --- a/binding/bluetooth-map-bmessage.c +++ b/binding/bluetooth-map-bmessage.c @@ -151,6 +151,9 @@ static gboolean __bmessage_parse(gchar **msg, json_object *jresp) expect(&msg, "END:BENV", NULL); expect(&msg, "END:BMSG", NULL); + // remove trailing \n + message->str[message->len - 1] = '\0'; + json_object_object_add(jresp, "message", json_object_new_string(message->str)); g_string_free(message, TRUE); |