| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Several users had problems with binding MPD to "localhost". The cause
was duplicate /etc/hosts entries: the resolver library returns
127.0.0.1 twice, and of course, MPD attempts to bind to "both" of
them. This patch makes failures non-fatal, given that at least one
address was bound successfully. This is a workaround; users should
rather fix their /etc/hosts file.
|
| |
|
|
|
|
| |
Dump each socket address before binding to it.
|
| |
|
|
|
|
| |
Moved code from listen_add_address() (listen.c) to socket_util.c.
|
|
|
|
|
|
|
|
| |
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
|
|
|
|
|
| |
When the unix domain socket path is too long, don't abort with
g_error().
|
| |
|
|
|
|
|
| |
During the listen_add_host() API transition, the windows code wasn't
tested, and several removed arguments are still in use there.
|
|
|
|
|
|
| |
The generic sockaddr struct is too small for some addresses. For
accept(), we have to allocate a sockaddr_storage struct on the stack,
which is large enough for all addresses.
|
|
|
|
|
| |
Removed the sockaddr_to_tmp_string() hack, use
the new function sockaddr_to_string() instead.
|
|
|
|
| |
Work around gcc warnings by casting the parameters to void.
|
|
|
|
|
| |
Don't explicitly check is_ipv6_enabled(), just try calling
listen_add_port_ipv6(), but check its error code.
|
|
|
|
| |
Some more code simplification.
|
|
|
|
|
| |
For default bind_to_address settings, don't call
listen_add_config_param(NULL), use listen_add_port() directly.
|
|
|
|
|
| |
Split code from the rather large function listen_add_config_param(),
part 3.
|
|
|
|
|
| |
Split code from the rather large function listen_add_config_param(),
part 2.
|
|
|
|
| |
Split code from the rather large function listen_add_config_param().
|
|
|
|
|
| |
Don't return -1 on failure, and abort on fatal error - do proper error
reporting with GError, and return false on failure.
|
| |
|
|
|
|
| |
Renamed functions.
|
|
|
|
| |
port number
|
|
|
|
|
| |
All config_get_block_*() functions should accept constant config_param
pointers.
|
|
|
|
|
| |
Simplify some code by using config_get_positive(), instead of doing
manual parsing and validation each time.
|
|
|
|
| |
Renamed functions, types, variables.
|
| |
|
|
|
|
|
| |
The function ipv6Supported() is not used at all when IPv6 support was
disabled at compile time.
|
|
|
|
| |
Free memory before exiting.
|
|
|
|
|
| |
Make the listen socket an object, allowing us to add more fields
later. Convert listenSockets into a simple linked list.
|
| |
|
| |
|
|
|
|
| |
WIN32 has no getaddrinfo(). Fall back to gethostbyname().
|
|
|
|
|
|
|
| |
This is a rather huge patch, which unfortunately cannot be splitted.
Instead of using our custom ioops.h library, convert everything to use
the GLib main loop.
|
|
|
|
|
| |
There is no point in making the server socket non-blocking. We call
accept() only after select() has notified us about a new connection.
|
|
|
|
|
| |
On Windows, socket declarations reside in winsock.h and ws2tcpip.h.
The POSIX headers are not available.
|
|
|
|
|
| |
redirect_stdin() is a daemonization function, and disconnecting from
the standard input is always a good idea for MPD.
|
|
|
|
|
| |
Merged freeAllListenSockets() into closeAllListenSockets(), because
this is its only caller.
|
| |
|
|
|
|
|
| |
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
|
|
|
| |
Add a G_GNUC_UNUSED attribute.
|
|
|
|
|
| |
AI_ADDRCONFIG is not available on all operating systems. Check if it
is defined in the current build environment.
|
|
|
|
|
| |
The getaddrinfo() flag AI_PASSIVE should be used when resolving
addresses for the bind() system call.
|
|
|
|
|
|
|
|
|
| |
The listen.c module breaks the build because the variable name used
("sun") for the Unix domain socket part collides with something else
on an OpenSolaris system, likely Sun specific. Renaming it to _sun
(or something else of choice) fixes the build.
[mk: renamed to "s_un"]
|
|
|
|
|
|
| |
Depending on MPD's umask, the file permissions of the unix socket were
too restrictive, and many clients were not able to connect. Do a
chmod(0666) on the socket, to allow everybody to connect.
|
|
|
|
| |
The macro name is HAVE_STRUCT_UCRED, not HAVE_UCRED.
|
|
|
|
| |
The local variable "passcred" was only used by ucred code.
|
|
|
|
|
|
|
|
|
|
|
| |
By default, glibc 2.8 hides struct ucred behind the _GNU_SOURCE
macro. I don't want to enable that globally, because it may encourage
the use of non-portable functions. Test if "struct ucred" is
available, and enable _GNU_SOURCE if required.
For details about that issue, see glib's bug database:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=6545
|
|
|
|
|
| |
Enable authentication over unix sockets. Store the client's uid in
the client struct.
|
|
|
|
|
|
| |
The caller already knows the protocol family, and we can eliminate the
complicated switch statement in establishListen() if we just pass this
information. This seems more robust.
|
|
|
|
|
| |
getaddrinfo() is more robust and has proper IPv6 support. The new
code tries to bind to all IP addresses returned by getaddrinfo().
|