* fix _MuStore initialization; proliferate API change

This commit is contained in:
djcb
2012-06-20 20:33:58 +03:00
parent 2b43ed461b
commit dea26471d0
5 changed files with 17 additions and 24 deletions

View File

@ -415,6 +415,7 @@ with_store (store_func func, MuConfig *opts, gboolean read_only,
GError **err)
{
MuStore *store;
MuError merr;
if (read_only)
store = mu_store_new_read_only
@ -424,16 +425,14 @@ with_store (store_func func, MuConfig *opts, gboolean read_only,
store = mu_store_new_writable
(mu_runtime_path(MU_RUNTIME_PATH_XAPIANDB),
mu_runtime_path(MU_RUNTIME_PATH_CONTACTS),
(const char**)opts->my_addresses,
opts->rebuild, err);
if (!store)
return MU_G_ERROR_CODE(err);
else {
MuError merr;
merr = func (store, opts, err);
mu_store_unref (store);
return merr;
}
mu_store_set_my_addresses (store, (const char**)opts->my_addresses);
merr = func (store, opts, err);
mu_store_unref (store);
return merr;
}