3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-18 01:59:31 +01:00

network: Stop tracking network last seen times

Drop the corresponding network_info field, function and D-Bus property.
The last seen times didn't seem useful but if a client needs them it can
probably implement the same logic with the information already available
through DBus.
This commit is contained in:
Andrew Zaborowski 2018-07-31 16:37:03 +02:00 committed by Denis Kenzior
parent e3737fd44e
commit 319b6416de
4 changed files with 0 additions and 27 deletions

View File

@ -308,9 +308,6 @@ static bool process_bss(struct device *device, struct scan_bss *bss,
network_get_ssid(network), security_to_str(security));
}
if (network_bss_list_isempty(network))
network_seen(network, timestamp);
network_bss_add(network, bss);
if (device->state != DEVICE_STATE_AUTOCONNECT)
@ -1179,8 +1176,6 @@ next:
clock_gettime(CLOCK_REALTIME, &now);
network_seen(network, &now);
/* See if we have anywhere to roam to */
if (!best_bss || bss_match(best_bss, device->connected_bss))
goto fail_free_bss;

View File

@ -180,14 +180,6 @@ static bool known_network_append_properties(
datestr);
}
if (network->seen_time.tv_sec != 0) {
gmtime_r(&network->seen_time.tv_sec, &tm);
if (strftime(datestr, sizeof(datestr), "%FT%TZ", &tm))
dbus_dict_append_string(builder, "LastSeenTime",
datestr);
}
l_dbus_message_builder_leave_array(builder);
return true;

View File

@ -109,19 +109,6 @@ static bool network_info_ptr_match(const void *a, const void *b)
return a == b;
}
bool network_seen(struct network *network, struct timespec *when)
{
/*
* Update the last seen time. Note this is not preserved across
* the network going out of range and back, or program restarts.
* It may be desirable for it to be preserved in some way but
* without too frequent filesystem writes.
*/
memcpy(&network->info->seen_time, when, sizeof(struct timespec));
return true;
}
void network_connected(struct network *network)
{
int err;

View File

@ -28,7 +28,6 @@ struct device;
struct network;
struct scan_bss;
bool network_seen(struct network *network, struct timespec *when);
void network_connected(struct network *network);
void network_disconnected(struct network *network);
bool network_rankmod(const struct network *network, double *rankmod);