1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-13 11:01:58 +00:00

miracle-wifid: fix signal emittion of FormationFailure

This commit is contained in:
Derek Dai 2017-03-30 10:17:32 +08:00
parent 2e3f055bd2
commit be76bef4a2
No known key found for this signature in database
GPG key ID: E109CC97553EF009
2 changed files with 17 additions and 0 deletions

View file

@ -309,6 +309,7 @@ static const sd_bus_vtable peer_dbus_vtable[] = {
SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_SIGNAL("ProvisionDiscovery", "ss", 0),
SD_BUS_SIGNAL("GoNegRequest", "ss", 0),
SD_BUS_SIGNAL("FormationFailure", "s", 0),
SD_BUS_VTABLE_END
};

View file

@ -1298,6 +1298,20 @@ static void supplicant_event_p2p_group_removed(struct supplicant *s,
supplicant_group_free(g);
}
static void supplicant_event_p2p_go_neg_failure(struct supplicant *s,
struct wpas_message *ev)
{
struct peer *p;
if (s->pending) {
log_debug("peer %s group owner negotiation failed",
s->pending->friendly_name);
p = s->pending->p;
s->pending = NULL;
peer_supplicant_formation_failure(p, "group owner negotiation failed");
}
}
static void supplicant_event_p2p_group_formation_failure(struct supplicant *s,
struct wpas_message *ev)
{
@ -1478,6 +1492,8 @@ static void supplicant_event(struct supplicant *s, struct wpas_message *m)
supplicant_event_p2p_group_started(s, m);
else if (!strcmp(name, "P2P-GROUP-REMOVED"))
supplicant_event_p2p_group_removed(s, m);
else if (!strcmp(name, "P2P-GO-NEG-FAILURE"))
supplicant_event_p2p_go_neg_failure(s, m);
else if (!strcmp(name, "P2P-GROUP-FORMATION-FAILURE"))
supplicant_event_p2p_group_formation_failure(s, m);
else if (!strcmp(name, "AP-STA-CONNECTED"))