From 624550d7e1c032a4d3896ba002aa3ecb895f447c Mon Sep 17 00:00:00 2001 From: Determinant Date: Sun, 30 Jun 2019 17:02:36 -0400 Subject: ... --- src/netaddr.cpp | 1 + src/network.cpp | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/netaddr.cpp b/src/netaddr.cpp index 736d606..96bdaf9 100644 --- a/src/netaddr.cpp +++ b/src/netaddr.cpp @@ -48,6 +48,7 @@ uint16_t netaddr_get_port(const netaddr_t *self) { return self->port; } netaddr_array_t *netaddr_array_new() { return new netaddr_array_t(); } netaddr_array_t *netaddr_array_new_from_addrs(const netaddr_t * const *addrs, size_t naddrs) { auto res = new netaddr_array_t(); + res->resize(naddrs); for (size_t i = 0; i < naddrs; i++) (*res)[i] = *addrs[i]; return res; diff --git a/src/network.cpp b/src/network.cpp index e604eaa..05e7b50 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -155,6 +155,10 @@ const x509_t *msgnetwork_conn_get_peer_cert(const msgnetwork_conn_t *conn) { return (*conn)->get_peer_cert(); } +bool msgnetwork_conn_is_terminated(const msgnetwork_conn_t *conn) { + return (*conn)->is_terminated(); +} + // PeerNetwork peernetwork_config_t *peernetwork_config_new() { -- cgit v1.2.3-70-g09d2