From: Jeffrey Czyz Date: Fri, 1 Apr 2022 23:22:31 +0000 (-0500) Subject: Update ldk_net.c for 0.0.106 X-Git-Tag: v0.0.106.0~1^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=4a9c2b3cf8ec23923288cbb3961d5b564d168a17;p=ldk-c-bindings Update ldk_net.c for 0.0.106 --- diff --git a/ldk-net/ldk_net.c b/ldk-net/ldk_net.c index f404ddd..8bae7af 100644 --- a/ldk-net/ldk_net.c +++ b/ldk-net/ldk_net.c @@ -214,7 +214,10 @@ static void *sock_thread_fn(void* arg) { if (newfd >= 0) { // Received a new connection, register it! LDKSocketDescriptor new_descriptor = get_descriptor(handler, newfd); - LDKCResult_NonePeerHandleErrorZ con_res = PeerManager_new_inbound_connection(&handler->ldk_peer_manager, new_descriptor); + LDKCOption_NetAddressZ remote_network_address = { + .tag = LDKCOption_NetAddressZ_None, + }; + LDKCResult_NonePeerHandleErrorZ con_res = PeerManager_new_inbound_connection(&handler->ldk_peer_manager, new_descriptor, remote_network_address); if (con_res.result_ok) { if (register_socket(handler, newfd, 0)) shutdown(newfd, SHUT_RDWR); @@ -378,7 +381,10 @@ int socket_connect(void* arg, LDKPublicKey pubkey, struct sockaddr *addr, size_t if (register_socket(handler, fd, 0)) return -4; LDKSocketDescriptor descriptor = get_descriptor(handler, fd); - LDKCResult_CVec_u8ZPeerHandleErrorZ con_res = PeerManager_new_outbound_connection(&handler->ldk_peer_manager, pubkey, descriptor); + LDKCOption_NetAddressZ remote_network_address = { + .tag = LDKCOption_NetAddressZ_None, + }; + LDKCResult_CVec_u8ZPeerHandleErrorZ con_res = PeerManager_new_outbound_connection(&handler->ldk_peer_manager, pubkey, descriptor, remote_network_address); if (con_res.result_ok) { ssize_t write_count = send(fd, con_res.contents.result->data, con_res.contents.result->datalen, MSG_NOSIGNAL); if (write_count != con_res.contents.result->datalen)