[Pkg-utopia-maintainers] Bug#541632: here's a patch to fix it

Andres Salomon dilinger at collabora.co.uk
Sat Aug 15 00:45:04 UTC 2009


tags 541632 + upstream patch
thanks

From 72d42430f2140dfc1675232c9d6b77b100ad1e5b Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger at collabora.co.uk>
Date: Fri, 14 Aug 2009 20:35:17 -0400
Subject: [PATCH] dbus-gvalue: set an error when demarshal_basic doesn't recognize type

By passing dbus_g_proxy_call an incorrect signature, we can cause
the function to fail but not provide any error message.  This isn't
helpful.  This patch causes it to set an error when demarshalling
a type that it's not expecting.  Instead of a NULL error, one instead
sees something like the following when the method returns a path
object but the client expected a string:

modem Create() failed: Expected type gchararray, got type code 'o'

Signed-off-by: Andres Salomon <dilinger at collabora.co.uk>
---
 dbus/dbus-gvalue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c
index 49ae16e..02c7d7a 100644
--- a/dbus/dbus-gvalue.c
+++ b/dbus/dbus-gvalue.c
@@ -586,7 +586,7 @@ demarshal_basic (DBusGValueMarshalCtx      *context,
       }
     default:
       g_assert_not_reached ();
-      return FALSE;
+      goto invalid_type;
     }
   invalid_type:
     g_set_error (error,
-- 
1.6.3.3






More information about the Pkg-utopia-maintainers mailing list