# HG changeset patch # User Myhailo Danylenko # Date 1257461097 -7200 # Node ID ff475b333e447167e11a98f9c981bbaf49241f63 # Parent 859e715adfcd93e84449f2f8b9888d753fc2dca2 Remove unnecessary check for lconnection diff -r 859e715adfcd -r ff475b333e44 disco.c --- a/disco.c Thu Nov 05 12:45:24 2009 +0200 +++ b/disco.c Fri Nov 06 00:44:57 2009 +0200 @@ -223,16 +223,14 @@ free_arg_lst (args); } -static void disco_free_handlers (void) +static void disco_free_reply_handlers (void) { GSList *hel; - if (lconnection) { // XXX more checks? - // let's hope, that after invalidation, lm will remove and free unreffed by us handler - for (hel = reply_handlers; hel; hel = hel->next) { - LmMessageHandler *handler = (LmMessageHandler *) hel->data; - lm_message_handler_invalidate (handler); - } + // let's hope, that after invalidation, lm will remove and free unreffed by us handler + for (hel = reply_handlers; hel; hel = hel->next) { + LmMessageHandler *handler = (LmMessageHandler *) hel->data; + lm_message_handler_invalidate (handler); } g_slist_free (reply_handlers); @@ -242,11 +240,11 @@ // release handlers before reconnect static void disco_hh (guint32 hid, hk_arg_t *args, gpointer userdata) { - hk_arg_t *arg = args; + hk_arg_t *arg; for (arg = args; arg->name; arg++) { if (!strcmp (arg->name, "hook") && !strcmp (arg->value, "hook-pre-disconnect")) { - disco_free_handlers (); + disco_free_reply_handlers (); return; } } @@ -275,7 +273,7 @@ void g_module_unload(GModule *module) { // release handlers - disco_free_handlers (); + disco_free_reply_handlers (); // remove hook handler hk_del_handler (disco_hh, NULL);