From 6971a06b04b3fdd48b61202b2276e8140f4b7be0 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 21 Apr 2004 22:13:07 +0000 Subject: 2004-04-21 Kristian Høgsberg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- dbus/dbus-server-unix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dbus/dbus-server-unix.c') 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=") || -- cgit