Re: Method "getActiveDevice" doesn't exist



On Fri, 2005-05-20 at 19:32 +0100, Bastien Nocera wrote:
> Heya,
> 
> I was trying to get NetworkManager CVS running after seeing the new VPN
> feature. However, the applet keeps telling me it can't find any devices.
> The problem seems to be deeper than that:
> 
> $ ./nmtest
> NM State: 4
> nmwa_dbus_call_nm_method(): org.freedesktop.DBus.Error.UnknownMethod
> raised:
>  Method "getActiveDevice" with signature "" on interface
> "org.freedesktop.NetworkManager" doesn't exist
> 
> 
> Active device: '(none)'
> Devices:
>    /org/freedesktop/NetworkManager/Devices/eth1
>        Device type: wired
> 
>    /org/freedesktop/NetworkManager/Devices/eth0
>        Device type: wireless
>        Strength: -1%
>        Active Network: '(null)'
>        Networks:
>            /org/freedesktop/NetworkManager/Devices/eth0/Networks/idoru
> (idoru) Strength: 0%
>            /org/freedesktop/NetworkManager/Devices/eth0/Networks/default
> (default)  Strength: 0%
> 
> NetworkManager is CVS HEAD, and dbus 0.33-2 from FC4t3.
> 
> Any ideas what's going on there?

Yeah, sorry dude.  After the switch to stage-based activation, this
method went away.  There is now an "active" property on each device that
gets passed back.  Currently it is only available if you get the entire
device with "getProperties":

  dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, &op,
    DBUS_TYPE_STRING, &iface,
    DBUS_TYPE_UINT32, &type,
    DBUS_TYPE_STRING, &udi,
    DBUS_TYPE_BOOLEAN,&active,
    DBUS_TYPE_UINT32, &act_stage,
    DBUS_TYPE_UINT32, &ip4_address,
    DBUS_TYPE_STRING, &hw_addr_buf_ptr,
    DBUS_TYPE_UINT32, &mode,
    DBUS_TYPE_INT32,  &strength,
    DBUS_TYPE_BOOLEAN,&link_active,
    DBUS_TYPE_UINT32, &driver_support_level,
    DBUS_TYPE_STRING, &active_network_path,
    DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &networks, num_networks,
    DBUS_TYPE_INVALID);

I could add a single "active" call that returns a boolean if you'd like,
I didn't add one initially because the applet didn't need one.

Dan




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