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

Function subd_req_

lightningd/subd.c:849–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847}
848
849struct subd_req *subd_req_(const tal_t *ctx,
850 struct subd *sd,
851 const u8 *msg_out,
852 int fd_out, size_t num_fds_in,
853 void (*replycb)(struct subd *, const u8 *, const int *, void *),
854 void *replycb_data)
855{
856 /* Grab type now in case msg_out is taken() */
857 int type = fromwire_peektype(msg_out);
858
859 subd_send_msg(sd, msg_out);
860 if (fd_out >= 0)
861 subd_send_fd(sd, fd_out);
862
863 return add_req(ctx, sd, type, num_fds_in, replycb, replycb_data);
864}
865
866/* SIGALRM terminates by default: we just want it to interrupt waitpid(),
867 * which is implied by "handling" it. */

Callers

nothing calls this directly

Calls 4

add_reqFunction · 0.85
subd_send_msgFunction · 0.70
subd_send_fdFunction · 0.70
fromwire_peektypeFunction · 0.50

Tested by

no test coverage detected