| 153 | } |
| 154 | |
| 155 | static void inject_onionmsg_reply(struct subd *connectd, |
| 156 | const u8 *reply, |
| 157 | const int *fds UNUSED, |
| 158 | struct command *cmd) |
| 159 | { |
| 160 | char *err; |
| 161 | |
| 162 | if (!fromwire_connectd_inject_onionmsg_reply(cmd, reply, &err)) { |
| 163 | log_broken(connectd->ld->log, "bad onionmsg_reply: %s", |
| 164 | tal_hex(tmpctx, reply)); |
| 165 | return; |
| 166 | } |
| 167 | |
| 168 | if (strlen(err) == 0) |
| 169 | was_pending(command_success(cmd, json_stream_success(cmd))); |
| 170 | else |
| 171 | was_pending(command_fail(cmd, LIGHTNINGD, "%s", err)); |
| 172 | } |
| 173 | |
| 174 | static struct command_result *json_injectonionmessage(struct command *cmd, |
| 175 | const char *buffer, |
nothing calls this directly
no test coverage detected