[pulseaudio-discuss] [PATCH 3/6] pacmd: Add optional argument for quiet mode

Peter Meerwald pmeerw at pmeerw.net
Thu Jul 25 01:32:32 PDT 2013


Hello,

> > +        pa_zero(pollfd);
> > +        p = pollfd;
> > +
> > +        watch_socket = p++;
> > +        watch_socket->fd = fd;
> > +        watch_socket->events = POLLIN;
> > +
> > +        if ((res = pa_poll(pollfd, p-pollfd, 100)) < 0) {
> > +            if (errno == EINTR)
> > +                continue;
> > +
> > +            pa_log(_("poll(): %s"), strerror(errno));
> > +            goto quit;
> > +        }
> 
> The setup of watch_socket/pollfd and the call (why isn't watch_socket passed?)
> is really awkward to me. Why such strange code?

right, thanks for having a look; it's just the same code used also a few 
lines down :)
since there is just one handle to watch, the code looks awkward 
and could/should be streamlined

the entire block might go away if we decide to drop backward compatibility 
as David suggested

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)


More information about the pulseaudio-discuss mailing list