Re: question about get access points function
- From: Dan Williams <dcbw redhat com>
- To: charlyliu linpus com
- Cc: networkmanager-list <networkmanager-list gnome org>
- Subject: Re: question about get access points function
- Date: Mon, 31 Mar 2008 15:11:45 -0400
On Mon, 2008-03-31 at 17:06 +0800, charlyliu wrote:
> Hi all,
>
> I downloaded the last friday's svn revision and I saw that in this version it doesn't update well the ap list in the file nm-device-802-11-wireless.c from libnm-glib. More exactly the problem is in function nm_device_802_11_wireless_get_access_points (well, I think). After looking a little bit, I don't understand why there is a condition for priv->aps. the code is:
>
> if (priv->aps)
> return handle_ptr_array_return (priv->aps);
>
> If I remove this lines, it works and I didn't notice any new bug.
If you remove those lines, you're hitting up D-Bus every time you call
get_access_points(), and that adds latency to the call. libnm-glib
updates the access point list asynchronously based on signals sent from
NetworkManager (see access_point_added_proxy() and
access_point_removed_proxy()). Therefore, if priv->aps exists, it's
guaranteed (presuming those two functions work right) that the AP list
is always up-to-date, and you don't need to ask NetworkManager for it
again.
There was a bug in access_point_added_proxy() which wouldn't add new APs
to the list, which was fixed over the weekend. Give latest SVN a try
and see if that helps.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]