Changeset 5f40da7 for protocols/jabber/iq.c
- Timestamp:
- 2011-12-26T10:51:19Z (13 years ago)
- Branches:
- master
- Children:
- 199fea6
- Parents:
- 96f954d (diff), 644b808 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r96f954d r5f40da7 31 31 { 32 32 struct im_connection *ic = data; 33 struct jabber_data *jd = ic->proto_data; 33 34 struct xt_node *c, *reply = NULL; 34 35 char *type, *s; … … 170 171 was added to (or removed from) the buddy list. AFAIK they're 171 172 sent even if we added this buddy in our own session. */ 172 int bare_len = strlen( ic->acc->user);173 int bare_len = strlen( jd->me ); 173 174 174 175 if( ( s = xt_find_attr( node, "from" ) ) == NULL || 175 ( strncmp( s, ic->acc->user, bare_len ) == 0 &&176 ( strncmp( s, jd->me, bare_len ) == 0 && 176 177 ( s[bare_len] == 0 || s[bare_len] == '/' ) ) ) 177 178 { … … 343 344 { 344 345 c = xt_find_node( c->children, "jid" ); 345 if( c && c->text_len && ( s = strchr( c->text, '/' ) ) && 346 strcmp( s + 1, set_getstr( &ic->acc->set, "resource" ) ) != 0 ) 346 if( !c || !c->text ) 347 { 348 /* Server is crap, but this is no disaster. */ 349 } 350 else if( strncmp( jd->me, c->text, strlen( jd->me ) ) != 0 ) 351 { 352 s = strchr( c->text, '/' ); 353 if( s ) 354 *s = '\0'; 355 jabber_set_me( ic, c->text ); 356 imcb_log( ic, "Server claims your JID is `%s' instead of `%s'. " 357 "This mismatch may cause problems with groupchats " 358 "and possibly other things.", 359 c->text, ic->acc->user ); 360 if( s ) 361 *s = '/'; 362 } 363 else if( c && c->text_len && ( s = strchr( c->text, '/' ) ) && 364 strcmp( s + 1, set_getstr( &ic->acc->set, "resource" ) ) != 0 ) 347 365 imcb_log( ic, "Server changed session resource string to `%s'", s + 1 ); 348 366 }
Note: See TracChangeset
for help on using the changeset viewer.