From 88c7ef3c204ac7e640e3ae35b0b29921fcdc83ce Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 13 Jan 2015 12:54:22 +1100 Subject: [PATCH] Use JSON_EOL in connector --- src/connector.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/connector.c b/src/connector.c index 7355f9aa..c23173e1 100644 --- a/src/connector.c +++ b/src/connector.c @@ -1,5 +1,5 @@ /* - * Copyright 2014 Con Kolivas + * Copyright 2014-2015 Con Kolivas * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -618,8 +618,7 @@ static void process_client_msg(cdata_t *cdata, const char *buf) json_object_set_new_nocheck(json_msg, "client_id", json_integer(passthrough_id)); } else client_id = client_id64; - msg = json_dumps(json_msg, 0); - realloc_strcat(&msg, "\n"); + msg = json_dumps(json_msg, JSON_EOL); send_client(cdata, client_id, msg); json_decref(json_msg); }