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

Function extract_fd

common/msg_queue.c:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13};
14
15static int extract_fd(const u8 *msg)
16{
17 const u8 *p = msg + sizeof(u16);
18 size_t len = tal_count(msg) - sizeof(u16);
19
20 if (fromwire_peektype(msg) != MSG_PASS_FD)
21 return -1;
22
23 return fromwire_u32(&p, &len);
24}
25
26/* Close any fds left in queue! */
27static void destroy_msg_queue(struct msg_queue *q)

Callers 2

destroy_msg_queueFunction · 0.85
msg_extract_fdFunction · 0.85

Calls 2

fromwire_peektypeFunction · 0.85
fromwire_u32Function · 0.50

Tested by

no test coverage detected