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

Function subd_req_

lightningd/subd.c:860–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858}
859
860struct subd_req *subd_req_(const tal_t *ctx,
861 struct subd *sd,
862 const u8 *msg_out,
863 int fd_out, size_t num_fds_in,
864 void (*replycb)(struct subd *, const u8 *, const int *, void *),
865 void *replycb_data TAKES)
866{
867 /* Grab type now in case msg_out is taken() */
868 int type = fromwire_peektype(msg_out);
869
870 subd_send_msg(sd, msg_out);
871 if (fd_out >= 0)
872 subd_send_fd(sd, fd_out);
873
874 return add_req(ctx, sd, type, num_fds_in, replycb, replycb_data);
875}
876
877/* SIGALRM terminates by default: we just want it to interrupt waitpid(),
878 * which is implied by "handling" it. */

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected