mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
miracle-wfdctl: fix session removal dbus notification
This commit is contained in:
parent
a06c0bc154
commit
51cdba4d46
2 changed files with 4 additions and 8 deletions
|
@ -252,9 +252,7 @@ int _wfd_dbus_object_added(struct wfd_dbus *wfd_dbus,
|
|||
int wfd_fn_sink_new(struct wfd_sink *s)
|
||||
{
|
||||
_shl_free_ char *path = NULL;
|
||||
int r = sd_bus_path_encode("/org/freedesktop/miracle/wfd/sink",
|
||||
wfd_sink_get_label(s),
|
||||
&path);
|
||||
int r = wfd_dbus_get_sink_path(s, &path);
|
||||
if(0 > r) {
|
||||
return r;
|
||||
}
|
||||
|
@ -265,9 +263,7 @@ int wfd_fn_sink_new(struct wfd_sink *s)
|
|||
int wfd_fn_sink_free(struct wfd_sink *s)
|
||||
{
|
||||
_shl_free_ char *path = NULL;
|
||||
int r = sd_bus_path_encode("/org/freedesktop/miracle/wfd/sink",
|
||||
wfd_sink_get_label(s),
|
||||
&path);
|
||||
int r = wfd_dbus_get_sink_path(s, &path);
|
||||
if(0 > r) {
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ int ctl_wfd_new(struct ctl_wfd **out, sd_event *loop, sd_bus *bus)
|
|||
}
|
||||
|
||||
shl_htable_init_str(&wfd->sinks);
|
||||
shl_htable_init_u64(&wfd->sessions);
|
||||
shl_htable_init_uint(&wfd->sessions);
|
||||
wfd->loop = sd_event_ref(loop);
|
||||
|
||||
r = ctl_wfd_init(wfd, bus);
|
||||
|
@ -85,7 +85,7 @@ static void ctl_wfd_free(struct ctl_wfd *wfd)
|
|||
ctl_wifi_free(wfd->wifi);
|
||||
wfd->wifi = NULL;
|
||||
shl_htable_clear_str(&wfd->sinks, NULL, NULL);
|
||||
shl_htable_clear_u64(&wfd->sessions, NULL, NULL);
|
||||
shl_htable_clear_uint(&wfd->sessions, NULL, NULL);
|
||||
|
||||
for(i = 0; i < SHL_ARRAY_LENGTH(wfd->signal_sources); ++ i) {
|
||||
if(wfd->signal_sources[i]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue