[libsocialweb] facebook: Set error in initable failure



commit 607ad79329cd208bbbf0990037001b1108bbe8e9
Author: Rob Bradford <rob linux intel com>
Date:   Wed Nov 9 15:18:48 2011 +0000

    facebook: Set error in initable failure
    
    The loader assumes that the error is set when initable fails.

 services/facebook/facebook.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/services/facebook/facebook.c b/services/facebook/facebook.c
index 0e3825f..bcffe35 100644
--- a/services/facebook/facebook.c
+++ b/services/facebook/facebook.c
@@ -419,17 +419,26 @@ sw_service_facebook_initable (GInitable     *initable,
                                      NULL);
 
   if (auth_url == NULL) {
-    g_warning ("Auth URL not found in keys file");
+    g_set_error_literal (error,
+                         SW_SERVICE_ERROR,
+                         SW_SERVICE_ERROR_INCOMPLETE_KEY_FILE,
+                         "Auth URL not found in keys file");
     goto out;
   }
 
   if (graph_url == NULL) {
-    g_warning ("Graph URL not found in keys file");
+    g_set_error_literal (error,
+                         SW_SERVICE_ERROR,
+                         SW_SERVICE_ERROR_INCOMPLETE_KEY_FILE,
+                         "Graph URL not found in keys file");
     goto out;
   }
 
   if (video_url == NULL) {
-    g_warning ("Video upload URL not found in keys file");
+    g_set_error_literal (error,
+                         SW_SERVICE_ERROR,
+                         SW_SERVICE_ERROR_INCOMPLETE_KEY_FILE,
+                         "Video upload URL not found in keys file");
     goto out;
   }
 



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