ORBit2 r2054 - in trunk/linc2: . src



Author: tml
Date: Wed Apr 23 11:31:16 2008
New Revision: 2054
URL: http://svn.gnome.org/viewvc/ORBit2?rev=2054&view=rev

Log:
2008-04-18  Tor Lillqvist  <tml novell com>

	Bug 514993 - Get rid of the "FIXME: guard from double entry" warning

	* src/linc.c (link_set_io_thread): Get rid of the warning.
        (link_exec_set_io_thread): Instead rearrange the locking and
	testing of flag here.



Modified:
   trunk/linc2/ChangeLog
   trunk/linc2/src/linc.c

Modified: trunk/linc2/src/linc.c
==============================================================================
--- trunk/linc2/src/linc.c	(original)
+++ trunk/linc2/src/linc.c	Wed Apr 23 11:31:16 2008
@@ -435,10 +435,12 @@
 	GError *error = NULL;
 	gboolean to_io_thread = TRUE;
 
-	if (link_is_io_in_thread)
+	link_lock ();
+	if (link_is_io_in_thread) {
+		link_unlock ();
 		return;
+	}
 
-	link_lock ();
 	g_mutex_lock (link_cmd_queue_lock);
 
 	link_is_io_in_thread = TRUE;
@@ -475,13 +477,6 @@
 {
 	LinkSyncCommand cmd = { { 0 }, 0 };
 
-#ifdef G_ENABLE_DEBUG
-	g_warning ("FIXME: guard from double entry");
-#endif
-
-	if (link_is_io_in_thread)
-		return;
-
 	cmd.cmd.type = LINK_COMMAND_SET_IO_THREAD;
 
 	link_exec_command (&cmd.cmd);



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