| 12 | static bool dont_shutdown = false; |
| 13 | |
| 14 | static struct command_result *json_helloworld(struct command *cmd, |
| 15 | const char *buf, |
| 16 | const jsmntok_t *params) |
| 17 | { |
| 18 | const char *name; |
| 19 | |
| 20 | if (!param(cmd, buf, params, |
| 21 | p_opt("name", param_string, &name), |
| 22 | NULL)) |
| 23 | return command_param_failed(); |
| 24 | |
| 25 | plugin_notify_message(cmd, LOG_INFORM, "Notification from %s", "json_helloworld"); |
| 26 | if (!name) |
| 27 | name = name_option ? name_option : tal_strdup(tmpctx, "world"); |
| 28 | |
| 29 | return command_success(cmd, json_out_obj(cmd, "hello", name)); |
| 30 | } |
| 31 | |
| 32 | static struct command_result * |
| 33 | json_peer_connected(struct command *cmd, |
nothing calls this directly
no test coverage detected