Re: Unregistered object at path '/org/freedesktop/NetworkManager/Devices/0'



On Fri, 2010-11-26 at 14:05 +0100, Bluehazzard wrote:
> Hi all,
> I'm completely new in d-bus programming. I use the glib-dbus API, to 
> communicate with the Network Manager.
> The first thing i want to realize is a program, what lists me the 
> available devices.
> Sou i thought that this code should work:
> 
> NetworkManagerProxy = dbus_g_proxy_new_for_name_owner( bus,
>                                                                          
>                                          NM_DBUS_SERVICE,
>                                                                          
>                                          NM_DBUS_PATH ,
>                                                                          
>                                          NM_DBUS_INTERFACE ,
> &error);
> 
> 
> char **name_list;
> char **name_list_ptr;
> 
> if (!dbus_g_proxy_call (NetworkManagerProxy, "GetDevices", &error, 
> G_TYPE_INVALID,
>                                          DBUS_TYPE_G_OBJECT_ARRAY, 
> &name_list, G_TYPE_INVALID))
> {
>      /*error*/
>      if(error->domain == DBUS_GERROR)
>      {
>          cout << error->message << endl;
>      }
>      g_error_free (error);
> }
> else
> {
>      for (name_list_ptr = name_list; *name_list_ptr; name_list_ptr++)
>      {
>          //List of devices
>      }
> }
> 
> But i get always the errormessage "Unregistered object at path 
> '/org/freedesktop/NetworkManager/Devices/0' "
> what does this mean?

This actually indicates a bug in NetworkManager itself.  Could you post
the output of 'nm-tool' so we can see what's going on?

Thanks,
Dan




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