diff options
author | Max Kellermann <max@duempel.org> | 2013-11-04 20:10:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-04 20:10:46 +0100 |
commit | bcae86196c44baf198534ecec20dc1b8908992f8 (patch) | |
tree | 604d4cb42088b2f9a0e3874e3da56962d7d8e4f8 /src | |
parent | 7adfea8ca268162f10f9b1e1ec3a3322f14928a0 (diff) | |
download | mpd-bcae86196c44baf198534ecec20dc1b8908992f8.tar.gz mpd-bcae86196c44baf198534ecec20dc1b8908992f8.tar.xz mpd-bcae86196c44baf198534ecec20dc1b8908992f8.zip |
event/ServerSocket: open sockets in the order they were configured
Use a std::list which can be appended at the end.
Diffstat (limited to '')
-rw-r--r-- | src/event/ServerSocket.cxx | 6 | ||||
-rw-r--r-- | src/event/ServerSocket.hxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 081362882..24213ab9e 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -297,10 +297,10 @@ ServerSocket::Close() OneServerSocket & ServerSocket::AddAddress(const sockaddr &address, size_t address_length) { - sockets.emplace_front(loop, *this, next_serial, - &address, address_length); + sockets.emplace_back(loop, *this, next_serial, + &address, address_length); - return sockets.front(); + return sockets.back(); } bool diff --git a/src/event/ServerSocket.hxx b/src/event/ServerSocket.hxx index 6143d273a..facb10371 100644 --- a/src/event/ServerSocket.hxx +++ b/src/event/ServerSocket.hxx @@ -20,7 +20,7 @@ #ifndef MPD_SERVER_SOCKET_HXX #define MPD_SERVER_SOCKET_HXX -#include <forward_list> +#include <list> #include <stddef.h> @@ -41,7 +41,7 @@ class ServerSocket { EventLoop &loop; - std::forward_list<OneServerSocket> sockets; + std::list<OneServerSocket> sockets; unsigned next_serial; |