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

Logging Formation failure

miracle-sinkctl: Fix signal emotion of FormationFailure
miracle-wifid: Log formation failure
This commit is contained in:
Derek 呆 2017-04-15 21:59:46 +08:00 committed by Alberto Fanjul
parent 6b5907ad45
commit a6f672311e
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

@ -1292,6 +1292,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)
{
@ -1472,6 +1486,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"))