mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-14 18:41:54 +00:00
wifi: report formation failture if pending peer is lost
Properly notify API users if we free peers that are pending. This way, they don't have to use timers to restart peer discovery on wpa_supplicant failures. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
204fa269e3
commit
06d7dce2ec
1 changed files with 5 additions and 3 deletions
|
@ -641,12 +641,14 @@ static void supplicant_peer_free(struct supplicant_peer *sp)
|
|||
if (!sp)
|
||||
return;
|
||||
|
||||
if (sp->s->pending == sp) {
|
||||
sp->s->pending = NULL;
|
||||
peer_supplicant_formation_failure(sp->p, "lost");
|
||||
}
|
||||
|
||||
supplicant_peer_drop_group(sp);
|
||||
peer_supplicant_stopped(sp->p);
|
||||
peer_free(sp->p);
|
||||
/* free pending */
|
||||
if (sp->s->pending == sp)
|
||||
sp->s->pending = NULL;
|
||||
|
||||
free(sp->sta_mac);
|
||||
free(sp->remote_addr);
|
||||
|
|
Loading…
Reference in a new issue