- Timestamp:
- 2006-11-23T09:34:18Z (18 years ago)
- Branches:
- master
- Children:
- 25984f2
- Parents:
- 16b5f86
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r16b5f86 r9bcbe48 51 51 strncmp( s, JABBER_CACHED_ID, strlen( JABBER_CACHED_ID ) ) != 0 ) 52 52 { 53 /* Silently ignore it, without an ID (or a nnon-cache53 /* Silently ignore it, without an ID (or a non-cache 54 54 ID) we don't know how to handle the packet and we 55 55 probably don't have to. */ … … 60 60 61 61 if( entry == NULL ) 62 serv_got_crap( gc, "WARNING: Received IQ 62 serv_got_crap( gc, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s ); 63 63 else if( entry->func ) 64 64 return entry->func( gc, node, entry->node ); … … 136 136 } 137 137 138 /* This is a roster push. XMPP servers send this when someone 139 was added to (or removed from) the buddy list. AFAIK they're 140 sent even if we added this buddy in our own session. */ 138 141 if( strcmp( s, XMLNS_ROSTER ) == 0 ) 139 142 { … … 151 154 else 152 155 { 153 serv_got_crap( gc, "WARNING: %s tried to fake a roster push!", s );156 serv_got_crap( gc, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" ); 154 157 155 158 xt_free_node( reply ); … … 214 217 char *s; 215 218 216 query = xt_find_node( node->children, "query" ); 219 if( !( query = xt_find_node( node->children, "query" ) ) ) 220 { 221 serv_got_crap( gc, "WARNING: Received incomplete IQ packet while authenticating" ); 222 signoff( gc ); 223 return XT_HANDLED; 224 } 217 225 218 226 /* Time to authenticate ourselves! */ … … 264 272 static xt_status jabber_finish_iq_auth( struct gaim_connection *gc, struct xt_node *node, struct xt_node *orig ) 265 273 { 266 char *type = xt_find_attr( node, "type" );267 274 struct jabber_data *jd = gc->proto_data; 275 char *type; 276 277 if( !( type = xt_find_attr( node, "type" ) ) ) 278 { 279 serv_got_crap( gc, "WARNING: Received incomplete IQ packet while authenticating" ); 280 signoff( gc ); 281 return XT_HANDLED; 282 } 268 283 269 284 if( strcmp( type, "error" ) == 0 ) … … 336 351 int initial = ( orig != NULL ); 337 352 338 query = xt_find_node( node->children, "query" ); 353 if( !( query = xt_find_node( node->children, "query" ) ) ) 354 { 355 serv_got_crap( gc, "WARNING: Received NULL roster packet" ); 356 return XT_HANDLED; 357 } 339 358 340 359 c = query->children; … … 361 380 if( find_buddy( gc, jid ) == NULL ) 362 381 add_buddy( gc, NULL, jid, name ); 363 else 382 else if( name ) 364 383 serv_buddy_rename( gc, jid, name ); 365 384 }
Note: See TracChangeset
for help on using the changeset viewer.