| 843 | } |
| 844 | |
| 845 | void subd_send_msg(struct subd *sd, const u8 *msg_out) |
| 846 | { |
| 847 | u16 type = fromwire_peektype(msg_out); |
| 848 | /* FIXME: We should use unique upper bits for each daemon, then |
| 849 | * have generate-wire.py add them, just assert here. */ |
| 850 | if (strstarts(sd->msgname(type), "UNKNOWN")) |
| 851 | fatal("Sending %s an invalid message %s", sd->name, tal_hex(tmpctx, msg_out)); |
| 852 | msg_enqueue(sd->outq, msg_out); |
| 853 | } |
| 854 | |
| 855 | void subd_send_fd(struct subd *sd, int fd) |
| 856 | { |
no test coverage detected