1
0
Fork 0
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:
Derek Dai 2017-03-07 10:55:46 +08:00
parent a06c0bc154
commit 51cdba4d46
No known key found for this signature in database
GPG key ID: E109CC97553EF009
2 changed files with 4 additions and 8 deletions

View file

@ -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;
}

View file

@ -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]) {