| 813 | } |
| 814 | |
| 815 | struct subd *new_channel_subd_(const tal_t *ctx, |
| 816 | struct lightningd *ld, |
| 817 | const char *name, |
| 818 | void *channel, |
| 819 | const struct node_id *node_id, |
| 820 | struct logger *base_log, |
| 821 | bool talks_to_peer, |
| 822 | const char *(*msgname)(int msgtype), |
| 823 | unsigned int (*msgcb)(struct subd *, const u8 *, |
| 824 | const int *fds), |
| 825 | void (*errcb)(void *channel, |
| 826 | struct peer_fd *peer_fd, |
| 827 | const char *desc, |
| 828 | const u8 *err_for_them, |
| 829 | bool disconnect, |
| 830 | bool warning), |
| 831 | void (*billboardcb)(void *channel, bool perm, |
| 832 | const char *happenings), |
| 833 | ...) |
| 834 | { |
| 835 | va_list ap; |
| 836 | struct subd *sd; |
| 837 | |
| 838 | va_start(ap, billboardcb); |
| 839 | sd = new_subd(ctx, ld, name, channel, node_id, base_log, |
| 840 | talks_to_peer, msgname, msgcb, errcb, billboardcb, &ap); |
| 841 | va_end(ap); |
| 842 | return sd; |
| 843 | } |
| 844 | |
| 845 | void subd_send_msg(struct subd *sd, const u8 *msg_out) |
| 846 | { |
nothing calls this directly
no test coverage detected