Changes in storage.c [ba7d16f:2dcaf9a]
Legend:
- Unmodified
- Added
- Removed
-
storage.c
rba7d16f r2dcaf9a 115 115 status = st->load(irc, password); 116 116 if (status == STORAGE_OK) 117 { 118 GSList *l; 119 for( l = irc_plugins; l; l = l->next ) 120 { 121 irc_plugin_t *p = l->data; 122 if( p->storage_load ) 123 p->storage_load( irc ); 124 } 117 125 return status; 126 } 118 127 119 128 if (status != STORAGE_NO_SUCH_USER) … … 127 136 { 128 137 storage_status_t st; 138 GSList *l; 129 139 130 140 if (password != NULL) { … … 140 150 st = ((storage_t *)global.storage->data)->save(irc, overwrite); 141 151 152 for( l = irc_plugins; l; l = l->next ) 153 { 154 irc_plugin_t *p = l->data; 155 if( p->storage_save ) 156 p->storage_save( irc ); 157 } 158 142 159 if (password != NULL) { 143 160 irc_setpass(irc, NULL); … … 151 168 GList *gl; 152 169 storage_status_t ret = STORAGE_OK; 170 gboolean ok = FALSE; 171 GSList *l; 153 172 154 173 /* Remove this account from all storage backends. If this isn't … … 160 179 161 180 status = st->remove(nick, password); 181 ok |= status == STORAGE_OK; 162 182 if (status != STORAGE_NO_SUCH_USER && status != STORAGE_OK) 163 183 ret = status; 164 184 } 185 186 /* If at least one succeeded, remove plugin data. */ 187 if( ok ) 188 for( l = irc_plugins; l; l = l->next ) 189 { 190 irc_plugin_t *p = l->data; 191 if( p->storage_remove ) 192 p->storage_remove( nick ); 193 } 165 194 166 195 return ret;
Note: See TracChangeset
for help on using the changeset viewer.