X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstreamlistensocket.cpp;h=88a37bf73fb4f6bc3563788f05714b2c1a36350a;hb=2aab4004e71a2e5c773289e0be5e58aec6a8d339;hp=2a8bc3d216e89c85a4a69e1dd17017601c7e4ee7;hpb=3970ee9cf7978c462390d49e083deb740d71c6fe;p=libs%2Fnet.git diff --git a/source/streamlistensocket.cpp b/source/streamlistensocket.cpp index 2a8bc3d..88a37bf 100644 --- a/source/streamlistensocket.cpp +++ b/source/streamlistensocket.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspnet -Copyright © 2008 Mikkosoft Productions, Mikko Rasa -Distributed under the LGPL -*/ - #include #include #include @@ -45,9 +38,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);