[epiphany/wip/ephy-sync: 122/126] sync-bookmarks: Use LOG instead of g_warning



commit 1ed9a60c9bd6e51adc77eab7a41905a109108aa9
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Mon Aug 15 13:35:26 2016 +0300

    sync-bookmarks: Use LOG instead of g_warning

 src/ephy-sync-bookmarks.c |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/ephy-sync-bookmarks.c b/src/ephy-sync-bookmarks.c
index cb0d275..3991369 100644
--- a/src/ephy-sync-bookmarks.c
+++ b/src/ephy-sync-bookmarks.c
@@ -42,14 +42,6 @@ log_all_message_info (const gchar *text,
   LOG ("X-Weave-Alert: %s", soup_message_headers_get_one (message->response_headers, "X-Weave-Alert"));
 }
 
-static void
-warning_alert (const gchar *text,
-               SoupMessage *message)
-{
-  g_warning ("%s. Status code: %u, response: %s",
-             text, message->status_code, message->response_body->data);
-}
-
 static gchar *
 get_storage_endpoint_for_bookmark (EphyBookmark *bookmark)
 {
@@ -68,10 +60,9 @@ create_bso_collection_response_cb (SoupSession *session,
   EphySyncService *service;
 
   /* Code 412 means that the BSO already exists. Don't treat this as an error. */
-  if (message->status_code != 200 && message->status_code != 412) {
-    warning_alert ("Failed to add dummy BSO to collection", message);
-    return;
-  }
+  if (message->status_code != 200 && message->status_code != 412)
+    LOG ("Failed to add the dummy BSO. Status code: %u, response: %s",
+         message->status_code, message->response_body->data);
 
   service = ephy_shell_get_global_sync_service (ephy_shell_get_default ());
   ephy_sync_service_release_next_storage_message (service);
@@ -126,7 +117,8 @@ upload_bookmark_to_server_response_cb (SoupSession *session,
   } else if (message->status_code == 412) {
     /* FIXME: A more recent value is on the server. See how to handle this. */
   } else {
-    warning_alert ("Failed to upload bookmark to the storage server", message);
+    LOG ("Failed to upload bookmark to the server. Status code: %u, response: %s",
+         message->status_code, message->response_body->data);
   }
 
   service = ephy_shell_get_global_sync_service (ephy_shell_get_default ());


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