summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-server-unix.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2004-04-21 22:13:07 +0000
committerKristian Høgsberg <krh@redhat.com>2004-04-21 22:13:07 +0000
commit6971a06b04b3fdd48b61202b2276e8140f4b7be0 (patch)
treeafff44ba475c63c2c3c03c53d4be9886d94dbea9 /dbus/dbus-server-unix.c
parentdd8b1b1d654c983ccc040b59143a11f239de0726 (diff)
2004-04-21 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-server-unix.c (unix_finalize): Don't unref unix_server->watch here, it is unreffed in disconnect. (_dbus_server_new_for_tcp_socket): convert NULL host to "localhost" here so we don't append NULL to address. * dbus/dbus-server.c (_dbus_server_test): Add test case for various addresses, including tcp with no explicit host.
Diffstat (limited to 'dbus/dbus-server-unix.c')
-rw-r--r--dbus/dbus-server-unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c
index e0400290..a1d7b4ce 100644
--- a/dbus/dbus-server-unix.c
+++ b/dbus/dbus-server-unix.c
@@ -59,9 +59,6 @@ unix_finalize (DBusServer *server)
{
DBusServerUnix *unix_server = (DBusServerUnix*) server;
- if (unix_server->watch)
- _dbus_watch_unref (unix_server->watch);
-
dbus_free (unix_server->socket_name);
_dbus_server_finalize_base (server);
@@ -368,6 +365,9 @@ _dbus_server_new_for_tcp_socket (const char *host,
return NULL;
}
+ if (host == NULL)
+ host = "localhost";
+
if (!_dbus_string_append (&address, "tcp:host=") ||
!_dbus_string_append (&address, host) ||
!_dbus_string_append (&address, ",port=") ||