Changeset 0adce21
- Timestamp:
- 2008-01-20T00:01:31Z (17 years ago)
- Branches:
- master
- Children:
- 31e5846
- Parents:
- 003553b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber_util.c
r003553b r0adce21 392 392 if( ( bud = g_hash_table_lookup( jd->buddies, jid ) ) ) 393 393 { 394 /* Just return the first one for this bare JID. */ 395 if( flags & GET_BUDDY_FIRST ) 396 { 397 *s = '/'; 398 g_free( jid ); 399 return bud; 400 } 401 394 402 /* Is this one of those no-resource buddies? */ 395 403 if( bud->resource == NULL ) 396 404 { 405 *s = '/'; 397 406 g_free( jid ); 398 407 return NULL; 399 408 } 400 else 401 { 402 /* See if there's an exact match. */ 403 for( ; bud; bud = bud->next ) 404 if( g_strcasecmp( bud->resource, s + 1 ) == 0 ) 405 break; 406 } 409 410 /* See if there's an exact match. */ 411 for( ; bud; bud = bud->next ) 412 if( g_strcasecmp( bud->resource, s + 1 ) == 0 ) 413 break; 407 414 } 408 415 else … … 413 420 is done to handle conferences properly. */ 414 421 none_found = 1; 422 /* TODO(wilmer): Find out what I was thinking when I 423 wrote this??? And then fix it. This makes me sad... */ 415 424 } 416 425 … … 442 451 else if( ( bud->resource == NULL || bud->next == NULL ) ) 443 452 /* No need for selection if there's only one option. */ 453 return bud; 454 else if( flags & GET_BUDDY_FIRST ) 455 /* Looks like the caller doesn't care about details. */ 444 456 return bud; 445 457
Note: See TracChangeset
for help on using the changeset viewer.