[PATCH 02/12] iochannel/pstream/pdispatch: Add support for receiving file descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



30.05.2014 17:59, David Henningsson wrote:
> +            else if (cmh->cmsg_type == SCM_RIGHTS) {
> +                int nfd = (cmh->cmsg_len - CMSG_LEN(0)) / sizeof(int);
> +                if (nfd > MAX_ANCIL_FDS) {
> +                    pa_log("Trying to receive too many file descriptors!");
> +                    continue;
> +                }
> +                memcpy(ancil->fds, CMSG_DATA(cmh), nfd * sizeof(int));
> +                ancil->nfd = nfd;
>               }

Don't we need to close these injected file descriptors if we don't like 
them?

-- 
Alexander E. Patrakov


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux