aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/BootstrapConnection.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/BootstrapConnection.cpp b/src/BootstrapConnection.cpp
index ccd2141..4691462 100644
--- a/src/BootstrapConnection.cpp
+++ b/src/BootstrapConnection.cpp
@@ -55,7 +55,7 @@ namespace sibs
if(addressFamily == AF_INET)
{
in_addr_t ipv4Address = deserializer.extract<u32>();
- u16 port = deserializer.extract<u32>();
+ u16 port = deserializer.extract<u16>();
Ipv4 newPeerAddress;
newPeerAddress.address.sin_family = addressFamily;
newPeerAddress.address.sin_addr.s_addr = ipv4Address;
@@ -74,7 +74,10 @@ namespace sibs
}, std::bind(&BootstrapConnection::receiveDataFromPeer, this, listenerCallbackFunc, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
}
else
+ {
Log::error("BootstrapConnection: Unknown address family: %d", addressFamily);
+ return;
+ }
}
}