aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber')
-rw-r--r--protocols/jabber/conference.c4
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/jabber/presence.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index f434c58a..17108428 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -91,11 +91,13 @@ static xt_status jabber_chat_join_failed( struct im_connection *ic, struct xt_no
struct groupchat *jabber_chat_by_jid( struct im_connection *ic, const char *name )
{
char *normalized = jabber_normalize( name );
+ GSList *l;
struct groupchat *ret;
struct jabber_chat *jc;
- for( ret = ic->groupchats; ret; ret = ret->next )
+ for( l = ic->groupchats; l; l = l->next )
{
+ ret = l->data;
jc = ret->data;
if( strcmp( normalized, jc->name ) == 0 )
break;
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index acad525e..75bc44d3 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -281,7 +281,7 @@ static void jabber_logout( struct im_connection *ic )
jabber_end_stream( ic );
while( ic->groupchats )
- jabber_chat_free( ic->groupchats );
+ jabber_chat_free( ic->groupchats->data );
if( jd->r_inpa >= 0 )
b_event_remove( jd->r_inpa );
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c
index 006eeead..dadccfb9 100644
--- a/protocols/jabber/presence.c
+++ b/protocols/jabber/presence.c
@@ -205,6 +205,7 @@ int presence_send_update( struct im_connection *ic )
struct jabber_data *jd = ic->proto_data;
struct xt_node *node, *cap;
struct groupchat *c;
+ GSList *l;
int st;
node = jabber_make_packet( "presence", NULL, NULL, NULL );
@@ -228,8 +229,9 @@ int presence_send_update( struct im_connection *ic )
/* Have to send this update to all groupchats too, the server won't
do this automatically. */
- for( c = ic->groupchats; c && st; c = c->next )
+ for( l = ic->groupchats; l && st; l = l->next )
{
+ struct groupchat *c = l->data;
struct jabber_chat *jc = c->data;
xt_add_attr( node, "to", jc->my_full_jid );