From 4c118bcdba64e32dddca69adaeb70876bc7f5428 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 12 Jun 2019 12:32:45 +0930 Subject: [PATCH] openingd: fix compile error caused by merge. Compile broke because we were using low-level JSON primitives here (which, incidentally, would produce bad JSON now, since we can't just put a raw string inside an object!). Use json_add_string, which also has the benefit of escaping JSON for us. Signed-off-by: Rusty Russell --- lightningd/opening_control.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index e4b76dc37..c91ec21cc 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -690,9 +690,7 @@ static void opening_funder_failed(struct subd *openingd, const u8 *msg, was_pending(command_fail(uc->fc->cmd, LIGHTNINGD, "%s", desc)); else { response = json_stream_success(uc->fc->cmd); - json_stream_append(response, "\""); - json_stream_append(response, desc); - json_stream_append(response, "\""); + json_add_string(response, "cancelled", desc); was_pending(command_success(uc->fc->cmd, response)); }