| 2505 | } |
| 2506 | |
| 2507 | void plugin_request_send(struct plugin *plugin, |
| 2508 | struct jsonrpc_request *req) |
| 2509 | { |
| 2510 | /* Add to map so we can find it later when routing the response */ |
| 2511 | strmap_add(&plugin->pending_requests, req->id, req); |
| 2512 | /* Add destructor in case request is freed. */ |
| 2513 | tal_add_destructor2(req, destroy_request, plugin); |
| 2514 | |
| 2515 | plugin_send(plugin, req->stream); |
| 2516 | /* plugin_send steals the stream, so remove the dangling |
| 2517 | * pointer here */ |
| 2518 | req->stream = NULL; |
| 2519 | } |
| 2520 | |
| 2521 | void *plugins_exclusive_loop(struct plugin **plugins) |
| 2522 | { |
no test coverage detected