2003-11-16 Mikael Hallendal <micke@imendio.com>
* loudmouth/lm-connection.c:
(lm_connection_new): Don't create and attach source here
(lm_connection_open): Do it here,
(lm_connection_open_and_block): and here. Fixes #126983.
--- a/ChangeLog Tue Nov 11 12:22:45 2003 +0000
+++ b/ChangeLog Sat Nov 15 23:01:08 2003 +0000
@@ -1,7 +1,12 @@
+2003-11-16 Mikael Hallendal <micke@imendio.com>
+
+ * loudmouth/lm-connection.c:
+ (lm_connection_new): Don't create and attach source here
+ (lm_connection_open): Do it here,
+ (lm_connection_open_and_block): and here. Fixes #126983.
+
2003-11-11 Mikael Hallendal <micke@imendio.com>
- * Makefile.am:
- - Added README.WIN32 so it will be distributed next release.
* loudmouth/lm-connection.c:
(connection_do_close): Remove the incoming source. Reported and fix
proposed by Christopher G. Abiad
--- a/loudmouth/lm-connection.c Tue Nov 11 12:22:45 2003 +0000
+++ b/loudmouth/lm-connection.c Sat Nov 15 23:01:08 2003 +0000
@@ -880,14 +880,13 @@
connection->use_ssl = FALSE;
connection->disconnect_cb = NULL;
connection->incoming_messages = lm_queue_new ();
- connection->incoming_source = connection_create_source (connection);
connection->id_handlers = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
(GDestroyNotify) lm_message_handler_unref);
connection->ref_count = 1;
- g_source_attach (connection->incoming_source, NULL);
+ // g_source_attach (connection->incoming_source, NULL);
for (i = 0; i < LM_MESSAGE_TYPE_UNKNOWN; ++i) {
connection->handlers[i] = NULL;
@@ -939,6 +938,8 @@
"You need to set the server hostname in the call to lm_connection_new()");
return FALSE;
}
+ connection->incoming_source = connection_create_source (connection);
+ g_source_attach (connection->incoming_source, NULL);
connection->open_cb = _lm_utils_new_callback (function, user_data, notify);
@@ -1016,8 +1017,8 @@
result = lm_connection_send (connection, m, error);
lm_message_unref (m);
- g_source_remove (g_source_get_id (connection->incoming_source));
- g_source_unref (connection->incoming_source);
+ // g_source_remove (g_source_get_id (connection->incoming_source));
+ // g_source_unref (connection->incoming_source);
while (!finished) {
gint n;