e_async_closure_callback: Do not test 'object' parameter validity
authorMilan Crha <mcrha@redhat.com>
Fri, 2 Nov 2012 10:09:03 +0000 (11:09 +0100)
committerMilan Crha <mcrha@redhat.com>
Fri, 2 Nov 2012 10:09:03 +0000 (11:09 +0100)
It is unnecessary to test validity of the 'object' parameter,
especially when this callback does nothing with it. The reason
is that the secret_password_store() calls the callback with NULL
'object', which leads to a deadlock on the source registry side.

libedataserver/e-data-server-util.c

index 77262d6..e5539be 100644 (file)
@@ -1369,7 +1369,7 @@ e_async_closure_free (EAsyncClosure *closure)
 
 /**
  * e_async_closure_callback:
- * @object: a #GObject
+ * @object: a #GObject or %NULL, it is not used by the function at all
  * @result: a #GAsyncResult
  * @closure: an #EAsyncClosure
  *
@@ -1387,7 +1387,6 @@ e_async_closure_callback (GObject *object,
 {
        EAsyncClosure *real_closure;
 
-       g_return_if_fail (G_IS_OBJECT (object));
        g_return_if_fail (G_IS_ASYNC_RESULT (result));
        g_return_if_fail (closure != NULL);