1
0
Fork 0
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:
Andrey Gusakov 2014-08-26 08:58:02 +04:00 committed by David Herrmann
parent 204fa269e3
commit 06d7dce2ec

View file

@ -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);