eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit c2abc212adee605eca384809fc1ce21e1a1866fd
parent ea2b83e5a7cbcfb573dcb05acc6bf0b05360cf6b
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Sun, 22 Jul 2018 14:15:17 +0200

network: Make networks_connected return void

The return value from network_connected is not checked and even if one
of the storage operations fails the function should probably continue
so only print a message on error.

Diffstat:
Msrc/network.c | 11++++-------
Msrc/network.h | 2+-
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/network.c b/src/network.c @@ -139,7 +139,7 @@ bool network_seen(struct network *network, struct timespec *when) return true; } -bool network_connected(struct network *network) +void network_connected(struct network *network) { int err; const char *strtype; @@ -148,8 +148,6 @@ bool network_connected(struct network *network) l_queue_push_head(networks, network->info); strtype = security_to_str(network_get_security(network)); - if (!strtype) - return false; err = storage_network_touch(strtype, network->info->ssid); switch (err) { @@ -169,17 +167,16 @@ bool network_connected(struct network *network) network->settings); break; default: - return false; + l_error("Error %i touching network config", err); + break; } err = storage_network_get_mtime(strtype, network->info->ssid, &network->info->connected_time); if (err < 0) - return false; + l_error("Error %i reading network timestamp", err); network->info->is_known = true; - - return true; } void network_disconnected(struct network *network) diff --git a/src/network.h b/src/network.h @@ -28,7 +28,7 @@ struct network; struct scan_bss; bool network_seen(struct network *network, struct timespec *when); -bool network_connected(struct network *network); +void network_connected(struct network *network); void network_disconnected(struct network *network); bool network_rankmod(const struct network *network, double *rankmod);