X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fstreamlistensocket.cpp;h=12e98b1f6a2d3b9d40fca5f689f74e2af07a7630;hp=2a8bc3d216e89c85a4a69e1dd17017601c7e4ee7;hb=1b2aabf076169e6d2049227188e464e95ac40514;hpb=35009eb3f51a6fd0f9261f892a85d97d81e69886 diff --git a/source/streamlistensocket.cpp b/source/streamlistensocket.cpp index 2a8bc3d..12e98b1 100644 --- a/source/streamlistensocket.cpp +++ b/source/streamlistensocket.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspnet -Copyright © 2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2008, 2011 Mikkosoft Productions, Mikko Rasa Distributed under the LGPL */ @@ -45,9 +45,9 @@ StreamSocket *StreamListenSocket::accept() if(!listening) throw InvalidState("Socket is not listening"); - sockaddr sa; - socklen_t size=sizeof(sockaddr); - SocketHandle new_h=::accept(handle, &sa, &size); + sockaddr_storage sa; + socklen_t size=sizeof(sockaddr_storage); + SocketHandle new_h=::accept(handle, reinterpret_cast(&sa), &size); RefPtr paddr=SockAddr::create(sa); return new StreamSocket(new_h, *paddr);