mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
miracle-wifid: cleanup change notification of Link.Managed property
Change-Id: Ia5b056151e07219f0e6cc34dbc9fc2149f929a36
This commit is contained in:
parent
6fc960a2ac
commit
566f32e983
3 changed files with 10 additions and 15 deletions
|
@ -202,16 +202,6 @@ void link_supplicant_p2p_state_known(struct link *l, int state)
|
||||||
link_dbus_properties_changed(l, "P2PState", NULL);
|
link_dbus_properties_changed(l, "P2PState", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void link_supplicant_managed(struct link *l)
|
|
||||||
{
|
|
||||||
if(l->managed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
l->managed = true;
|
|
||||||
link_dbus_properties_changed(l, "Managed", NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
int link_renamed(struct link *l, const char *ifname)
|
int link_renamed(struct link *l, const char *ifname)
|
||||||
{
|
{
|
||||||
char *t;
|
char *t;
|
||||||
|
@ -352,6 +342,11 @@ const char *link_get_mac_addr(struct link *l)
|
||||||
|
|
||||||
void link_supplicant_started(struct link *l)
|
void link_supplicant_started(struct link *l)
|
||||||
{
|
{
|
||||||
|
if(l && !l->managed) {
|
||||||
|
l->managed = true;
|
||||||
|
link_dbus_properties_changed(l, "Managed", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (!l || l->public)
|
if (!l || l->public)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -361,12 +356,14 @@ void link_supplicant_started(struct link *l)
|
||||||
|
|
||||||
void link_supplicant_stopped(struct link *l)
|
void link_supplicant_stopped(struct link *l)
|
||||||
{
|
{
|
||||||
|
if(l && l->managed) {
|
||||||
|
l->managed = false;
|
||||||
|
link_dbus_properties_changed(l, "Managed", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (!l || !l->public)
|
if (!l || !l->public)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
l->managed = false;
|
|
||||||
link_dbus_properties_changed(l, "Managed", NULL);
|
|
||||||
|
|
||||||
log_info("link %s unmanaged", l->ifname);
|
log_info("link %s unmanaged", l->ifname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2581,7 +2581,6 @@ static int supplicant_timer_fn(sd_event_source *source,
|
||||||
} else {
|
} else {
|
||||||
/* wpas is running smoothly, disable timer */
|
/* wpas is running smoothly, disable timer */
|
||||||
sd_event_source_set_enabled(source, SD_EVENT_OFF);
|
sd_event_source_set_enabled(source, SD_EVENT_OFF);
|
||||||
link_supplicant_managed(s->l);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Who armed this timer? What timer is this? */
|
/* Who armed this timer? What timer is this? */
|
||||||
|
|
|
@ -174,7 +174,6 @@ bool link_get_p2p_scanning(struct link *l);
|
||||||
int link_get_p2p_state(struct link *l);
|
int link_get_p2p_state(struct link *l);
|
||||||
const char *link_get_mac_addr(struct link *l);
|
const char *link_get_mac_addr(struct link *l);
|
||||||
|
|
||||||
void link_supplicant_managed(struct link *l);
|
|
||||||
void link_supplicant_started(struct link *l);
|
void link_supplicant_started(struct link *l);
|
||||||
void link_supplicant_stopped(struct link *l);
|
void link_supplicant_stopped(struct link *l);
|
||||||
void link_supplicant_p2p_scan_changed(struct link *l, bool new_value);
|
void link_supplicant_p2p_scan_changed(struct link *l, bool new_value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue