From ac1890136c222871b5bb69f8e459e9fc425d1452 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 21 Feb 2017 15:15:29 +1030 Subject: [PATCH] hsm: rename the hsmctl_hsmfd_ecdh_response to hsmctl_hsmfd_fd_response We want to use it for other HSM fd requests. Signed-off-by: Rusty Russell --- lightningd/hsm/hsm.c | 4 ++-- lightningd/hsm/hsm_control_wire_csv | 2 +- lightningd/peer_control.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lightningd/hsm/hsm.c b/lightningd/hsm/hsm.c index 1a88615ea..2c9eabfe2 100644 --- a/lightningd/hsm/hsm.c +++ b/lightningd/hsm/hsm.c @@ -254,7 +254,7 @@ static u8 *pass_hsmfd_ecdh(struct io_conn *conn, io_new_conn(control, fds[0], ecdh_client, c); *fd_to_pass = fds[1]; - return towire_hsmctl_hsmfd_ecdh_response(control); + return towire_hsmctl_hsmfd_fd_response(control); } static struct io_plan *control_received_req(struct io_conn *conn, @@ -281,7 +281,7 @@ static struct io_plan *control_received_req(struct io_conn *conn, return io_never(conn, control); case WIRE_HSMCTL_INIT_RESPONSE: - case WIRE_HSMCTL_HSMFD_ECDH_RESPONSE: + case WIRE_HSMCTL_HSMFD_FD_RESPONSE: break; } diff --git a/lightningd/hsm/hsm_control_wire_csv b/lightningd/hsm/hsm_control_wire_csv index 7224af3cc..0bf066f44 100644 --- a/lightningd/hsm/hsm_control_wire_csv +++ b/lightningd/hsm/hsm_control_wire_csv @@ -10,7 +10,7 @@ hsmctl_hsmfd_ecdh,3 hsmctl_hsmfd_ecdh,0,unique_id,8 # No message, just an fd. -hsmctl_hsmfd_ecdh_response,103 +hsmctl_hsmfd_fd_response,103 # Shutdown just results in an exit. hsmctl_shutdown,4 diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index bd7f6387f..079fe4ff6 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -136,7 +136,7 @@ static void peer_got_hsmfd(struct subdaemon *hsm, const u8 *msg, { const u8 *req; - if (!fromwire_hsmctl_hsmfd_ecdh_response(msg, NULL)) { + if (!fromwire_hsmctl_hsmfd_fd_response(msg, NULL)) { log_unusual(peer->ld->log, "Malformed hsmfd response: %s", tal_hex(peer, msg)); goto error;