[epiphany/wip/ephy-sync: 119/126] sync-service: Fix destroy_session function
- From: Gabriel - Cristian Ivascu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/ephy-sync: 119/126] sync-service: Fix destroy_session function
- Date: Fri, 19 Aug 2016 17:41:34 +0000 (UTC)
commit e00b3908d8462e8a8ce43feffc54a51da51a6bca
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Sat Aug 13 17:07:15 2016 +0300
sync-service: Fix destroy_session function
src/ephy-sync-service.c | 2 ++
src/prefs-dialog.c | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-sync-service.c b/src/ephy-sync-service.c
index 4e4be6b..49bc630 100644
--- a/src/ephy-sync-service.c
+++ b/src/ephy-sync-service.c
@@ -852,6 +852,8 @@ ephy_sync_service_destroy_session (EphySyncService *self,
const gchar *endpoint = "session/destroy";
const gchar *request_body = "{}";
+ if (sessionToken == NULL)
+ sessionToken = ephy_sync_service_get_token (self, TOKEN_SESSIONTOKEN);
g_return_if_fail (sessionToken != NULL);
url = g_strdup_printf ("%s%s%s",
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 70164b9..ced3d20 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -351,13 +351,11 @@ on_sync_sign_out_button_clicked (GtkWidget *button,
PrefsDialog *dialog)
{
EphySyncService *service;
- gchar *sessionToken;
service = ephy_shell_get_global_sync_service (ephy_shell_get_default ());
- sessionToken = ephy_sync_service_get_token (service, TOKEN_SESSIONTOKEN);
/* Destroy session and delete tokens. */
- ephy_sync_service_destroy_session (service, sessionToken);
+ ephy_sync_service_destroy_session (service, NULL);
ephy_sync_service_clear_storage_credentials (service);
ephy_sync_service_delete_all_tokens (service);
ephy_sync_secret_forget_all_tokens ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]