# HG changeset patch # User Myhailo Danylenko # Date 1257417924 -7200 # Node ID 859e715adfcd93e84449f2f8b9888d753fc2dca2 # Parent c9ae7744e2f751b68a0d2da9f609c414b8ff3d85 Forgot to add handlers to list diff -r c9ae7744e2f7 -r 859e715adfcd disco.c --- a/disco.c Mon Nov 02 21:42:15 2009 +0200 +++ b/disco.c Thu Nov 05 12:45:24 2009 +0200 @@ -34,14 +34,14 @@ #include "hbuf.h" #include "hooks.h" -static GSList *disco_handlers = NULL; +static GSList *reply_handlers = NULL; static guint disco_cid = 0; static LmHandlerResult disco_handler (LmMessageHandler *handler, LmConnection *connection, LmMessage *message, gpointer udata) { int info_request = (int) udata; - disco_handlers = g_slist_remove (disco_handlers, handler); + reply_handlers = g_slist_remove (reply_handlers, handler); switch (lm_message_get_sub_type (message)) { case LM_MESSAGE_SUB_TYPE_RESULT: @@ -199,6 +199,8 @@ handler = lm_message_handler_new (disco_handler, (gpointer) info, NULL); + reply_handlers = g_slist_append (reply_handlers, handler); + { // create message LmMessageNode *node; @@ -227,14 +229,14 @@ if (lconnection) { // XXX more checks? // let's hope, that after invalidation, lm will remove and free unreffed by us handler - for (hel = disco_handlers; hel; hel = hel->next) { + for (hel = reply_handlers; hel; hel = hel->next) { LmMessageHandler *handler = (LmMessageHandler *) hel->data; lm_message_handler_invalidate (handler); } } - g_slist_free (disco_handlers); - disco_handlers = NULL; + g_slist_free (reply_handlers); + reply_handlers = NULL; } // release handlers before reconnect @@ -252,7 +254,7 @@ const gchar *g_module_check_init(GModule *module) { - disco_handlers = NULL; + reply_handlers = NULL; // completion disco_cid = compl_new_category ();