Skip to content

Commit

Permalink
openingd: fix compile error caused by merge.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rustyrussell committed Jun 12, 2019
1 parent c0475d0 commit 4c118bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lightningd/opening_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 4c118bc

Please sign in to comment.