[epiphany] ephy-profile-utils: make ephy_profile_utils_do_migration more verbose on failure
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-profile-utils: make ephy_profile_utils_do_migration more verbose on failure
- Date: Wed, 9 May 2012 16:11:25 +0000 (UTC)
commit cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda
Author: Xan Lopez <xan igalia com>
Date: Wed May 9 17:59:04 2012 +0200
ephy-profile-utils: make ephy_profile_utils_do_migration more verbose on failure
So we can properly test it.
lib/ephy-profile-utils.c | 11 +++++++----
lib/ephy-profile-utils.h | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index a9edd72..05367be 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -187,19 +187,22 @@ _ephy_profile_utils_query_form_auth_data (const char *uri,
g_free (key_str);
}
-void
+gboolean
ephy_profile_utils_do_migration ()
{
+ gboolean ret;
GError *error = NULL;
char *argv[1] = { "ephy-profile-migrator" };
char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" };
- g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH,
- NULL, NULL, NULL, NULL,
- NULL, &error);
+ ret = g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH,
+ NULL, NULL, NULL, NULL,
+ NULL, &error);
if (error) {
LOG ("Failed to run migrator: %s", error->message);
g_error_free (error);
}
+
+ return ret;
}
diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h
index d26fe1c..6a01549 100644
--- a/lib/ephy-profile-utils.h
+++ b/lib/ephy-profile-utils.h
@@ -32,7 +32,7 @@ int ephy_profile_utils_get_migration_version (void);
gboolean ephy_profile_utils_set_migration_version (int version);
-void ephy_profile_utils_do_migration (void);
+gboolean ephy_profile_utils_do_migration (void);
void _ephy_profile_utils_store_form_auth_data (const char *uri,
const char *form_username,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]