Changes in storage.c [3183c21:823de9d]
Legend:
- Unmodified
- Added
- Removed
-
storage.c
r3183c21 r823de9d 29 29 #include "bitlbee.h" 30 30 #include "crypting.h" 31 #include "otr.h" 31 32 32 33 extern storage_t storage_text; … … 116 117 117 118 status = st->load(irc, password); 118 if (status == STORAGE_OK) 119 if (status == STORAGE_OK) { 120 otr_load(irc); 119 121 return status; 122 } 120 123 121 124 if (status != STORAGE_NO_SUCH_USER) … … 139 142 return STORAGE_NO_SUCH_USER; 140 143 } 141 144 145 otr_save(irc); 142 146 st = ((storage_t *)global.storage->data)->save(irc, overwrite); 143 147 … … 165 169 ret = status; 166 170 } 171 if (ret == STORAGE_OK) { 172 otr_remove(nick); 173 } 167 174 168 175 return ret; … … 178 185 storage_t *primary_storage = gl->data; 179 186 irc_t *irc; 180 187 181 188 /* First, try to rename in the current write backend, assuming onick 182 189 * is stored there */ 183 190 status = primary_storage->rename(onick, nnick, password); 184 if (status != STORAGE_NO_SUCH_USER) 191 if (status != STORAGE_NO_SUCH_USER) { 192 otr_rename(onick, nnick); 185 193 return status; 194 } 186 195 187 196 /* Try to load from a migration backend and save to the current backend. … … 207 216 208 217 storage_remove(onick, password); 218 otr_rename(onick, nnick); 209 219 210 220 return STORAGE_OK;
Note: See TracChangeset
for help on using the changeset viewer.