Make the test for #53499 more obviously correct
[platform/upstream/dbus.git] / dbus / dbus-transport-socket.c
index 1d4c2bf..544d00a 100644 (file)
@@ -677,8 +677,8 @@ do_writing (DBusTransport *transport)
               _dbus_string_set_length (&socket_transport->encoded_outgoing, 0);
               _dbus_string_compact (&socket_transport->encoded_outgoing, 2048);
 
-              _dbus_connection_message_sent (transport->connection,
-                                             message);
+              _dbus_connection_message_sent_unlocked (transport->connection,
+                                                      message);
             }
         }
     }
@@ -1278,8 +1278,10 @@ _dbus_transport_new_for_socket (int               fd,
   return (DBusTransport*) socket_transport;
 
  failed_4:
+  _dbus_watch_invalidate (socket_transport->read_watch);
   _dbus_watch_unref (socket_transport->read_watch);
  failed_3:
+  _dbus_watch_invalidate (socket_transport->write_watch);
   _dbus_watch_unref (socket_transport->write_watch);
  failed_2:
   _dbus_string_free (&socket_transport->encoded_incoming);
@@ -1335,12 +1337,12 @@ _dbus_transport_new_for_tcp_socket (const char     *host,
     goto error;
 
   if (family != NULL &&
-      (!_dbus_string_append (&address, "family=") ||
+      (!_dbus_string_append (&address, ",family=") ||
        !_dbus_string_append (&address, family)))
     goto error;
 
   if (noncefile != NULL &&
-      (!_dbus_string_append (&address, "noncefile=") ||
+      (!_dbus_string_append (&address, ",noncefile=") ||
        !_dbus_string_append (&address, noncefile)))
     goto error;