X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspsocket.cpp;h=69c427212a6a2dca85980667158a818d694ba929;hb=6adca3e0997781eae4adb02f19a2f8c312512ae1;hp=709ad443bdf04a9f99cc44afb69b66dcaf18a7e6;hpb=b18e6b5556f2deedf6ebf154477c4d69dcf02638;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 709ad443b..69c427212 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -83,12 +83,12 @@ BufferedSocketError BufferedSocket::BeginConnect(const std::string& ipaddr, int BufferedSocketError BufferedSocket::BeginConnect(const irc::sockets::sockaddrs& dest, const irc::sockets::sockaddrs& bind, unsigned int timeout) { if (fd < 0) - fd = socket(dest.sa.sa_family, SOCK_STREAM, 0); + fd = socket(dest.family(), SOCK_STREAM, 0); if (fd < 0) return I_ERR_SOCKET; - if (bind.sa.sa_family != 0) + if (bind.family() != 0) { if (SocketEngine::Bind(fd, bind) < 0) return I_ERR_BIND; @@ -293,7 +293,7 @@ void StreamSocket::FlushSendQ(SendQueue& sq) const SendQueue::Element& elem = *i; iovecs[j].iov_base = const_cast(elem.data()); iovecs[j].iov_len = elem.length(); - rv_max += elem.length(); + rv_max += iovecs[j].iov_len; } rv = SocketEngine::WriteV(this, iovecs, bufcount); }