[glib] g_warning on inconsistent subtree behaviour



commit fe6338f446f52deeb64aa10fab1c72fa64953472
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jul 15 19:37:26 2010 -0400

    g_warning on inconsistent subtree behaviour
    
    If the subtree introspection function indicates that an interface exists
    but then the dispatch function returns a NULL vtable for that interface,
    issue a g_warning pointing programmers in the right direction.

 gio/gdbusconnection.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index b98fe24..6071da5 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -5410,7 +5410,12 @@ handle_subtree_method_invocation (GDBusConnection *connection,
                                                &interface_user_data,
                                                es->user_data);
       if (interface_vtable == NULL)
-        goto out;
+        {
+          g_warning ("The subtree introspection function indicates that '%s' "
+                     "is a valid interface name, but calling the dispatch "
+                     "function on that interface gave us NULL", interface_name);
+          goto out;
+        }
 
       if (is_property_get || is_property_set)
         {



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