Changeset 0c85c08 for storage.c


Ignore:
Timestamp:
2010-08-31T23:18:21Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
934db064
Parents:
f5c0d8e
Message:

Pluginify this thing a little bit. Not so much in the dynamically loadable
sense of the word, more in a way that core files don't have to include otr.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage.c

    rf5c0d8e r0c85c08  
    2828#define BITLBEE_CORE
    2929#include "bitlbee.h"
    30 #include "otr.h"
    3130
    3231extern storage_t storage_text;
     
    115114
    116115                status = st->load(irc, password);
    117                 if (status == STORAGE_OK) {
    118                         otr_load(irc);
     116                if (status == STORAGE_OK)
    119117                        return status;
    120                 }
     118               
    121119                if (status != STORAGE_NO_SUCH_USER)
    122120                        return status;
     
    139137                return STORAGE_NO_SUCH_USER;
    140138        }
    141 
    142         otr_save(irc);
     139       
    143140        st = ((storage_t *)global.storage->data)->save(irc, overwrite);
    144141       
     
    166163                        ret = status;
    167164        }
    168         if (ret == STORAGE_OK) {
    169                 otr_remove(nick);
    170         }
    171165       
    172166        return ret;
     
    182176        storage_t *primary_storage = gl->data;
    183177        irc_t *irc;
    184        
     178
    185179        /* First, try to rename in the current write backend, assuming onick
    186180         * is stored there */
    187181        status = primary_storage->rename(onick, nnick, password);
    188         if (status != STORAGE_NO_SUCH_USER) {
    189                 otr_rename(onick, nnick);
     182        if (status != STORAGE_NO_SUCH_USER)
    190183                return status;
    191         }
    192184
    193185        /* Try to load from a migration backend and save to the current backend.
     
    213205
    214206        storage_remove(onick, password);
    215         otr_rename(onick, nnick);
    216207
    217208        return STORAGE_OK;
Note: See TracChangeset for help on using the changeset viewer.