[gconf/port-to-dbus: 9/23] backend: Surround locking by HAVE_CORBA ifdef blocks



commit 0d45f84fb771f09a690fca28ce2d191bc05349da
Author: Rob Bradford <rob linux intel com>
Date:   Thu Jun 16 13:30:21 2011 +0100

    backend: Surround locking by HAVE_CORBA ifdef blocks

 backends/markup-backend.c |   10 ++++++++--
 backends/xml-backend.c    |   10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/backends/markup-backend.c b/backends/markup-backend.c
index 3e653df..b85e79b 100644
--- a/backends/markup-backend.c
+++ b/backends/markup-backend.c
@@ -340,6 +340,7 @@ resolve_address (const char *address,
     else
       flags |= GCONF_SOURCE_NEVER_WRITEABLE;
 
+#ifdef HAVE_CORBA
     /* We only do locking if it's writable,
      * and if not using local locks,
      * which is sort of broken but close enough
@@ -364,6 +365,7 @@ resolve_address (const char *address,
             return NULL;
           }
       }
+#endif
   }
 
   {
@@ -906,10 +908,13 @@ ms_new (const char* root_dir,
 static void
 ms_destroy (MarkupSource* ms)
 {
+#ifdef HAVE_CORBA
   GError* error = NULL;
-  
+#endif
+
   g_return_if_fail (ms != NULL);
 
+#ifdef HAVE_CORBA
   /* do this first in case we're in a "fast cleanup just before exit"
    * situation
    */
@@ -920,7 +925,8 @@ ms_destroy (MarkupSource* ms)
       g_error_free(error);
       error = NULL;
     }
-  
+#endif
+
   markup_tree_unref (ms->tree);
 
   g_free (ms->root_dir);
diff --git a/backends/xml-backend.c b/backends/xml-backend.c
index 5a12f87..e845533 100644
--- a/backends/xml-backend.c
+++ b/backends/xml-backend.c
@@ -394,6 +394,7 @@ resolve_address (const gchar* address, GError** err)
     if (writable)
       flags |= GCONF_SOURCE_ALL_WRITEABLE;
 
+#ifdef HAVE_CORBA
     /* We only do locking if it's writable,
      * and if not using local locks,
      * which is sort of broken but close enough
@@ -417,6 +418,7 @@ resolve_address (const gchar* address, GError** err)
             return NULL;
           }
       }
+#endif
   }
 
   {
@@ -869,10 +871,13 @@ xs_new       (const gchar* root_dir, guint dir_mode, guint file_mode, GConfLock*
 static void
 xs_destroy   (XMLSource* xs)
 {
+#ifdef HAVE_CORBA
   GError* error = NULL;
-  
+#endif
+
   g_return_if_fail(xs != NULL);
 
+#ifdef HAVE_CORBA
   /* do this first in case we're in a "fast cleanup just before exit"
      situation */
   if (xs->lock != NULL && !gconf_release_lock(xs->lock, &error))
@@ -882,7 +887,8 @@ xs_destroy   (XMLSource* xs)
       g_error_free(error);
       error = NULL;
     }
-  
+#endif
+
   if (!g_source_remove(xs->timeout_id))
     {
       /* should not happen, don't translate */



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