Blame SOURCES/revert-g-source-remove-critical.patch

694683
From c2ff9875185b49cae573c72dbbf419dbb2c4aaca Mon Sep 17 00:00:00 2001
694683
From: Ray Strode <rstrode@redhat.com>
694683
Date: Wed, 3 Sep 2014 10:36:14 -0400
694683
Subject: [PATCH] Revert "gmain: Warn when g_source_remove() fails"
694683
694683
This reverts commit a919be3d39150328874ff647fb2c2be7af3df996.
694683
---
694683
 glib/gmain.c | 19 ++++++++-----------
694683
 1 file changed, 8 insertions(+), 11 deletions(-)
694683
694683
diff --git a/glib/gmain.c b/glib/gmain.c
694683
index 45ed402..085fb2b 100644
694683
--- a/glib/gmain.c
694683
+++ b/glib/gmain.c
694683
@@ -2137,88 +2137,85 @@ g_main_context_find_source_by_user_data (GMainContext *context,
694683
   if (context == NULL)
694683
     context = g_main_context_default ();
694683
   
694683
   LOCK_CONTEXT (context);
694683
 
694683
   g_source_iter_init (&iter, context, FALSE);
694683
   while (g_source_iter_next (&iter, &source))
694683
     {
694683
       if (!SOURCE_DESTROYED (source) &&
694683
 	  source->callback_funcs)
694683
 	{
694683
 	  GSourceFunc callback;
694683
 	  gpointer callback_data = NULL;
694683
 
694683
 	  source->callback_funcs->get (source->callback_data, source, &callback, &callback_data);
694683
 
694683
 	  if (callback_data == user_data)
694683
 	    break;
694683
 	}
694683
     }
694683
   g_source_iter_clear (&iter);
694683
 
694683
   UNLOCK_CONTEXT (context);
694683
 
694683
   return source;
694683
 }
694683
 
694683
 /**
694683
  * g_source_remove:
694683
  * @tag: the ID of the source to remove.
694683
- *
694683
- * Removes the source with the given id from the default main context.
694683
- *
694683
- * The id of a #GSource is given by g_source_get_id(), or will be
694683
- * returned by the functions g_source_attach(), g_idle_add(),
694683
- * g_idle_add_full(), g_timeout_add(), g_timeout_add_full(),
694683
- * g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and
694683
- * g_io_add_watch_full().
694683
+ * 
694683
+ * Removes the source with the given id from the default main context. 
694683
+ * The id of
694683
+ * a #GSource is given by g_source_get_id(), or will be returned by the
694683
+ * functions g_source_attach(), g_idle_add(), g_idle_add_full(),
694683
+ * g_timeout_add(), g_timeout_add_full(), g_child_watch_add(),
694683
+ * g_child_watch_add_full(), g_io_add_watch(), and g_io_add_watch_full().
694683
  *
694683
  * See also g_source_destroy(). You must use g_source_destroy() for sources
694683
  * added to a non-default main context.
694683
  *
694683
  * It is a programmer error to attempt to remove a non-existent source.
694683
  *
694683
  * Returns: For historical reasons, this function always returns %TRUE
694683
  **/
694683
 gboolean
694683
 g_source_remove (guint tag)
694683
 {
694683
   GSource *source;
694683
-
694683
+  
694683
   g_return_val_if_fail (tag > 0, FALSE);
694683
 
694683
   source = g_main_context_find_source_by_id (NULL, tag);
694683
   if (source)
694683
     g_source_destroy (source);
694683
-  else
694683
-    g_critical ("Source ID %u was not found when attempting to remove it", tag);
694683
 
694683
   return source != NULL;
694683
 }
694683
 
694683
 /**
694683
  * g_source_remove_by_user_data:
694683
  * @user_data: the user_data for the callback.
694683
  * 
694683
  * Removes a source from the default main loop context given the user
694683
  * data for the callback. If multiple sources exist with the same user
694683
  * data, only one will be destroyed.
694683
  * 
694683
  * Returns: %TRUE if a source was found and removed. 
694683
  **/
694683
 gboolean
694683
 g_source_remove_by_user_data (gpointer user_data)
694683
 {
694683
   GSource *source;
694683
   
694683
   source = g_main_context_find_source_by_user_data (NULL, user_data);
694683
   if (source)
694683
     {
694683
       g_source_destroy (source);
694683
       return TRUE;
694683
     }
694683
   else
694683
     return FALSE;
694683
 }
694683
 
694683
 /**
694683
-- 
694683
2.0.1
694683