Ticket #1106: normalize.patch
File normalize.patch, 1.1 KB (added by , at 2014-02-01T09:13:28Z) |
---|
-
bitlbee-3.2.1/protocols/jabber/jabber_util.c
a b 327 327 return new; 328 328 } 329 329 330 /* Similar to jabber_normalize, but works with addresses in the form 331 * resource=chatroom@example.com */ 332 char *jabber_normalize_ext( const char *orig) 333 { 334 int len, i; 335 char *new; 336 337 len = strlen( orig ); 338 new = g_new( char, len + 1 ); 339 340 for( i = 0; i < len && orig[i] != '='; i ++ ) 341 new[i] = orig[i]; 342 for( ; orig[i]; i ++ ) 343 new[i] = tolower( orig[i] ); 344 345 new[i] = 0; 346 return new; 347 } 348 330 349 /* Adds a buddy/resource to our list. Returns NULL if full_jid is not really a 331 350 FULL jid or if we already have this buddy/resource. XXX: No, great, actually 332 351 buddies from transports don't (usually) have resources. So we'll really have … … 533 552 struct jabber_buddy *bud; 534 553 char *s, *jid; 535 554 536 jid = jabber_normalize ( jid_ );555 jid = jabber_normalize_ext( jid_ ); 537 556 538 557 if( ( s = strchr( jid, '=' ) ) == NULL ) 539 558 return NULL;