]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Update ldk_net.c for 0.0.106
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 1 Apr 2022 23:22:31 +0000 (18:22 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 1 Apr 2022 23:22:31 +0000 (18:22 -0500)
ldk-net/ldk_net.c

index f404ddd973d107477968011893a439e5c5c8e997..8bae7af192c1c08b0f41f1bbf1310718fb635c5b 100644 (file)
@@ -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)