| 1087 | } |
| 1088 | |
| 1089 | static struct command_result *json_disconnect(struct command *cmd, |
| 1090 | const char *buf, |
| 1091 | const jsmntok_t *params) |
| 1092 | { |
| 1093 | struct node_id id; |
| 1094 | const char *err; |
| 1095 | |
| 1096 | err = json_scan(tmpctx, buf, params, |
| 1097 | "{disconnect:{id:%}}", |
| 1098 | JSON_SCAN(json_to_node_id, &id)); |
| 1099 | if (err) |
| 1100 | plugin_err(cmd->plugin, |
| 1101 | "`disconnect` notification payload did not" |
| 1102 | " scan %s: %.*s", |
| 1103 | err, json_tok_full_len(params), |
| 1104 | json_tok_full(buf, params)); |
| 1105 | |
| 1106 | plugin_log(cmd->plugin, LOG_DBG, |
| 1107 | "Cleaning up inflights for peer id %s", |
| 1108 | fmt_node_id(tmpctx, &id)); |
| 1109 | |
| 1110 | cleanup_peer_pending_opens(cmd, &id); |
| 1111 | |
| 1112 | return notification_handled(cmd); |
| 1113 | } |
| 1114 | |
| 1115 | static struct command_result * |
| 1116 | delete_channel_from_datastore(struct command *cmd, |
nothing calls this directly
no test coverage detected