Re: nm_device_wifi_get_access_point returns an invalid number of APs.



I am running 0.8 Network Manager on my ubuntu 10.04.

I see that the Network Manager applet generally refreshes its list (or calls nm_device_wifi_get_access_points) at most once an hour. (?applet-device-wifi.c:1017)

Thanks,
Vink


On Thu, Aug 12, 2010 at 3:33 PM, Dan Williams <dcbw redhat com> wrote:
On Wed, 2010-08-11 at 23:18 -0700, pan son wrote:
> Thanks Dan,
>
> Nope, it does not confirm with the output of nm-tool. The NMA applet
> and nm-tool both behave same.
>
> I call nm_device_wifi_get_access_points everytime I get a
> "access-point-added" or "access-point-removed" and I see a lots of APs
> with ssid /or bssid? as (hidden), which is different from the output
> of nm-tool.

What specific version of NetworkManager are you using?

Dan

> My piece of code is pretty small, and it is straight forward to fetch
> the list of Access Points.
>
> Thanks,
> Vink
>
>
>
> On Wed, Aug 11, 2010 at 10:32 AM, Dan Williams <dcbw redhat com>
> wrote:
>
>         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]