Re: Trouble using the dbus method GetDevices() with the glib library..



On Thu, 2011-10-06 at 20:02 +0100, Iraq Ja wrote:
> When I try to use the GetDevices() method using the glib library, I
> get the following error message:
> 
> 
> ** ERROR **: Error calling GetDevices: Unregistered object at path
> '/org/freedesktop/NetworkManager/Devices/0'
> 
> 
> I've attached the program that causes the error.
> 
> 
> I just want to make sure that this is a issue with the dbus-glib
> library, if so I'll report it.

It's not; I think its caused by poor documentation of the
DBUS_TYPE_G_OBJECT_ARRAY marshalling type.  From a quick look at the
dbus-glib and dbus code, that looks like it only works from a *server*
program, because it uses dbus_connection_get_object_path_data() to find
objects registered with that path, but that dbus library function only
operates on objects that have been registered for export.  So I don't
think it's what you want.

Instead, use dbus_g_type_get_collection ("GPtrArray",
DBUS_TYPE_G_OBJECT_PATH) instead, and you'll get a GPtrArray of "char *"
which you can then create your own DBusGProxys from.

Dan

> 
> Any help/advice would be appreciated.
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




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