From b8bdd8237ca51439995e1990bbc4f39f8a96fbfe Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 28 Jun 2019 17:37:10 -0400 Subject: ... --- include/salticidae/network.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/salticidae/network.h b/include/salticidae/network.h index bece509..12392b2 100644 --- a/include/salticidae/network.h +++ b/include/salticidae/network.h @@ -298,7 +298,7 @@ class PeerNetwork: public MsgNetwork { using conn_t = ArcObj; using peer_callback_t = std::function; - using unknown_peer_callback_t = std::function; + using unknown_peer_callback_t = std::function; private: class Peer { @@ -779,8 +779,8 @@ void PeerNetwork::ping_handler(MsgPing &&msg, const conn_t &conn) { pinfo_ulock_t __g(pid2peer_lock); if (!known_peers.count(msg.claimed_addr)) { - this->user_tcall->async_call([this, addr=msg.claimed_addr](ThreadCall::Handle &) { - if (unknown_peer_cb) unknown_peer_cb(addr); + this->user_tcall->async_call([this, addr=msg.claimed_addr, conn](ThreadCall::Handle &) { + if (unknown_peer_cb) unknown_peer_cb(addr, conn->get_peer_cert()); }); this->disp_terminate(conn); return; @@ -1269,7 +1269,7 @@ void peernetwork_listen(peernetwork_t *self, const netaddr_t *listen_addr, Salti typedef void (*peernetwork_peer_callback_t)(const peernetwork_conn_t *, bool connected, void *userdata); void peernetwork_reg_peer_handler(peernetwork_t *self, peernetwork_peer_callback_t cb, void *userdata); -typedef void (*peernetwork_unknown_peer_callback_t)(const netaddr_t *, void *userdata); +typedef void (*peernetwork_unknown_peer_callback_t)(const netaddr_t *, const x509_t *, void *userdata); void peernetwork_reg_unknown_peer_handler(peernetwork_t *self, peernetwork_unknown_peer_callback_t cb, void *userdata); /* ClientNetwork */ -- cgit v1.2.3-70-g09d2