Changeset 16b5f86 for protocols/jabber
- Timestamp:
- 2006-11-13T10:38:23Z (18 years ago)
- Branches:
- master
- Children:
- 9bcbe48
- Parents:
- 0d3f30f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber_util.c
r0d3f30f r16b5f86 359 359 if( bud->resource == NULL ) 360 360 { 361 bud = NULL; 361 g_free( jid ); 362 return NULL; 362 363 } 363 364 else … … 370 371 } 371 372 372 *s = '/'; 373 if( bud == NULL && ( flags & GET_BUDDY_CREAT ) ) 373 if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && find_buddy( gc, jid ) ) 374 { 375 *s = '/'; 374 376 bud = jabber_buddy_add( gc, jid ); 377 } 375 378 376 379 g_free( jid ); … … 386 389 g_free( jid ); 387 390 388 /* An exact match, or only one option. */389 391 if( bud == NULL ) 390 return ( flags & GET_BUDDY_CREAT ) ? jabber_buddy_add( gc, jid ) : NULL; 392 /* No match. Create it now? */ 393 return ( ( flags & GET_BUDDY_CREAT ) && find_buddy( gc, jid ) ) ? 394 jabber_buddy_add( gc, jid ) : NULL; 395 else if( bud->resource && ( flags & GET_BUDDY_EXACT ) ) 396 /* We want an exact match, so in thise case there shouldn't be a /resource. */ 397 return NULL; 391 398 else if( ( bud->resource == NULL || bud->next == NULL ) ) 399 /* No need for selection if there's only one option. */ 392 400 return bud; 393 401
Note: See TracChangeset
for help on using the changeset viewer.