Ignore:
Timestamp:
2007-04-06T05:20:31Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
552e641
Parents:
0da65d5
Message:

More cleanups, mainly in the callbacks. Replaced things like
do_error_dialog() and (set|hide)_login_progress(_error)?() with things
that hopefully make more sense.

Although it's still not really great...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r0da65d5 raef4828  
    3939        if( !type )
    4040        {
    41                 hide_login_progress_error( ic, "Received IQ packet without type." );
    42                 signoff( ic );
     41                imc_error( ic, "Received IQ packet without type." );
     42                imc_logout( ic );
    4343                return XT_ABORT;
    4444        }
     
    6060               
    6161                if( entry == NULL )
    62                         serv_got_crap( ic, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s );
     62                        imc_log( ic, "WARNING: Received IQ-%s packet with unknown/expired ID %s!", type, s );
    6363                else if( entry->func )
    6464                        return entry->func( ic, node, entry->node );
     
    6969                    !( s = xt_find_attr( c, "xmlns" ) ) )
    7070                {
    71                         serv_got_crap( ic, "WARNING: Received incomplete IQ-%s packet", type );
     71                        imc_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
    7272                        return XT_HANDLED;
    7373                }
     
    132132                    !( s = xt_find_attr( c, "xmlns" ) ) )
    133133                {
    134                         serv_got_crap( ic, "WARNING: Received incomplete IQ-%s packet", type );
     134                        imc_log( ic, "WARNING: Received incomplete IQ-%s packet", type );
    135135                        return XT_HANDLED;
    136136                }
     
    154154                        else
    155155                        {
    156                                 serv_got_crap( ic, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" );
     156                                imc_log( ic, "WARNING: %s tried to fake a roster push!", s ? s : "(unknown)" );
    157157                               
    158158                                xt_free_node( reply );
     
    219219        if( !( query = xt_find_node( node->children, "query" ) ) )
    220220        {
    221                 serv_got_crap( ic, "WARNING: Received incomplete IQ packet while authenticating" );
    222                 signoff( ic );
     221                imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
     222                imc_logout( ic );
    223223                return XT_HANDLED;
    224224        }
     
    258258                xt_free_node( reply );
    259259               
    260                 hide_login_progress( ic, "Can't find suitable authentication method" );
    261                 signoff( ic );
     260                imc_error( ic, "Can't find suitable authentication method" );
     261                imc_logout( ic );
    262262                return XT_ABORT;
    263263        }
     
    277277        if( !( type = xt_find_attr( node, "type" ) ) )
    278278        {
    279                 serv_got_crap( ic, "WARNING: Received incomplete IQ packet while authenticating" );
    280                 signoff( ic );
     279                imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" );
     280                imc_logout( ic );
    281281                return XT_HANDLED;
    282282        }
     
    284284        if( strcmp( type, "error" ) == 0 )
    285285        {
    286                 hide_login_progress( ic, "Authentication failure" );
    287                 signoff( ic );
     286                imc_error( ic, "Authentication failure" );
     287                imc_logout( ic );
    288288                return XT_ABORT;
    289289        }
     
    311311                if( c && c->text_len && ( s = strchr( c->text, '/' ) ) &&
    312312                    strcmp( s + 1, set_getstr( &ic->acc->set, "resource" ) ) != 0 )
    313                         serv_got_crap( ic, "Server changed session resource string to `%s'", s + 1 );
     313                        imc_log( ic, "Server changed session resource string to `%s'", s + 1 );
    314314               
    315315                jd->flags &= ~JFLAG_WAIT_BIND;
     
    334334        int st;
    335335       
    336         set_login_progress( ic, 1, "Authenticated, requesting buddy list" );
     336        imc_log( ic, "Authenticated, requesting buddy list" );
    337337       
    338338        node = xt_new_node( "query", NULL, NULL );
     
    353353        if( !( query = xt_find_node( node->children, "query" ) ) )
    354354        {
    355                 serv_got_crap( ic, "WARNING: Received NULL roster packet" );
     355                imc_log( ic, "WARNING: Received NULL roster packet" );
    356356                return XT_HANDLED;
    357357        }
     
    397397       
    398398        if( initial )
    399                 account_online( ic );
     399                imc_connected( ic );
    400400       
    401401        return XT_HANDLED;
     
    428428        {
    429429                s = xt_find_attr( orig, "to" ); /* If this returns NULL something's wrong.. */
    430                 serv_got_crap( ic, "Could not retrieve vCard of %s", s ? s : "(NULL)" );
     430                imc_log( ic, "Could not retrieve vCard of %s", s ? s : "(NULL)" );
    431431                return XT_HANDLED;
    432432        }
     
    536536        /* *sigh* */
    537537       
    538         serv_got_crap( ic, reply->str );
     538        imc_log( ic, reply->str );
    539539        g_string_free( reply, TRUE );
    540540       
Note: See TracChangeset for help on using the changeset viewer.