| 2517 | } |
| 2518 | |
| 2519 | void plugin_request_send(struct plugin *plugin, |
| 2520 | struct jsonrpc_request *req) |
| 2521 | { |
| 2522 | /* Add to map so we can find it later when routing the response */ |
| 2523 | strmap_add(&plugin->pending_requests, req->id, req); |
| 2524 | /* Add destructor in case request is freed. */ |
| 2525 | tal_add_destructor2(req, destroy_request, plugin); |
| 2526 | |
| 2527 | plugin_send(plugin, req->stream); |
| 2528 | /* plugin_send steals the stream, so remove the dangling |
| 2529 | * pointer here */ |
| 2530 | req->stream = NULL; |
| 2531 | } |
| 2532 | |
| 2533 | void *plugins_exclusive_loop(struct plugin **plugins) |
| 2534 | { |
no test coverage detected