[glib] GDBus: Hold lock when printing debug messages



commit 1ca6a4687a9b66e0060f16583ac21ef94f24a38e
Author: David Zeuthen <davidz redhat com>
Date:   Fri Jul 2 09:40:59 2010 -0400

    GDBus: Hold lock when printing debug messages
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 gio/gdbusauth.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index b2a9307..b0af4fa 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -58,6 +58,8 @@ debug_print (const gchar *message, ...)
       va_list var_args;
       guint n;
 
+      _g_dbus_debug_print_lock ();
+
       va_start (var_args, message);
       s = g_strdup_vprintf (message, var_args);
       va_end (var_args);
@@ -75,6 +77,8 @@ debug_print (const gchar *message, ...)
       g_print ("GDBus-debug:Auth: %s\n", str->str);
       g_string_free (str, TRUE);
       g_free (s);
+
+      _g_dbus_debug_print_unlock ();
     }
 }
 



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