Browse Source

Append EOL to json dumps when no bkeys are appended

master
ckolivas 9 years ago
parent
commit
41db95b213
  1. 6
      src/connector.c

6
src/connector.c

@ -931,7 +931,7 @@ static void send_client(cdata_t *cdata, const int64_t id, char *buf, int slen, i
} }
json_append_bkeys(val, bkey, blen); json_append_bkeys(val, bkey, blen);
free(buf); free(buf);
buf = json_dumps(val, JSON_COMPACT); buf = json_dumps(val, JSON_COMPACT | JSON_EOL);
json_decref(val); json_decref(val);
} }
LOGDEBUG("Message for node: %s", buf); LOGDEBUG("Message for node: %s", buf);
@ -984,7 +984,7 @@ static void send_client(cdata_t *cdata, const int64_t id, char *buf, int slen, i
json_object_set_new_nocheck(val, "server", json_integer(client->server)); json_object_set_new_nocheck(val, "server", json_integer(client->server));
if (bkey) if (bkey)
json_append_bkeys(val, bkey, blen); json_append_bkeys(val, bkey, blen);
msg = json_dumps(val, JSON_COMPACT); msg = json_dumps(val, JSON_COMPACT | JSON_EOL);
json_decref(val); json_decref(val);
send_proc(ckp->stratifier, msg); send_proc(ckp->stratifier, msg);
free(msg); free(msg);
@ -1004,7 +1004,7 @@ static void send_client(cdata_t *cdata, const int64_t id, char *buf, int slen, i
} }
free(buf); free(buf);
json_append_bkeys(val, bkey, blen); json_append_bkeys(val, bkey, blen);
buf = json_dumps(val, JSON_COMPACT); buf = json_dumps(val, JSON_COMPACT | JSON_EOL);
json_decref(val); json_decref(val);
} }
out: out:

Loading…
Cancel
Save