| 817 | } |
| 818 | |
| 819 | void send_custommsg(struct daemon *daemon, const u8 *msg) |
| 820 | { |
| 821 | struct node_id id; |
| 822 | u8 *custommsg; |
| 823 | struct peer *peer; |
| 824 | |
| 825 | if (!fromwire_connectd_custommsg_out(tmpctx, msg, &id, &custommsg)) |
| 826 | master_badmsg(WIRE_CONNECTD_CUSTOMMSG_OUT, msg); |
| 827 | |
| 828 | /* Races can happen: this might be gone by now. */ |
| 829 | peer = peer_htable_get(daemon->peers, &id); |
| 830 | if (peer) |
| 831 | inject_peer_msg(peer, take(custommsg)); |
| 832 | } |
| 833 | |
| 834 | static void handle_ping_in(struct peer *peer, const u8 *msg) |
| 835 | { |
no test coverage detected