| 584 | } |
| 585 | |
| 586 | void send_custommsg(struct daemon *daemon, const u8 *msg) |
| 587 | { |
| 588 | struct node_id id; |
| 589 | u8 *custommsg; |
| 590 | struct peer *peer; |
| 591 | |
| 592 | if (!fromwire_connectd_custommsg_out(tmpctx, msg, &id, &custommsg)) |
| 593 | master_badmsg(WIRE_CONNECTD_CUSTOMMSG_OUT, msg); |
| 594 | |
| 595 | /* Races can happen: this might be gone by now. */ |
| 596 | peer = peer_htable_get(&daemon->peers, &id); |
| 597 | if (peer) |
| 598 | inject_peer_msg(peer, take(custommsg)); |
| 599 | } |
| 600 | |
| 601 | static void handle_ping_in(struct peer *peer, const u8 *msg) |
| 602 | { |
no test coverage detected