| 1998 | } |
| 1999 | |
| 2000 | static struct command_result *splice_dryrun(struct command *cmd, |
| 2001 | struct splice_cmd *splice_cmd) |
| 2002 | { |
| 2003 | char **lines; |
| 2004 | unsigned int i; |
| 2005 | struct json_stream *response; |
| 2006 | const char *str; |
| 2007 | |
| 2008 | response = jsonrpc_stream_success(cmd); |
| 2009 | json_array_start(response, "dryrun"); |
| 2010 | |
| 2011 | str = splicearr_to_string(response, splice_cmd->actions); |
| 2012 | lines = tal_strsplit(response, take(str), "\n", STR_NO_EMPTY); |
| 2013 | for (i = 0; lines[i] != NULL; i++) |
| 2014 | json_add_string(response, NULL, lines[i]); |
| 2015 | json_array_end(response); |
| 2016 | return command_finished(cmd, response); |
| 2017 | } |
| 2018 | |
| 2019 | static struct command_result *handle_splice_cmd(struct command *cmd, |
| 2020 | struct splice_cmd *splice_cmd) |
no test coverage detected