MCPcopy Create free account
hub / github.com/ElementsProject/lightning / msg_dequeue

Function msg_dequeue

common/msg_queue.c:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49const u8 *msg_dequeue(struct msg_queue *q)
50{
51 size_t n = tal_count(q->q);
52 const u8 *msg;
53
54 if (!n)
55 return NULL;
56
57 msg = q->q[0];
58 memmove(q->q, q->q + 1, sizeof(*q->q) * (n-1));
59 tal_resize(&q->q, n-1);
60 return msg;
61}
62
63int msg_extract_fd(const struct msg_queue *q, const u8 *msg)
64{

Callers 6

write_to_peerFunction · 0.85
write_to_subdFunction · 0.85
mainFunction · 0.85
msg_send_nextFunction · 0.85
daemon_conn_write_nextFunction · 0.85
daemon_conn_sync_flushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected