- Timestamp:
- 2008-02-03T21:30:03Z (16 years ago)
- Branches:
- master
- Children:
- 3c80a9d
- Parents:
- b5c8a34
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage.c
rb5c8a34 r764c7d1 29 29 #include "bitlbee.h" 30 30 #include "crypting.h" 31 #include "otr.h" 31 32 32 33 extern storage_t storage_text; … … 115 116 if (status == STORAGE_OK) { 116 117 irc_setpass(irc, password); 118 otr_load(irc); /* load our OTR userstate */ 117 119 return status; 118 120 } 119 121 120 if (status != STORAGE_NO_SUCH_USER) 122 if (status != STORAGE_NO_SUCH_USER) { 121 123 return status; 124 } 122 125 } 123 126 … … 127 130 storage_status_t storage_save (irc_t *irc, int overwrite) 128 131 { 129 return ((storage_t *)global.storage->data)->save(irc, overwrite); 132 storage_status_t st; 133 134 otr_save(irc); 135 st = ((storage_t *)global.storage->data)->save(irc, overwrite); 136 return st; 130 137 } 131 138 … … 147 154 ret = status; 148 155 } 156 if (ret == STORAGE_OK) { 157 otr_remove(nick); 158 } 149 159 150 160 return ret; … … 157 167 storage_t *primary_storage = gl->data; 158 168 irc_t *irc; 159 169 160 170 /* First, try to rename in the current write backend, assuming onick 161 171 * is stored there */ 162 172 status = primary_storage->rename(onick, nnick, password); 163 if (status != STORAGE_NO_SUCH_USER) 173 if (status != STORAGE_NO_SUCH_USER) { 174 otr_rename(onick, nnick); 164 175 return status; 176 } 165 177 166 178 /* Try to load from a migration backend and save to the current backend. … … 186 198 187 199 storage_remove(onick, password); 200 otr_rename(onick, nnick); 188 201 189 202 return STORAGE_OK;
Note: See TracChangeset
for help on using the changeset viewer.