Synchronous routine to send command and extract fields from response */
| 841 | |
| 842 | /* Synchronous routine to send command and extract fields from response */ |
| 843 | void rpc_scan(struct command *cmd, |
| 844 | const char *method, |
| 845 | const struct json_out *params TAKES, |
| 846 | const char *guide, |
| 847 | ...) |
| 848 | { |
| 849 | const char *err; |
| 850 | va_list ap; |
| 851 | |
| 852 | va_start(ap, guide); |
| 853 | err = rpc_scan_core(tmpctx, cmd->plugin, method, params, guide, ap); |
| 854 | va_end(ap); |
| 855 | |
| 856 | if (err) |
| 857 | plugin_err(cmd->plugin, "Could not parse %s in reply to %s: %s", |
| 858 | guide, method, err); |
| 859 | } |
| 860 | |
| 861 | void json_add_keypath(struct json_out *jout, |
| 862 | const char *fieldname, |