Shouldn't gerror_to_dbus_error_message check for both DBUS_GERROR and DBUS_GERROR_REMOTE_EXCEPTION?

Marcel Tünnissen marcel.tunnissen at axis.com
Fri Sep 6 07:50:08 PDT 2013


Hi Simon,

Thanks for your quick answer. I checked what version this platform is
using. Apparently it is version 0.76 (ouch ;)

We are using GDBus as well, but we still have some (or many) apps using
the dbus-glib.

Cheers,

Marcel Tünnissen

On 09/06/2013 04:30 PM, Simon McVittie wrote:
> On 06/09/13 15:14, Marcel Tünnissen wrote:
>> This is obtained through a call to dbus_g_error_get_name
>> Apparently the function requires both DBUS_GERROR and
>> DBUS_GERROR_REMOTE_EXCEPTION.
> 
> Yes, as the documentation says.
> 
>> However the calling function only checks for DBUS_GERROR.
> ...
>>       if (error->domain == DBUS_GERROR)
>>        reply = dbus_message_new_error (message,
>>                                    dbus_g_error_get_name (error),
>>                                    error->message);
> 
> That looks like <https://bugs.freedesktop.org/show_bug.cgi?id=16776>,
> which I fixed in 2009 (dbus-glib 0.82). What version of dbus-glib is
> this? Update dbus-glib to the current release if possible.
> 
> Workaround, if you can't upgrade: never pass (DBUS_GERROR, x, "...") to
> dbus_g_method_return(), unless x == DBUS_GERROR_REMOTE_EXCEPTION.
> 
> (Also be aware that dbus-glib from 2009 was really quite buggy in
> general, and dbus-glib from 2013 is also pretty bad. Use GDBus, part of
> recent GLib, if you can.)
> 
>     S
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
> 

-- 
Marcel Tünnissen,
M.Sc. Computer Science
Axis Communications AB
Emdalavägen 14, SE-223 69 LUND, SWEDEN
Phone: +46 (0)46 272 2448
       +46 (0)729 890 369
Email: marcel.tunnissen at axis.com,
WWW: http://www.axis.com


More information about the dbus mailing list