Re: Adding a LastSeen property to accesspoints and ScanDone signal

On Thu, 2014-09-04 at 22:04 -0400, Mathieu Trudel-Lapierre wrote:

We've been trying to use NetworkManager to get a better idea of the
reliability of wireless networks (their age, mostly) for use by

I expanded LastSeen to be exposed both over DBus for this purpose, as
well as in libnm-glib. I've also added a SCAN_DONE signal NMDeviceWifi,
again to be exposed via DBus. I did run into minor issues with this though,
and so patch 3/4 and 4/4 fix the supplicant sending extra ScanDone signals
to NMDeviceWifi, and how the last-seen property gets updated at the end
of a scan.

We revisited this on IRC:

Patch #2, #3, and #4 are fine.

Patch #1 needs some fixups, namely:

1) fix the D-Bus property documentation, and mention that the value is
absolute in CLOCK_BOOTTIME seconds, so CLOCK_BOOTTIME seconds -
last_seen = seconds ago the AP was last seen

2) make the property a u32 (it'll never be negative)

3) same thing for libnm-glib, a u32, and update the code documentation
to talk about CLOCK_BOOTTIME etc

4) for nm-wifi-ap.c, keep the current 'gint' stuff for
nm_ap_set_last_seen(), but in get_property() convert last_seen into
BOOTTIME units with nm_utils_monotonic_timestamp_as_boottime() from
Thomas' patch so that D-Bus clients see BOOTTIME, and add a code comment
about this in get_property()

Sound OK?


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