- Timestamp:
- 2013-04-20T13:05:55Z (11 years ago)
- Branches:
- master
- Children:
- dd95ce4
- Parents:
- 9b2a8c1 (diff), bfafb99 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage.c
r9b2a8c1 re31e5b8 195 195 return ret; 196 196 } 197 198 #if 0199 Not using this yet. Test thoroughly before adding UI hooks to this function.200 201 storage_status_t storage_rename (const char *onick, const char *nnick, const char *password)202 {203 storage_status_t status;204 GList *gl = global.storage;205 storage_t *primary_storage = gl->data;206 irc_t *irc;207 208 /* First, try to rename in the current write backend, assuming onick209 * is stored there */210 status = primary_storage->rename(onick, nnick, password);211 if (status != STORAGE_NO_SUCH_USER)212 return status;213 214 /* Try to load from a migration backend and save to the current backend.215 * Explicitly remove the account from the migration backend as otherwise216 * it'd still be usable under the old name */217 218 irc = g_new0(irc_t, 1);219 status = storage_load(onick, password, irc);220 if (status != STORAGE_OK) {221 irc_free(irc);222 return status;223 }224 225 g_free(irc->nick);226 irc->nick = g_strdup(nnick);227 228 status = storage_save(irc, FALSE);229 if (status != STORAGE_OK) {230 irc_free(irc);231 return status;232 }233 irc_free(irc);234 235 storage_remove(onick, password);236 237 return STORAGE_OK;238 }239 #endif
Note: See TracChangeset
for help on using the changeset viewer.