1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-12 20:01:56 +00:00

miracled: send PropsChanged event on explicit peer-disconnect

If we explicitly call wifi_dev_disconnect(), no WIFI event is broadcasted,
so handle it manually and send a dbus event if it changed.

Note that we explicitly call into wifi even if the device is not connected
to kill any ongoing connection attempts.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
David Herrmann 2014-02-11 15:05:10 +01:00
parent 9212e72c52
commit 01292905f0

View file

@ -293,8 +293,13 @@ int peer_connect(struct peer *p, const char *prov, const char *pin)
void peer_disconnect(struct peer *p)
{
bool change;
if (!p || !p->d)
return;
change = peer_is_connected(p);
wifi_dev_disconnect(p->d);
if (change)
peer_dbus_properties_changed(p, "Connected", NULL);
}