Changes in / [767a148:a81d679]


Ignore:
Files:
1 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.h

    r767a148 ra81d679  
    163163
    164164char *set_eval_root_nick( set_t *set, char *new_nick );
    165 char *set_eval_control_channel( set_t *set, char *new_name );
    166165
    167166extern global_t global;
  • configure

    r767a148 ra81d679  
    2020ipcsocket='/var/run/bitlbee.sock'
    2121pcdir='$prefix/lib/pkgconfig'
    22 systemlibdirs="/lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64"
     22systemlibdirs="/lib /usr/lib /usr/local/lib"
    2323
    2424msn=1
     
    156156
    157157echo CFLAGS=$CFLAGS >> Makefile.settings
    158 echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
     158echo CFLAGS+=-I`pwd` -iquote`pwd`/lib -iquote`pwd`/protocols -I. >> Makefile.settings
    159159
    160160echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
     
    295295detect_resolv_dynamic()
    296296{
    297         TMPFILE=$(mktemp)
    298         ret=1
    299         echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null
     297        echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -lresolv >/dev/null 2>/dev/null
    300298        if [ "$?" = "0" ]; then
    301299                echo 'EFLAGS+=-lresolv' >> Makefile.settings
    302                 ret=0
    303         fi
    304 
    305         rm -f $TMPFILE
    306         return $ret
     300                return 0
     301        fi
     302
     303        return 1
    307304}
    308305
    309306detect_resolv_static()
    310307{
    311         TMPFILE=$(mktemp)
    312         ret=1
    313308        for i in $systemlibdirs; do
    314309                if [ -f $i/libresolv.a ]; then
    315                         echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
     310                        echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
    316311                        if [ "$?" = "0" ]; then
    317312                                echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
    318                                 ret=0
     313                                return 0
    319314                        fi
    320315                fi
    321316        done
    322317
    323         rm -f $TMPFILE
    324         return $ret
     318        return 1
    325319}
    326320
  • debian/bitlbee.init

    r767a148 ra81d679  
    4141        chown bitlbee: /var/run/bitlbee.pid
    4242       
    43         start-stop-daemon --start --quiet --pidfile $PIDFILE \
     43        # Clean up after the bug between 1.2-5 and 1.2.1-2 where BitlBee ran
     44        # as root. (#494656 and #495877) Fixing this in the postinst script
     45        # is not enough since the user will restart his BitlBee after up-
     46        # grading the package, and the BitlBee running as root will then
     47        # save its settings, re-setting ownership of the file to root.
     48        # TODO: Remove this after a few revisions.
     49        find /var/lib/bitlbee -uid 0 -name '*.xml' -exec chown bitlbee: {} \;
     50
     51        start-stop-daemon --start --quiet \
    4452                --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS
    4553}
  • debian/changelog

    r767a148 ra81d679  
    1 bitlbee (1.2.5-1) unstable; urgency=low
    2 
    3   * New upstream version.
    4   * Fixed issues with server-side MSN nickname corruption. (Closes: #538756)
    5   * Debconf translation fixes/additions. (Closes: #541754, #563504)
    6 
    7  -- Wilmer van der Gaast <wilmer@gaast.net>  Wed, 17 Mar 2010 14:59:27 +0000
    8 
    9 bitlbee (1.2.4-2) unstable; urgency=low
    10 
    11   * Merging in some changes from bzr-head:
    12   * Use libresolv.so where possible. (Closes: #551775)
    13   * Some include file changes that make the bitlbee-dev package useful again.
    14 
    15  -- Wilmer van der Gaast <wilmer@gaast.net>  Thu, 19 Nov 2009 23:02:43 +0000
    16 
    17 bitlbee (1.2.4-1) unstable; urgency=low
    18 
    19   * New upstream version.
    20   * Fixed issues with Yahoo! (Closes: #536178)
    21 
    22  -- Wilmer van der Gaast <wilmer@gaast.net>  Sat, 17 Oct 2009 18:12:45 +0100
    23 
    24 bitlbee (1.2.3-2) unstable; urgency=low
    25 
    26   * Fixed bitblee typo in prerm (introduced by NMU 1.2.1-1.1).
    27     (Closes: #531287)
    28   * Fixed bitlbee.deb dep in bitlbee-dev to deal with binary NMUs.
    29     (Closes: #531219)
    30   * Fixed free port detection code in debian/config which was a bit limited
    31     and also buggy.
    32   * Removing code that edits bitlbee.conf from postinst (and chown code in
    33     the init script), it's not really necessary anymore; bitlbee may only
    34     still run as root if the admin doesn't read conffile diffs.
    35     (Closes: #514572)
    36   * No longer overwriting port number info in /etc/default/bitlbee with
    37     what's in debconf. (Closes: #514148)
    38   * Added notes about the above two changes to bitlbee.conf.
    39 
    40  -- Wilmer van der Gaast <wilmer@gaast.net>  Sun, 07 Jun 2009 21:17:39 +0100
    41 
    42 bitlbee (1.2.3-1) unstable; urgency=critical
    43 
    44   * New upstream version.
    45   * Fixes another account hijacking issue. (Closes: #498159)
    46   * Restored --pidfile argument to start-stop-daemon, otherwise the init
    47     script fails to restart BitlBee when users are connected.
    48 
    49  -- Wilmer van der Gaast <wilmer@gaast.net>  Sun, 07 Sep 2008 18:53:04 +0100
    50 
    511bitlbee (1.2.2-1) unstable; urgency=critical
    522
  • debian/config

    r767a148 ra81d679  
    22
    33. /usr/share/debconf/confmodule
    4 [ -f /etc/default/bitlbee ] && . /etc/default/bitlbee
    54
    65db_title BitlBee
    76
    8 if [ -n "$BITLBEE_PORT" ]; then
    9         db_set bitlbee/serveport "$BITLBEE_PORT"
    10 else
    11         db_get bitlbee/serveport
    12         if [ "$RET" = "stillhavetoask" ]; then
    13                 listens=$(netstat -ltn | awk '{print $4}')
    14                 for port in 6667 6666 6668 6669; do
    15                         if [ $(expr "$listens " : ".*:$port\s") = "0" ]; then
    16                                 break
    17                         fi
    18                 done
    19                 db_set bitlbee/serveport $port;
     7db_get bitlbee/serveport
     8if [ "$RET" = "stillhavetoask" ]; then
     9        if netstat -ltn | grep ':6667' 2> /dev/null > /dev/null; then
     10                port=6668;
     11        else
     12                port=6667;
    2013        fi
     14        db_set bitlbee/serveport $port;
    2115fi
    2216
  • debian/control

    r767a148 ra81d679  
    1919Package: bitlbee-dev
    2020Architecture: all
    21 Depends: bitlbee (>= ${source:Version}), bitlbee (<< ${source:Version}.1~)
     21Depends: bitlbee (= ${binary:Version})
    2222Description: An IRC to other chat networks gateway
    2323 This program can be used as an IRC server which forwards everything you
  • debian/patches/bitlbee.conf.diff

    r767a148 ra81d679  
    1 --- debian/bitlbee/etc/bitlbee/bitlbee.conf     2009-06-01 00:20:24.000000000 +0100
    2 +++ debian/bitlbee/etc/bitlbee/bitlbee.conf     2009-06-07 21:16:19.000000000 +0100
    3 @@ -23,13 +23,18 @@
     1=== modified file 'bitlbee.conf'
     2--- debian/bitlbee/etc/bitlbee/bitlbee.conf     2008-08-26 22:33:54 +0000
     3+++ debian/bitlbee/etc/bitlbee/bitlbee.conf     2008-08-27 23:18:13 +0000
     4@@ -23,7 +23,7 @@
    45 ## If BitlBee is started by root as a daemon, it can drop root privileges,
    56 ## and change to the specified user.
    67 ##
    78-# User = bitlbee
    8 +## DEBIAN NOTE: Without this, BitlBee will run as root!
    9 +##
    109+User = bitlbee
    1110 
    1211 ## DaemonPort/DaemonInterface:
    1312 ##
    14  ## For daemon mode, you can specify on what interface and port the daemon
    15  ## should be listening for connections.
    16  ##
    17 +## DEBIAN NOTE: The init script passes the -p flag to use the port number
    18 +## set using debconf, this overrides the DaemonPort setting here.
    19 +##
    20  # DaemonInterface = 0.0.0.0
    21  # DaemonPort = 6667
    22  
     13
  • debian/po/POTFILES.in

    r767a148 ra81d679  
    1 [type: gettext/rfc822deb] templates
     1[type: gettext/rfc822deb] bitlbee.templates.master
  • debian/postinst

    r767a148 ra81d679  
    3333## /etc/default/bitlbee: Auto-generated/updated script.
    3434##
    35 ## If running in (fork)daemon mode, listen on this TCP port.
     35## Don't edit this line, use dpkg-reconfigure bitlbee
    3636BITLBEE_PORT="$PORT"
    3737
     
    6161        else
    6262                mv /usr/share/bitlbee/help.upgrading /usr/share/bitlbee/help.txt
     63        fi
     64fi
     65
     66if ! grep -qi '^User *= *' /etc/bitlbee/bitlbee.conf; then
     67        echo 'Updating configuration file, enabling User-setting...'
     68        if ! sed -i -e 's/# *User *= *.*/User = bitlbee/i' /etc/bitlbee/bitlbee.conf; then
     69                echo 'Failed! BitlBee may run as root now, please check your configs.'
    6370        fi
    6471fi
  • debian/prerm

    r767a148 ra81d679  
    1111else
    1212        if which invoke-rc.d >/dev/null 2>&1; then
    13                 invoke-rc.d bitlbee stop || exit 0
     13                invoke-rc.d bitblee stop || exit 0
    1414        else
    1515                /etc/init.d/bitlbee stop || exit 0
  • doc/user-guide/commands.xml

    r767a148 ra81d679  
    511511        </bitlbee-setting>
    512512
    513         <bitlbee-setting name="control_channel" type="string" scope="global">
    514                 <default>&amp;bitlbee</default>
    515 
    516                 <description>
    517                         <para>
    518                                 Normally the control channel where you can see all your contacts is called "&amp;bitlbee". If you don't like this name, you can rename it to anything else using the <emphasis>rename</emphasis> command, or by changing this setting.
    519                         </para>
    520                 </description>
    521         </bitlbee-setting>
    522 
    523513        <bitlbee-setting name="debug" type="boolean" scope="global">
    524514                <default>false</default>
     
    583573                                </para>
    584574                        </note>
    585                 </description>
    586 
    587         </bitlbee-setting>
    588 
    589         <bitlbee-setting name="ignore_auth_requests" type="boolean" scope="account">
    590                 <default>true</default>
    591 
    592                 <description>
    593                         <para>
    594                                 Only supported by OSCAR so far, you can use this setting to ignore ICQ authorization requests, which are hardly used for legitimate (i.e. non-spam) reasons anymore.
    595                         </para>
    596575                </description>
    597576
  • irc.c

    r767a148 ra81d679  
    172172        s = set_add( &irc->set, "buddy_sendbuffer_delay", "200", set_eval_int, irc );
    173173        s = set_add( &irc->set, "charset", "utf-8", set_eval_charset, irc );
    174         s = set_add( &irc->set, "control_channel", irc->channel, set_eval_control_channel, irc );
    175174        s = set_add( &irc->set, "debug", "false", set_eval_bool, irc );
    176175        s = set_add( &irc->set, "default_target", "root", NULL, irc );
  • protocols/jabber/jabber.c

    r767a148 ra81d679  
    5757        set_t *s;
    5858        char str[16];
    59        
    60         s = set_add( &acc->set, "activity_timeout", "600", set_eval_int, acc );
    6159       
    6260        g_snprintf( str, sizeof( str ), "%d", jabber_port_list[0] );
     
    323321                bud = jabber_buddy_by_ext_jid( ic, who, 0 );
    324322        else
    325                 bud = jabber_buddy_by_jid( ic, who, GET_BUDDY_BARE_OK );
     323                bud = jabber_buddy_by_jid( ic, who, 0 );
    326324       
    327325        node = xt_new_node( "body", message, NULL );
     
    368366static void jabber_get_info( struct im_connection *ic, char *who )
    369367{
     368        struct jabber_data *jd = ic->proto_data;
    370369        struct jabber_buddy *bud;
    371370       
    372         bud = jabber_buddy_by_jid( ic, who, GET_BUDDY_FIRST );
     371        if( strchr( who, '/' ) )
     372                bud = jabber_buddy_by_jid( ic, who, 0 );
     373        else
     374        {
     375                char *s = jabber_normalize( who );
     376                bud = g_hash_table_lookup( jd->buddies, s );
     377                g_free( s );
     378        }
    373379       
    374380        while( bud )
  • protocols/jabber/jabber.h

    r767a148 ra81d679  
    120120};
    121121
    122 /* Somewhat messy data structure: We have a hash table with the bare JID as
    123    the key and the head of a struct jabber_buddy list as the value. The head
    124    is always a bare JID. If the JID has other resources (often the case,
    125    except for some transports that don't support multiple resources), those
    126    follow. In that case, the bare JID at the beginning doesn't actually
    127    refer to a real session and should only be used for operations that
    128    support incomplete JIDs. */
    129122struct jabber_buddy
    130123{
     
    141134        GSList *features;
    142135       
    143         time_t last_msg;
     136        time_t last_act;
    144137        jabber_buddy_flags_t flags;
    145138       
     
    278271        GET_BUDDY_EXACT = 2,    /* Get an exact match (only makes sense with bare JIDs). */
    279272        GET_BUDDY_FIRST = 4,    /* No selection, simply get the first resource for this JID. */
    280         GET_BUDDY_BARE = 8,     /* Get the bare version of the JID (possibly inexistent). */
    281         GET_BUDDY_BARE_OK = 16, /* Allow returning a bare JID if that seems better. */
    282273} get_buddy_flags_t;
    283274
  • protocols/jabber/jabber_util.c

    r767a148 ra81d679  
    44*  Jabber module - Misc. stuff                                              *
    55*                                                                           *
    6 *  Copyright 2006-2010 Wilmer van der Gaast <wilmer@gaast.net>             
     6*  Copyright 2006 Wilmer van der Gaast <wilmer@gaast.net>                   *
    77*                                                                           *
    88*  This program is free software; you can redistribute it and/or modify     *
     
    349349        if( ( bud = g_hash_table_lookup( jd->buddies, full_jid ) ) )
    350350        {
    351                 /* The first entry is always a bare JID. If there are more, we
    352                    should ignore the first one here. */
    353                 if( bud->next )
    354                         bud = bud->next;
    355                
    356351                /* If this is a transport buddy or whatever, it can't have more
    357352                   than one instance, so this is always wrong: */
     
    388383        else
    389384        {
    390                 new->full_jid = new->bare_jid = g_strdup( full_jid );
     385                /* Keep in mind that full_jid currently isn't really
     386                   a full JID... */
     387                new->bare_jid = g_strdup( full_jid );
    391388                g_hash_table_insert( jd->buddies, new->bare_jid, new );
    392                
    393                 if( s )
    394                 {
    395                         new->next = g_new0( struct jabber_buddy, 1 );
    396                         new->next->bare_jid = new->bare_jid;
    397                         new = new->next;
    398                 }
    399389        }
    400390       
     
    422412{
    423413        struct jabber_data *jd = ic->proto_data;
    424         struct jabber_buddy *bud, *head;
     414        struct jabber_buddy *bud;
    425415        char *s, *jid;
    426416       
     
    434424                if( ( bud = g_hash_table_lookup( jd->buddies, jid ) ) )
    435425                {
    436                         bare_exists = 1;
    437                        
    438                         if( bud->next )
    439                                 bud = bud->next;
    440                        
    441426                        /* Just return the first one for this bare JID. */
    442427                        if( flags & GET_BUDDY_FIRST )
     
    460445                                        break;
    461446                }
     447                else
     448                {
     449                        /* This variable tells the if down here that the bare
     450                           JID already exists and we should feel free to add
     451                           more resources, if the caller asked for that. */
     452                        bare_exists = 1;
     453                }
    462454               
    463455                if( bud == NULL && ( flags & GET_BUDDY_CREAT ) &&
    464                     ( bare_exists || imcb_find_buddy( ic, jid ) ) )
     456                    ( !bare_exists || imcb_find_buddy( ic, jid ) ) )
    465457                {
    466458                        *s = '/';
     
    476468                char *set;
    477469               
    478                 head = g_hash_table_lookup( jd->buddies, jid );
    479                 bud = ( head && head->next ) ? head->next : head;
     470                bud = g_hash_table_lookup( jd->buddies, jid );
    480471               
    481472                g_free( jid );
     
    494485                        /* Looks like the caller doesn't care about details. */
    495486                        return bud;
    496                 else if( flags & GET_BUDDY_BARE )
    497                         return head;
    498487               
    499488                best_prio = best_time = bud;
     
    502491                        if( bud->priority > best_prio->priority )
    503492                                best_prio = bud;
    504                         if( bud->last_msg > best_time->last_msg )
     493                        if( bud->last_act > best_time->last_act )
    505494                                best_time = bud;
    506495                }
     
    508497                if( ( set = set_getstr( &ic->acc->set, "resource_select" ) ) == NULL )
    509498                        return NULL;
    510                 else if( strcmp( set, "priority" ) == 0 )
     499                else if( strcmp( set, "activity" ) == 0 )
     500                        return best_time;
     501                else /* if( strcmp( set, "priority" ) == 0 ) */
    511502                        return best_prio;
    512                 else if( flags & GET_BUDDY_BARE_OK ) /* && strcmp( set, "activity" ) == 0 */
    513                 {
    514                         if( best_time->last_msg + set_getint( &ic->acc->set, "activity_timeout" ) >= time( NULL ) )
    515                                 return best_time;
    516                         else
    517                                 return head;
    518                 }
    519                 else
    520                         return best_time;
    521503        }
    522504}
     
    560542{
    561543        struct jabber_data *jd = ic->proto_data;
    562         struct jabber_buddy *bud, *prev = NULL, *bi;
     544        struct jabber_buddy *bud, *prev, *bi;
    563545        char *s, *full_jid;
    564546       
     
    570552        if( ( bud = g_hash_table_lookup( jd->buddies, full_jid ) ) )
    571553        {
    572                 if( bud->next )
    573                         bud = (prev=bud)->next;
    574                
    575554                /* If there's only one item in the list (and if the resource
    576555                   matches), removing it is simple. (And the hash reference
     
    580559                      ( bud->resource && s && strcmp( bud->resource, s + 1 ) == 0 ) ) )
    581560                {
    582                         return jabber_buddy_remove_bare( ic, full_jid );
     561                        g_hash_table_remove( jd->buddies, bud->bare_jid );
     562                        g_free( bud->bare_jid );
     563                        g_free( bud->ext_jid );
     564                        g_free( bud->full_jid );
     565                        g_free( bud->away_message );
     566                        g_free( bud );
     567                       
     568                        g_free( full_jid );
     569                       
     570                        return 1;
    583571                }
    584572                else if( s == NULL || bud->resource == NULL )
     
    591579                else
    592580                {
    593                         for( bi = bud; bi; bi = (prev=bi)->next )
     581                        for( bi = bud, prev = NULL; bi; bi = (prev=bi)->next )
    594582                                if( strcmp( bi->resource, s + 1 ) == 0 )
    595583                                        break;
     
    602590                                        prev->next = bi->next;
    603591                                else
    604                                         /* Don't think this should ever happen anymore. */
     592                                        /* The hash table should point at the second
     593                                           item, because we're removing the first. */
    605594                                        g_hash_table_replace( jd->buddies, bi->bare_jid, bi->next );
    606595                               
  • protocols/jabber/message.c

    r767a148 ra81d679  
    7171                        if( bud )
    7272                        {
    73                                 bud->last_msg = time( NULL );
     73                                bud->last_act = time( NULL );
    7474                                from = bud->ext_jid ? : bud->bare_jid;
    7575                        }
  • protocols/jabber/presence.c

    r767a148 ra81d679  
    6868                {
    6969                        bud->away_state = NULL;
     70                        /* Let's only set last_act if there's *no* away state,
     71                           since it could be some auto-away thingy. */
     72                        bud->last_act = time( NULL );
    7073                }
    7174               
  • protocols/oscar/oscar.c

    r767a148 ra81d679  
    373373        set_t *s;
    374374       
     375        s = set_add( &acc->set, "server", AIM_DEFAULT_LOGIN_SERVER, set_eval_account, acc );
     376        s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
     377       
    375378        if (isdigit(acc->user[0])) {
    376                 set_add(&acc->set, "ignore_auth_requests", "false", set_eval_bool, acc);
    377         }
    378        
    379         s = set_add(&acc->set, "server", AIM_DEFAULT_LOGIN_SERVER, set_eval_account, acc);
    380         s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
    381        
    382         if(isdigit(acc->user[0])) {
    383                 s = set_add(&acc->set, "web_aware", "false", set_eval_bool, acc);
     379                s = set_add( &acc->set, "web_aware", "false", set_eval_bool, acc );
    384380                s->flags |= ACC_SET_OFFLINE_ONLY;
    385381        }
     
    12161212 */
    12171213static void gaim_icq_authask(struct im_connection *ic, guint32 uin, char *msg) {
    1218         struct icq_auth *data;
     1214        struct icq_auth *data = g_new(struct icq_auth, 1);
    12191215        char *reason = NULL;
    12201216        char *dialog_msg;
    1221 
    1222         if (set_getbool(&ic->acc->set, "ignore_auth_requests"))
    1223                 return;
    1224        
    1225         data = g_new(struct icq_auth, 1);
    1226 
     1217       
    12271218        if (strlen(msg) > 6)
    12281219                reason = msg + 6;
  • root_commands.c

    r767a148 ra81d679  
    22  * BitlBee -- An IRC to other IM-networks gateway                     *
    33  *                                                                    *
    4   * Copyright 2002-2010 Wilmer van der Gaast and others                *
     4  * Copyright 2002-2004 Wilmer van der Gaast and others                *
    55  \********************************************************************/
    66
     
    654654                irc_usermsg( irc, "Nick `%s' can't be changed", cmd[1] );
    655655        }
    656         else if( g_strcasecmp( cmd[1], irc->channel ) == 0 )
    657         {
    658                 if( strchr( CTYPES, cmd[2][0] ) && nick_ok( cmd[2] + 1 ) )
    659                 {
    660                         u = user_find( irc, irc->nick );
    661                        
    662                         irc_part( irc, u, irc->channel );
    663                         g_free( irc->channel );
    664                         irc->channel = g_strdup( cmd[2] );
    665                         irc_join( irc, u, irc->channel );
    666                        
    667                         if( strcmp( cmd[0], "set_rename" ) != 0 )
    668                                 set_setstr( &irc->set, "control_channel", cmd[2] );
    669                 }
    670         }
    671656        else if( user_find( irc, cmd[2] ) && ( nick_cmp( cmd[1], cmd[2] ) != 0 ) )
    672657        {
     
    716701       
    717702        return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : SET_INVALID;
    718 }
    719 
    720 char *set_eval_control_channel( set_t *set, char *new_name )
    721 {
    722         irc_t *irc = set->data;
    723        
    724         if( strcmp( irc->channel, new_name ) != 0 )
    725         {
    726                 char *cmd[] = { "set_rename", irc->channel, new_name, NULL };
    727                
    728                 cmd_rename( irc, cmd );
    729         }
    730        
    731         return strcmp( irc->channel, new_name ) == 0 ? new_name : SET_INVALID;
    732703}
    733704
  • tests/check_jabber_util.c

    r767a148 ra81d679  
    1414       
    1515        budw1 = jabber_buddy_add( ic, "wilmer@gaast.net/BitlBee" );
    16         budw1->last_msg = time( NULL ) - 100;
     16        budw1->last_act = time( NULL ) - 100;
    1717        budw2 = jabber_buddy_add( ic, "WILMER@gaast.net/Telepathy" );
    1818        budw2->priority = 2;
    19         budw2->last_msg = time( NULL );
     19        budw2->last_act = time( NULL );
    2020        budw3 = jabber_buddy_add( ic, "wilmer@GAAST.NET/bitlbee" );
    21         budw3->last_msg = time( NULL ) - 200;
     21        budw3->last_act = time( NULL ) - 200;
    2222        budw3->priority = 4;
    2323        /* TODO(wilmer): Shouldn't this just return budw3? */
     
    6060        fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/Telepathy" ) );
    6161        fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/telepathy" ) );
    62        
    63         /* Test activity_timeout and GET_BUDDY_BARE_OK. */
    64         fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) == budw1 );
    65         budw1->last_msg -= 50;
    66         fail_unless( ( bud = jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) ) != NULL );
    67         fail_unless( strcmp( bud->full_jid, "wilmer@gaast.net" ) == 0 );
     62        fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 );
    6863       
    6964        fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );
    7065        fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 );
    7166       
    72         fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );
    73         fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/bitlbee" ) );
    74         fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/BitlBee" ) );
    75         fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) );
    76        
    7767        /* Check if remove_bare() indeed gets rid of all. */
    78         /* disable this one for now.
    7968        fail_unless( jabber_buddy_remove_bare( ic, "wilmer@gaast.net" ) );
    8069        fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) );
    81         */
    8270
    8371        fail_if( jabber_buddy_remove( ic, "nekkid@lamejab.net/Illegal" ) );
    8472        fail_unless( jabber_buddy_remove( ic, "nekkid@lamejab.net" ) );
    8573        fail_if( jabber_buddy_by_jid( ic, "nekkid@lamejab.net", 0 ) );
    86        
    87         /* Fixing a bug in this branch that caused information to get lost when
    88            removing the first full JID from a list. */
    89         jabber_buddy_add( ic, "bugtest@google.com/A" );
    90         jabber_buddy_add( ic, "bugtest@google.com/B" );
    91         jabber_buddy_add( ic, "bugtest@google.com/C" );
    92         fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/A" ) );
    93         fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/B" ) );
    94         fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/C" ) );
    9574}
    9675
     
    10685        jd->buddies = g_hash_table_new( g_str_hash, g_str_equal );
    10786        set_add( &ic->acc->set, "resource_select", "priority", NULL, ic->acc );
    108         set_add( &ic->acc->set, "activity_timeout", "120", NULL, ic->acc );
    10987       
    11088        suite_add_tcase (s, tc_core);
Note: See TracChangeset for help on using the changeset viewer.