Synchronous routine to send command and extract fields from response */
| 567 | |
| 568 | /* Synchronous routine to send command and extract fields from response */ |
| 569 | void rpc_scan(struct plugin *plugin, |
| 570 | const char *method, |
| 571 | const struct json_out *params TAKES, |
| 572 | const char *guide, |
| 573 | ...) |
| 574 | { |
| 575 | const char *err; |
| 576 | va_list ap; |
| 577 | |
| 578 | va_start(ap, guide); |
| 579 | err = rpc_scan_core(tmpctx, plugin, method, params, guide, ap); |
| 580 | va_end(ap); |
| 581 | |
| 582 | if (err) |
| 583 | plugin_err(plugin, "Could not parse %s in reply to %s: %s", |
| 584 | guide, method, err); |
| 585 | } |
| 586 | |
| 587 | static void json_add_keypath(struct json_out *jout, const char *fieldname, const char *path) |
| 588 | { |