summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-connection.c
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-01-25 09:37:49 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-01-25 09:37:49 +0000
commita2a681582929ada667de5d05d5168f8a1f313800 (patch)
tree81a49bb51769b86def6b844403db4c24c8750490 /dbus/dbus-connection.c
parenta1a53c32422230fb76e8e3bca67c877dd2857563 (diff)
2003-01-25 Anders Carlsson <andersca@codefactory.se>
* dbus/dbus-connection.c: (dbus_connection_send_message): * dbus/dbus-message-internal.h: * dbus/dbus-message.c: (_dbus_message_get_client_serial), (dbus_message_write_header): Remove _dbus_messag_unlock and don't set the client serial on a message if one already exists.
Diffstat (limited to 'dbus/dbus-connection.c')
-rw-r--r--dbus/dbus-connection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index 9fcabb9c..f5e3342f 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -644,12 +644,12 @@ dbus_connection_send_message (DBusConnection *connection,
_dbus_verbose ("Message %p added to outgoing queue, %d pending to send\n",
message, connection->n_outgoing);
- /* Unlock the message, resetting its header. */
- _dbus_message_unlock (message);
+ if (_dbus_message_get_client_serial (message) == -1)
+ {
+ serial = _dbus_connection_get_next_client_serial (connection);
+ _dbus_message_set_client_serial (message, serial);
+ }
- serial = _dbus_connection_get_next_client_serial (connection);
- _dbus_message_set_client_serial (message, serial);
-
if (client_serial)
*client_serial = serial;