Changeset 51e9a1d


Ignore:
Timestamp:
2010-09-19T18:19:31Z (14 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
Branches:
master
Children:
99a01b9
Parents:
76e2f62
Message:

call storage_save before freeing plugins, avoids segfault in otr.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r76e2f62 r51e9a1d  
    222222        log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd );
    223223       
     224        if( irc->status & USTATUS_IDENTIFIED && set_getbool( &irc->b->set, "save_on_quit" ) )
     225                if( storage_save( irc, NULL, TRUE ) != STORAGE_OK )
     226                        log_message( LOGLVL_WARNING, "Error while saving settings for user %s", irc->user->nick );
     227       
    224228        for( l = irc_plugins; l; l = l->next )
    225229        {
     
    228232                        p->irc_free( irc );
    229233        }
    230        
    231         if( irc->status & USTATUS_IDENTIFIED && set_getbool( &irc->b->set, "save_on_quit" ) )
    232                 if( storage_save( irc, NULL, TRUE ) != STORAGE_OK )
    233                         log_message( LOGLVL_WARNING, "Error while saving settings for user %s", irc->user->nick );
    234234       
    235235        irc_connection_list = g_slist_remove( irc_connection_list, irc );
Note: See TracChangeset for help on using the changeset viewer.