Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/xmpp_muc.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 |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp_muc.c Tue Jan 19 15:45:25 2010 +0200 +++ b/mcabber/mcabber/xmpp_muc.c Tue Jan 19 09:53:12 2010 +0200 @@ -113,7 +113,8 @@ gchar *roomid; GSList *room_elt; - if (!lm_connection_is_authenticated(lconnection) || !room) return; + if (!lconnection || !lm_connection_is_authenticated(lconnection) || !room) + return; if (!nickname) return; roomid = g_strdup_printf("%s/%s", room, nickname); @@ -161,7 +162,8 @@ LmMessage *msg; LmMessageNode *x, *y; - if (!lm_connection_is_authenticated(lconnection) || !room || !fjid) return; + if (!lconnection || !lm_connection_is_authenticated(lconnection) || !room || !fjid) + return; msg = lm_message_new(room, LM_MESSAGE_TYPE_MESSAGE); @@ -186,7 +188,8 @@ LmMessage *iq; LmMessageNode *query, *x; - if (!lm_connection_is_authenticated(lconnection) || !roomid) return 1; + if (!lconnection || !lm_connection_is_authenticated(lconnection) || !roomid) + return 1; if (!fjid && !nick) return 1; if (check_jid_syntax((char*)roomid)) { @@ -235,7 +238,8 @@ LmMessageNode *node; LmMessage *iq; - if (!lm_connection_is_authenticated(lconnection) || !room) return; + if (!lconnection || !lm_connection_is_authenticated(lconnection) || !room) + return; iq = lm_message_new_with_sub_type(room, LM_MESSAGE_TYPE_IQ, LM_MESSAGE_SUB_TYPE_SET); @@ -258,7 +262,8 @@ LmMessage *iq; LmMessageNode *query, *x; - if (!lm_connection_is_authenticated(lconnection) || !room) return; + if (!lconnection || !lm_connection_is_authenticated(lconnection) || !room) + return; iq = lm_message_new_with_sub_type(room, LM_MESSAGE_TYPE_IQ, LM_MESSAGE_SUB_TYPE_SET);