[epiphany/wip/sync: 34/47] sync-service: Move destroy_session_response_cb()



commit 2d95944739e09d6fa3dff52d924fa947fa693972
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Wed Mar 1 00:45:21 2017 +0200

    sync-service: Move destroy_session_response_cb()

 src/sync/ephy-sync-service.c |   48 +++++++++++++++++++++---------------------
 1 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/sync/ephy-sync-service.c b/src/sync/ephy-sync-service.c
index 3752d23..ac54c21 100644
--- a/src/sync/ephy-sync-service.c
+++ b/src/sync/ephy-sync-service.c
@@ -129,30 +129,6 @@ storage_server_request_async_data_free (StorageRequestAsyncData *data)
   g_slice_free (StorageRequestAsyncData, data);
 }
 
-static void
-destroy_session_response_cb (SoupSession *session,
-                             SoupMessage *msg,
-                             gpointer     user_data)
-{
-  JsonParser *parser;
-  JsonObject *json;
-
-  if (msg->status_code == 200) {
-    LOG ("Session destroyed");
-    return;
-  }
-
-  parser = json_parser_new ();
-  json_parser_load_from_data (parser, msg->response_body->data, -1, NULL);
-  json = json_node_get_object (json_parser_get_root (parser));
-
-  g_warning ("Failed to destroy session: errno: %ld, errmsg: %s",
-             json_object_get_int_member (json, "errno"),
-             json_object_get_string_member (json, "message"));
-
-  g_object_unref (parser);
-}
-
 static gboolean
 ephy_sync_service_storage_credentials_is_expired (EphySyncService *self)
 {
@@ -807,6 +783,30 @@ ephy_sync_service_clear_tokens (EphySyncService *self)
   g_clear_pointer (&self->kB, g_free);
 }
 
+static void
+destroy_session_response_cb (SoupSession *session,
+                             SoupMessage *msg,
+                             gpointer     user_data)
+{
+  JsonParser *parser;
+  JsonObject *json;
+
+  if (msg->status_code == 200) {
+    LOG ("Session destroyed");
+    return;
+  }
+
+  parser = json_parser_new ();
+  json_parser_load_from_data (parser, msg->response_body->data, -1, NULL);
+  json = json_node_get_object (json_parser_get_root (parser));
+
+  g_warning ("Failed to destroy session: errno: %ld, errmsg: %s",
+             json_object_get_int_member (json, "errno"),
+             json_object_get_string_member (json, "message"));
+
+  g_object_unref (parser);
+}
+
 void
 ephy_sync_service_destroy_session (EphySyncService *self,
                                    const char      *sessionToken)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]