| 696 | } |
| 697 | |
| 698 | static void connect_init_done(struct subd *connectd, |
| 699 | const u8 *reply, |
| 700 | const int *fds UNUSED, |
| 701 | void *unused UNUSED) |
| 702 | { |
| 703 | struct lightningd *ld = connectd->ld; |
| 704 | char *errmsg; |
| 705 | |
| 706 | if (!fromwire_connectd_init_reply(ld, reply, |
| 707 | &ld->binding, |
| 708 | &ld->announceable, |
| 709 | &errmsg)) |
| 710 | fatal("Bad connectd_init_reply: %s", |
| 711 | tal_hex(reply, reply)); |
| 712 | |
| 713 | /* connectd can fail in *informative* ways: don't use fatal() here and |
| 714 | * confuse things with a backtrace! */ |
| 715 | if (errmsg) { |
| 716 | log_broken(connectd->log, "%s", errmsg); |
| 717 | exit(1); |
| 718 | } |
| 719 | |
| 720 | /* Break out of loop, so we can begin */ |
| 721 | log_debug(connectd->ld->log, "io_break: %s", __func__); |
| 722 | io_break(connectd); |
| 723 | } |
| 724 | |
| 725 | int connectd_init(struct lightningd *ld) |
| 726 | { |