Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/histolog.c @ 1682:d1e8fb14ce2d
Destroy lm connection object on disconnect
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Tue, 19 Jan 2010 09:53:12 +0200 |
parents | 41c26b7d2890 |
children | 95df4ea512c8 |
comparison
equal
deleted
inserted
replaced
1681:687f6b515d87 | 1682:d1e8fb14ce2d |
---|---|
443 scr_LogPrint(LPRINT_NORMAL, "Cannot open state file [%s]", | 443 scr_LogPrint(LPRINT_NORMAL, "Cannot open state file [%s]", |
444 strerror(errno)); | 444 strerror(errno)); |
445 goto hlog_save_state_return; | 445 goto hlog_save_state_return; |
446 } | 446 } |
447 | 447 |
448 if (!lm_connection_is_authenticated(lconnection)) { | 448 if (!lconnection || !lm_connection_is_authenticated(lconnection)) { |
449 // We're not connected. Let's use the unread_jids hash. | 449 // We're not connected. Let's use the unread_jids hash. |
450 GList *unread_jid = unread_jid_get_list(); | 450 GList *unread_jid = unread_jid_get_list(); |
451 unread_ptr = unread_jid; | 451 unread_ptr = unread_jid; |
452 for ( ; unread_jid ; unread_jid = g_list_next(unread_jid)) | 452 for ( ; unread_jid ; unread_jid = g_list_next(unread_jid)) |
453 fprintf(fp, "%s\n", (char*)unread_jid->data); | 453 fprintf(fp, "%s\n", (char*)unread_jid->data); |