mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
miracle-wifid: rename link_set_managed()
rename to prevent confusing with managed event notification Change-Id: I0f0d01f97156044bbb225e199b2717d5ea9c1a24
This commit is contained in:
parent
c2fc985624
commit
2e7c11d265
4 changed files with 10 additions and 10 deletions
|
@ -612,7 +612,7 @@ static int link_dbus_manage(sd_bus_message *msg,
|
||||||
sd_bus_error *err)
|
sd_bus_error *err)
|
||||||
{
|
{
|
||||||
struct link *l = data;
|
struct link *l = data;
|
||||||
int r = link_set_managed(l, true);
|
int r = link_manage(l, true);
|
||||||
if(r < 0)
|
if(r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -624,7 +624,7 @@ static int link_dbus_unmanage(sd_bus_message *msg,
|
||||||
sd_bus_error *err)
|
sd_bus_error *err)
|
||||||
{
|
{
|
||||||
struct link *l = data;
|
struct link *l = data;
|
||||||
int r = link_set_managed(l, false);
|
int r = link_manage(l, false);
|
||||||
if(r < 0)
|
if(r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ void link_free(struct link *l)
|
||||||
|
|
||||||
log_debug("free link: %s (%u)", l->ifname, l->ifindex);
|
log_debug("free link: %s (%u)", l->ifname, l->ifindex);
|
||||||
|
|
||||||
link_set_managed(l, false);
|
link_manage(l, false);
|
||||||
|
|
||||||
link_dbus_removed(l);
|
link_dbus_removed(l);
|
||||||
l->public = false;
|
l->public = false;
|
||||||
|
@ -135,7 +135,7 @@ void link_free(struct link *l)
|
||||||
|
|
||||||
supplicant_free(l->s);
|
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);
|
shl_htable_clear_str(&l->peers, NULL, NULL);
|
||||||
|
|
||||||
free(l->mac_addr);
|
free(l->mac_addr);
|
||||||
|
@ -180,7 +180,7 @@ bool link_get_managed(struct link *l)
|
||||||
return l->managed;
|
return l->managed;
|
||||||
}
|
}
|
||||||
|
|
||||||
int link_set_managed(struct link *l, bool set)
|
int link_manage(struct link *l, bool set)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ static void manager_add_udev_link(struct manager *m,
|
||||||
#else
|
#else
|
||||||
if ((!interface_name || !strcmp(interface_name, ifname)) && !lazy_managed) {
|
if ((!interface_name || !strcmp(interface_name, ifname)) && !lazy_managed) {
|
||||||
#endif
|
#endif
|
||||||
link_set_managed(l, true);
|
link_manage(l, true);
|
||||||
} else {
|
} else {
|
||||||
log_debug("ignored device: %s", ifname);
|
log_debug("ignored device: %s", ifname);
|
||||||
}
|
}
|
||||||
|
@ -156,12 +156,12 @@ static int manager_udev_fn(sd_event_source *source,
|
||||||
|
|
||||||
#ifdef RELY_UDEV
|
#ifdef RELY_UDEV
|
||||||
if (udev_device_has_tag(d, "miracle") && !lazy_managed)
|
if (udev_device_has_tag(d, "miracle") && !lazy_managed)
|
||||||
link_set_managed(l, true);
|
link_manage(l, true);
|
||||||
else
|
else
|
||||||
link_set_managed(l, false);
|
link_manage(l, false);
|
||||||
#else
|
#else
|
||||||
if ((!interface_name || !strcmp(interface_name, ifname)) && !lazy_managed) {
|
if ((!interface_name || !strcmp(interface_name, ifname)) && !lazy_managed) {
|
||||||
link_set_managed(l, true);
|
link_manage(l, true);
|
||||||
} else {
|
} else {
|
||||||
log_debug("ignored device: %s", ifname);
|
log_debug("ignored device: %s", ifname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ void link_free(struct link *l);
|
||||||
void link_use_dev(struct link *l);
|
void link_use_dev(struct link *l);
|
||||||
bool link_is_using_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);
|
bool link_get_managed(struct link *l);
|
||||||
int link_renamed(struct link *l, const char *ifname);
|
int link_renamed(struct link *l, const char *ifname);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue