Re: nm_device_wifi_get_access_point returns an invalid number of APs.



On Tue, 2010-08-10 at 20:22 -0700, pan son wrote:
> Hi All,
> I am writing my UI client to the Network Manager.
> I periodically call the nm_device_wifi_get_access_points after every
> 60 seconds. What I see is everytime the number of APs returned are
> more then the previous call and most of them have ssid as (hidden). I
> also see lots of signal "access-point-added", but I dont see anything
> happening on the NMA applet as the same time. 
> 
> I dont see the same thing on NMA applet. Do I need to ref/ unref the
> NMAccessPoints everytime I refresh my screen. 
> 
> I am newbie and am just getting the hold of glib-gobject system. Any
> help is very much appreciated.

The objects returned by that call are owned by libnm-glib, so you only
need to unreference them if you ever explicitly called g_object_ref() on
them at any point.

When you see the problem, does the #  of access points returned by
nm_device_wifi_get_access_points() correspond to the output of
'nm-tool'?  I took a quick look at the code and it seems to be doing the
right thing, provided that NetworkManager is correctly aging the access
points and sending the AccessPointRemoved signal when they are removed
from NM's internal list.

Dan




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