mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-13 02:22:00 +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:
parent
9212e72c52
commit
01292905f0
1 changed files with 5 additions and 0 deletions
|
@ -293,8 +293,13 @@ int peer_connect(struct peer *p, const char *prov, const char *pin)
|
||||||
|
|
||||||
void peer_disconnect(struct peer *p)
|
void peer_disconnect(struct peer *p)
|
||||||
{
|
{
|
||||||
|
bool change;
|
||||||
|
|
||||||
if (!p || !p->d)
|
if (!p || !p->d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
change = peer_is_connected(p);
|
||||||
wifi_dev_disconnect(p->d);
|
wifi_dev_disconnect(p->d);
|
||||||
|
if (change)
|
||||||
|
peer_dbus_properties_changed(p, "Connected", NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue