| 17 | #include <wire/wire_sync.h> |
| 18 | |
| 19 | static void destroy_uncommitted_channel(struct uncommitted_channel *uc) |
| 20 | { |
| 21 | struct subd *open_daemon = uc->open_daemon; |
| 22 | |
| 23 | if (open_daemon) { |
| 24 | uc->open_daemon = NULL; |
| 25 | subd_release_channel(open_daemon, uc); |
| 26 | } |
| 27 | |
| 28 | /* This is how shutdown_subdaemons tells us not to delete from db! */ |
| 29 | if (!uc->peer->uncommitted_channel) |
| 30 | return; |
| 31 | |
| 32 | uc->peer->uncommitted_channel = NULL; |
| 33 | |
| 34 | maybe_delete_peer(uc->peer); |
| 35 | } |
| 36 | |
| 37 | struct uncommitted_channel * |
| 38 | new_uncommitted_channel(struct peer *peer) |
nothing calls this directly
no test coverage detected