mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
iochannel/pstream/pdispatch: Add support for receiving file descriptors
The file descriptors are read from the iochannel just like the creds are. So instead of passing just creds (and creds_valid), we now pass the entire pa_ancil struct. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
cc7a317e85
commit
06bc22b220
9 changed files with 84 additions and 31 deletions
|
|
@ -1780,14 +1780,14 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) {
|
|||
}
|
||||
|
||||
/* Called from main context */
|
||||
static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata) {
|
||||
static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_ancil *ancil, void *userdata) {
|
||||
struct userdata *u = userdata;
|
||||
|
||||
pa_assert(p);
|
||||
pa_assert(packet);
|
||||
pa_assert(u);
|
||||
|
||||
if (pa_pdispatch_run(u->pdispatch, packet, creds, u) < 0) {
|
||||
if (pa_pdispatch_run(u->pdispatch, packet, ancil, u) < 0) {
|
||||
pa_log("Invalid packet");
|
||||
pa_module_unload_request(u->module, true);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue