event/ServerSocket: open sockets in the order they were configured
Use a std::list which can be appended at the end.
This commit is contained in:
parent
7adfea8ca2
commit
bcae86196c
1
NEWS
1
NEWS
|
@ -3,6 +3,7 @@ ver 0.18.1 (2013/11/??)
|
|||
- always ignore whitespace at the end of the line
|
||||
* networking:
|
||||
- log UNIX domain path names instead of "localhost"
|
||||
- open listener sockets in the order they were configured
|
||||
* filter:
|
||||
- autoconvert: fix "volume_normalization" with mp3 files
|
||||
* add missing files to source tarball
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue