Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/commands.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 | 1d84f5be2ad1 |
children | 95df4ea512c8 |
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c Tue Jan 19 15:45:25 2010 +0200 +++ b/mcabber/mcabber/commands.c Tue Jan 19 09:53:12 2010 +0200 @@ -888,7 +888,7 @@ char *msg; enum imstatus st; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return; } @@ -1022,7 +1022,7 @@ char *id, *nick; char *jid_utf8 = NULL; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return; } @@ -1184,7 +1184,7 @@ int isroom; gpointer xep184 = NULL; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return 1; } @@ -1529,7 +1529,7 @@ LmMessageSubType msg_type = LM_MESSAGE_SUB_TYPE_NOT_SET; bool quiet = FALSE; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return; } @@ -2249,7 +2249,7 @@ char **paramlst; char *subcmd; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return; } @@ -3042,7 +3042,7 @@ char *subcmd; gpointer bud; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return; } @@ -3139,7 +3139,7 @@ char *subcmd; char *jid_utf8; - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); return; } @@ -3253,7 +3253,7 @@ return; } - if (!lm_connection_is_authenticated(lconnection)) { + if (!lconnection || !lm_connection_is_authenticated(lconnection)) { scr_LogPrint(LPRINT_NORMAL, "You are not connected."); free_arg_lst(paramlst); return;