From 2e7c11d265d09427e641fc12ffefcd0deb37dce7 Mon Sep 17 00:00:00 2001 From: Derek Dai Date: Fri, 14 Apr 2017 15:08:39 +0800 Subject: [PATCH] miracle-wifid: rename link_set_managed() rename to prevent confusing with managed event notification Change-Id: I0f0d01f97156044bbb225e199b2717d5ea9c1a24 --- src/wifi/wifid-dbus.c | 4 ++-- src/wifi/wifid-link.c | 6 +++--- src/wifi/wifid.c | 8 ++++---- src/wifi/wifid.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wifi/wifid-dbus.c b/src/wifi/wifid-dbus.c index 340258c..7e10865 100644 --- a/src/wifi/wifid-dbus.c +++ b/src/wifi/wifid-dbus.c @@ -612,7 +612,7 @@ static int link_dbus_manage(sd_bus_message *msg, sd_bus_error *err) { struct link *l = data; - int r = link_set_managed(l, true); + int r = link_manage(l, true); if(r < 0) return r; @@ -624,7 +624,7 @@ static int link_dbus_unmanage(sd_bus_message *msg, sd_bus_error *err) { struct link *l = data; - int r = link_set_managed(l, false); + int r = link_manage(l, false); if(r < 0) return r; diff --git a/src/wifi/wifid-link.c b/src/wifi/wifid-link.c index 289e6de..eccf718 100644 --- a/src/wifi/wifid-link.c +++ b/src/wifi/wifid-link.c @@ -123,7 +123,7 @@ void link_free(struct link *l) log_debug("free link: %s (%u)", l->ifname, l->ifindex); - link_set_managed(l, false); + link_manage(l, false); link_dbus_removed(l); l->public = false; @@ -135,7 +135,7 @@ void link_free(struct link *l) supplicant_free(l->s); - /* link_set_managed(l, false) already removed all peers */ + /* link_manage(l, false) already removed all peers */ shl_htable_clear_str(&l->peers, NULL, NULL); free(l->mac_addr); @@ -180,7 +180,7 @@ bool link_get_managed(struct link *l) return l->managed; } -int link_set_managed(struct link *l, bool set) +int link_manage(struct link *l, bool set) { int r; diff --git a/src/wifi/wifid.c b/src/wifi/wifid.c index 02db51c..75fc915 100644 --- a/src/wifi/wifid.c +++ b/src/wifi/wifid.c @@ -116,7 +116,7 @@ static void manager_add_udev_link(struct manager *m, #else if ((!interface_name || !strcmp(interface_name, ifname)) && !lazy_managed) { #endif - link_set_managed(l, true); + link_manage(l, true); } else { log_debug("ignored device: %s", ifname); } @@ -156,12 +156,12 @@ static int manager_udev_fn(sd_event_source *source, #ifdef RELY_UDEV if (udev_device_has_tag(d, "miracle") && !lazy_managed) - link_set_managed(l, true); + link_manage(l, true); else - link_set_managed(l, false); + link_manage(l, false); #else if ((!interface_name || !strcmp(interface_name, ifname)) && !lazy_managed) { - link_set_managed(l, true); + link_manage(l, true); } else { log_debug("ignored device: %s", ifname); } diff --git a/src/wifi/wifid.h b/src/wifi/wifid.h index 3c27f57..e22e363 100644 --- a/src/wifi/wifid.h +++ b/src/wifi/wifid.h @@ -161,7 +161,7 @@ void link_free(struct link *l); void link_use_dev(struct link *l); bool link_is_using_dev(struct link *l); -int link_set_managed(struct link *l, bool set); +int link_manage(struct link *l, bool set); bool link_get_managed(struct link *l); int link_renamed(struct link *l, const char *ifname);