summaryrefslogtreecommitdiff
path: root/louloulibs/network
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-28 00:22:20 +0200
committerlouiz’ <louiz@louiz.org>2016-10-31 01:39:35 +0100
commit3e7c8ab4bc1ea15f02dbeee51ca8894bdd70eeab (patch)
treedec5e8ee24bca0bc68c8894d6c75969338c28921 /louloulibs/network
parent911258bc65b3855022ee2715454076cf818d7098 (diff)
downloadbiboumi-3e7c8ab4bc1ea15f02dbeee51ca8894bdd70eeab.tar.gz
biboumi-3e7c8ab4bc1ea15f02dbeee51ca8894bdd70eeab.tar.bz2
biboumi-3e7c8ab4bc1ea15f02dbeee51ca8894bdd70eeab.tar.xz
biboumi-3e7c8ab4bc1ea15f02dbeee51ca8894bdd70eeab.zip
Trivial cleanup
Diffstat (limited to 'louloulibs/network')
-rw-r--r--louloulibs/network/socket_handler.hpp2
-rw-r--r--louloulibs/network/tcp_socket_handler.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/louloulibs/network/socket_handler.hpp b/louloulibs/network/socket_handler.hpp
index eeb41fe..ea79a18 100644
--- a/louloulibs/network/socket_handler.hpp
+++ b/louloulibs/network/socket_handler.hpp
@@ -14,7 +14,7 @@ public:
poller(poller),
socket(socket)
{}
- virtual ~SocketHandler() {}
+ virtual ~SocketHandler() = default;
SocketHandler(const SocketHandler&) = delete;
SocketHandler(SocketHandler&&) = delete;
SocketHandler& operator=(const SocketHandler&) = delete;
diff --git a/louloulibs/network/tcp_socket_handler.cpp b/louloulibs/network/tcp_socket_handler.cpp
index 1adbaac..9decee1 100644
--- a/louloulibs/network/tcp_socket_handler.cpp
+++ b/louloulibs/network/tcp_socket_handler.cpp
@@ -292,7 +292,8 @@ void TCPSocketHandler::on_send()
// unconsting the content of s is ok, sendmsg will never modify it
msg_iov[msg.msg_iovlen].iov_base = const_cast<char*>(s.data());
msg_iov[msg.msg_iovlen].iov_len = s.size();
- if (++msg.msg_iovlen == UIO_FASTIOV)
+ msg.msg_iovlen++;
+ if (msg.msg_iovlen == UIO_FASTIOV)
break;
}
ssize_t res = ::sendmsg(this->socket, &msg, MSG_NOSIGNAL);