| 832 | } |
| 833 | |
| 834 | void subd_send_msg(struct subd *sd, const u8 *msg_out) |
| 835 | { |
| 836 | u16 type = fromwire_peektype(msg_out); |
| 837 | /* FIXME: We should use unique upper bits for each daemon, then |
| 838 | * have generate-wire.py add them, just assert here. */ |
| 839 | if (strstarts(sd->msgname(type), "INVALID")) |
| 840 | fatal("Sending %s an invalid message %s", sd->name, tal_hex(tmpctx, msg_out)); |
| 841 | msg_enqueue(sd->outq, msg_out); |
| 842 | } |
| 843 | |
| 844 | void subd_send_fd(struct subd *sd, int fd) |
| 845 | { |
no test coverage detected