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

Function msg_extract_fd

common/msg_queue.c:63–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63int msg_extract_fd(const struct msg_queue *q, const u8 *msg)
64{
65 const u8 *p = msg + sizeof(u16);
66 size_t len = tal_count(msg) - sizeof(u16);
67
68 assert(q->fd_passing);
69 if (fromwire_peektype(msg) != MSG_PASS_FD)
70 return -1;
71
72 return fromwire_u32(&p, &len);
73}
74
75void msg_wake(const struct msg_queue *q)
76{

Callers 3

msg_send_nextFunction · 0.85
daemon_conn_write_nextFunction · 0.85
daemon_conn_sync_flushFunction · 0.85

Calls 2

fromwire_peektypeFunction · 0.50
fromwire_u32Function · 0.50

Tested by

no test coverage detected