1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

miracle-wifid: fine tune P2P state notification timing

Change-Id: Idb111b90109010733b96d653c2d6d7855ebc781f
This commit is contained in:
Derek Dai 2017-04-14 16:18:56 +08:00
parent 0b230176f2
commit 8aacea933d

View file

@ -1527,6 +1527,7 @@ static void supplicant_try_ready(struct supplicant *s)
s->running = true; s->running = true;
link_supplicant_started(s->l); link_supplicant_started(s->l);
link_supplicant_p2p_state_known(s->l, s->has_p2p ? 1 : -1);
LINK_FOREACH_PEER(p, s->l) LINK_FOREACH_PEER(p, s->l)
peer_supplicant_started(p); peer_supplicant_started(p);
@ -1711,8 +1712,6 @@ static int supplicant_status_fn(struct wpas *w,
} else { } else {
s->has_p2p = true; s->has_p2p = true;
link_supplicant_p2p_state_known(s->l, 1);
r = wpas_message_new_request(s->bus_global, r = wpas_message_new_request(s->bus_global,
"SET", "SET",
&m); &m);
@ -1913,6 +1912,7 @@ static void supplicant_stopped(struct supplicant *s)
if (s->running) { if (s->running) {
s->running = false; s->running = false;
link_supplicant_p2p_state_known(s->l, 0);
link_supplicant_stopped(s->l); link_supplicant_stopped(s->l);
} }
} }