diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-12 19:35:51 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-12 19:35:51 +0000 | 
| commit | dde9d5710cd6392592c1417032933f0ba4299d9c (patch) | |
| tree | 21478dbe2d958649febc03bed0b1c187dd4633ce | |
| parent | be609ff2b0ca885612c0e6d81f82c4f26ed4f58d (diff) | |
Fixed jabber_util unittest. It passes, yet something still seems to be
broken. :-(
| -rw-r--r-- | protocols/jabber/jabber_util.c | 2 | ||||
| -rw-r--r-- | tests/check_jabber_util.c | 6 | 
2 files changed, 4 insertions, 4 deletions
| diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index 6e103609..a0266d3e 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -457,7 +457,7 @@ struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid_,  		}  		if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && -		    ( imcb_find_buddy( ic, jid ) || bare_exists ) ) +		    ( bare_exists || imcb_find_buddy( ic, jid ) ) )  		{  			*s = '/';  			bud = jabber_buddy_add( ic, jid ); diff --git a/tests/check_jabber_util.c b/tests/check_jabber_util.c index 4728c5ee..d105f52a 100644 --- a/tests/check_jabber_util.c +++ b/tests/check_jabber_util.c @@ -13,12 +13,12 @@ static void check_buddy_add(int l)  	struct jabber_buddy *budw1, *budw2, *budw3, *budn, *bud;  	budw1 = jabber_buddy_add( ic, "wilmer@gaast.net/BitlBee" ); -	budw1->last_act = time( NULL ) - 100; +	budw1->last_msg = time( NULL ) - 100;  	budw2 = jabber_buddy_add( ic, "WILMER@gaast.net/Telepathy" );  	budw2->priority = 2; -	budw2->last_act = time( NULL ); +	budw2->last_msg = time( NULL );  	budw3 = jabber_buddy_add( ic, "wilmer@GAAST.NET/bitlbee" ); -	budw3->last_act = time( NULL ) - 200; +	budw3->last_msg = time( NULL ) - 200;  	budw3->priority = 4;  	/* TODO(wilmer): Shouldn't this just return budw3? */  	fail_if( jabber_buddy_add( ic, "wilmer@gaast.net/Telepathy" ) != NULL ); | 
