| 2065 | } |
| 2066 | |
| 2067 | void plugin_request_send(struct plugin *plugin, |
| 2068 | struct jsonrpc_request *req TAKES) |
| 2069 | { |
| 2070 | /* Add to map so we can find it later when routing the response */ |
| 2071 | tal_steal(plugin, req); |
| 2072 | strmap_add(&plugin->plugins->pending_requests, req->id, req); |
| 2073 | /* Add destructor in case plugin dies. */ |
| 2074 | tal_add_destructor2(req, destroy_request, plugin); |
| 2075 | plugin_send(plugin, req->stream); |
| 2076 | /* plugin_send steals the stream, so remove the dangling |
| 2077 | * pointer here */ |
| 2078 | req->stream = NULL; |
| 2079 | } |
| 2080 | |
| 2081 | void *plugins_exclusive_loop(struct plugin **plugins) |
| 2082 | { |
no test coverage detected