Ignore:
Timestamp:
2007-04-15T22:39:35Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
84b045d
Parents:
cd4723c
Message:

Cleaned up struct im_connection. No more username/password stuff since
it's in acc too. wants_to_die is now an argument to imc_logout().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/io.c

    rcd4723c rc2fb3809  
    118118               
    119119                imc_error( ic, "Short write() to server" );
    120                 imc_logout( ic );
     120                imc_logout( ic, TRUE );
    121121                return FALSE;
    122122        }
     
    161161                {
    162162                        imc_error( ic, "XML stream error" );
    163                         imc_logout( ic );
     163                        imc_logout( ic, TRUE );
    164164                        return FALSE;
    165165                }
     
    205205                                                imc_error( ic, "TLS is turned on for this "
    206206                                                          "account, but is not supported by this server" );
    207                                                 imc_logout( ic );
     207                                                imc_logout( ic, FALSE );
    208208                                                return FALSE;
    209209                                        }
     
    217217                        {
    218218                                imc_error( ic, "XML stream error" );
    219                                 imc_logout( ic );
     219                                imc_logout( ic, TRUE );
    220220                                return FALSE;
    221221                        }
     
    228228               
    229229                imc_error( ic, "Error while reading from server" );
    230                 imc_logout( ic );
     230                imc_logout( ic, TRUE );
    231231                return FALSE;
    232232        }
     
    243243        {
    244244                imc_error( ic, "Could not connect to server" );
    245                 imc_logout( ic );
     245                imc_logout( ic, TRUE );
    246246                return FALSE;
    247247        }
     
    264264               
    265265                imc_error( ic, "Could not connect to server" );
    266                 imc_logout( ic );
     266                imc_logout( ic, TRUE );
    267267                return FALSE;
    268268        }
     
    275275static xt_status jabber_end_of_stream( struct xt_node *node, gpointer data )
    276276{
    277         imc_logout( data );
     277        imc_logout( data, TRUE );
    278278        return XT_ABORT;
    279279}
     
    298298                {
    299299                        imc_error( ic, "Server requires TLS connections, but TLS is turned off for this account" );
    300                         imc_logout( ic );
     300                        imc_logout( ic, FALSE );
    301301                       
    302302                        return XT_ABORT;
     
    328328                {
    329329                        imc_error( ic, "TLS is turned on for this account, but is not supported by this server" );
    330                         imc_logout( ic );
     330                        imc_logout( ic, FALSE );
    331331                       
    332332                        return XT_ABORT;
     
    429429        struct xt_node *c;
    430430        char *s, *type = NULL, *text = NULL;
     431        int allow_reconnect = TRUE;
    431432       
    432433        for( c = node->children; c; c = c->next )
     
    453454        {
    454455                imc_error( ic, "Unknown stream error reported by server" );
    455                 imc_logout( ic );
     456                imc_logout( ic, allow_reconnect );
    456457                return XT_ABORT;
    457458        }
     
    463464        {
    464465                imc_error( ic, "Account and resource used from a different location" );
    465                 ic->wants_to_die = TRUE;
     466                allow_reconnect = FALSE;
    466467        }
    467468        else
     
    470471        }
    471472       
    472         imc_logout( ic );
     473        imc_logout( ic, allow_reconnect );
    473474       
    474475        return XT_ABORT;
Note: See TracChangeset for help on using the changeset viewer.