Trying to fix getpeername (sigh).

This commit is contained in:
lotodore
2009-04-10 22:22:55 +00:00
parent c89069dcdc
commit 07fb61c4d7
+1
View File
@@ -193,6 +193,7 @@ ServerAcceptThread::AcceptLoop()
// Retrieve peer address.
socklen_t addrLen = (socklen_t)context.GetServerSockaddrSize();
tmpData->GetPeerAddr()->sa_family = context.GetAddrFamily();
if (getpeername(tmpData->GetSocket(), tmpData->GetPeerAddr(), &addrLen) != 0)
{
// Something went wrong with the connection, just continue (socket will be closed).