2006-10-22 Richard Hult <richard@imendio.com>
* loudmouth/lm-connection.c (connection_do_close)
(lm_connection_send_with_reply_and_block):
- Check that we have the source before removing it and set the pointer
to NULL.
- Fixes LM-60.
--- a/ChangeLog Mon Oct 16 22:03:58 2006 +0000
+++ b/ChangeLog Sun Oct 22 16:48:08 2006 +0000
@@ -1,3 +1,11 @@
+2006-10-22 Richard Hult <richard@imendio.com>
+
+ * loudmouth/lm-connection.c (connection_do_close)
+ (lm_connection_send_with_reply_and_block):
+ - Check that we have the source before removing it and set the pointer
+ to NULL.
+ - Fixes LM-60.
+
2006-10-17 Mikael Hallendal <micke@imendio.com>
* loudmouth/lm-message-node.c: (lm_message_node_to_string):
--- a/loudmouth/lm-connection.c Mon Oct 16 22:03:58 2006 +0000
+++ b/loudmouth/lm-connection.c Sun Oct 22 16:48:08 2006 +0000
@@ -1020,9 +1020,12 @@
connection->fd = -1;
}
-
- g_source_destroy (connection->incoming_source);
- g_source_unref (connection->incoming_source);
+
+ if (connection->incoming_source) {
+ g_source_destroy (connection->incoming_source);
+ g_source_unref (connection->incoming_source);
+ connection->incoming_source = NULL;
+ }
if (!lm_connection_is_open (connection)) {
/* lm_connection_is_open is FALSE for state OPENING as well */
@@ -2233,8 +2236,9 @@
lm_message_node_set_attributes (message->node, "id", id, NULL);
}
- g_source_remove (g_source_get_id (connection->incoming_source));
+ g_source_remove (g_source_get_id (connection->incoming_source));
g_source_unref (connection->incoming_source);
+ connection->incoming_source = NULL;
lm_connection_send (connection, message, error);