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

miracle-dispd: run encoder with user privilege

now we run encoder with unprivileged user and talk through session bus

Change-Id: I09b3b8b15e5a7c7e9b883b7c9dbac601c13f458c
This commit is contained in:
Derek Dai 2017-04-26 22:49:47 +08:00
parent ba10255f70
commit 6415de46fa
No known key found for this signature in database
GPG key ID: E109CC97553EF009
11 changed files with 507 additions and 123 deletions

View file

@ -73,7 +73,7 @@ int ctl_wfd_new(struct ctl_wfd **out, sd_event *loop, sd_bus *bus)
error:
ctl_wfd_free(wfd);
return log_ERRNO();
return log_ERR(r);
}
static void ctl_wfd_free(struct ctl_wfd *wfd)
@ -144,14 +144,14 @@ int ctl_wfd_add_sink(struct ctl_wfd *wfd,
r = wfd_sink_new(&s, p, sube);
if(0 > r) {
return log_ERRNO();
return log_ERR(r);
}
r = shl_htable_insert_str(&wfd->sinks,
wfd_sink_to_htable(s),
NULL);
if(0 > r) {
return log_ERRNO();
return log_ERR(r);
}
++wfd->n_sinks;
@ -209,7 +209,7 @@ int ctl_wfd_add_session(struct ctl_wfd *wfd, struct wfd_session *s)
r = shl_htable_insert_uint(&wfd->sessions, wfd_session_to_htable(s));
if(0 > r) {
return log_ERRNO();
return log_ERR(r);
}
++wfd->n_sessions;
@ -367,7 +367,7 @@ void ctl_fn_peer_new(struct ctl_peer *p)
r = wfd_sube_parse(sube_str, &sube);
if(0 > r) {
log_debug("peer %s has invalid subelement", p->label);
return log_vERRNO();
return log_vERR(r);
}
if(wfd_sube_device_is_sink(&sube)) {