From 5b406094e40e1e4e2bc27d452bac7c8043fc7476 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 31 Aug 2010 11:59:09 -0400 Subject: [PATCH 1/2] Change failure of setsockopt SO_REUSEADDR to be a warning, not set an error It was previously setting an error but then continuing, which is not allowed since errors can't be "piled up" --- dbus/dbus-sysdeps-unix.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index b58d09a..98d344b 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -701,9 +701,8 @@ _dbus_listen_unix_socket (const char *path, reuseaddr = 1; if (setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1) { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Failed to set socket option\"%s\": %s", - path, _dbus_strerror (errno)); + _dbus_warn ("Failed to set socket option\"%s\": %s", + path, _dbus_strerror (errno)); } if (bind (listen_fd, (struct sockaddr*) &addr, _DBUS_STRUCT_OFFSET (struct sockaddr_un, sun_path) + path_len) < 0) @@ -928,9 +927,8 @@ _dbus_listen_tcp_socket (const char *host, reuseaddr = 1; if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1) { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Failed to set socket option \"%s:%s\": %s", - host ? host : "*", port, _dbus_strerror (errno)); + _dbus_warn ("Failed to set socket option \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror (errno)); } if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) < 0) -- 1.7.0.4