Migrating daemon_conn to msg_queue and msg_queue takes over messages

We have some duplication in handling queues, so this is an attempt at
deduplicating some of that work. `daemon_conn` now uses the
`msg_queue` and `channeld` was also migrated to `msg_queue`. At the
same time I made `msg_queue` create a copy of the messages or takes
over messages marked with `take()`. This should make cleaning up
messages easier.
This commit is contained in:
Christian Decker
2017-03-13 17:24:05 +01:00
parent 05e64db6cd
commit 8ae698d1dc
6 changed files with 15 additions and 50 deletions

View File

@@ -7,6 +7,7 @@
struct msg_queue {
const u8 **q;
const tal_t *ctx;
};
void msg_queue_init(struct msg_queue *q, const tal_t *ctx);