[PATCH 3/3] core: Show protocol-native options (shm, srbchannel) in properties

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

 



> The first two are acked. See below for comment on this one.

I'm not so sure anymore it is a good idea to expose this 
(internal) information to the user; it was useful for testing

> On 2014-06-17 01:02, Peter Meerwald wrote:
> > not tested
> > 
> > Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> > ---
> >   src/pulsecore/protocol-native.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/src/pulsecore/protocol-native.c
> > b/src/pulsecore/protocol-native.c
> > index 589013b..dc0665d 100644
> > --- a/src/pulsecore/protocol-native.c
> > +++ b/src/pulsecore/protocol-native.c
> > @@ -2592,6 +2592,8 @@ static void setup_srbchannel(pa_native_connection *c)
> > {
> >       pa_tagstruct *t;
> >       int fdlist[2];
> > 
> > +    pa_proplist_setf(c->client->proplist, "native-protocol.srbchannel",
> > "%s", pa_yes_no(false));
> 
> Isn't pa_yes_no translated? I think it would make more sense to do
> "true"/"false" for things you put in proplists.
> 
> Otherwise acked, if you test it.
> 
> > +
> >       if (!c->options->srbchannel) {
> >           pa_log_debug("Disabling srbchannel, reason: Disabled by module
> > parameter");
> >           return;
> > @@ -2641,6 +2643,7 @@ static void command_enable_srbchannel(pa_pdispatch
> > *pd, uint32_t command, uint32
> > 
> >       pa_log_debug("Client enabled srbchannel.");
> >       pa_pstream_set_srbchannel(c->pstream, c->srpending);
> > +    pa_proplist_setf(c->client->proplist, "native-protocol.srbchannel",
> > "%s", pa_yes_no(true));
> >       c->srpending = NULL;
> >   }
> > 
> > @@ -2757,6 +2760,7 @@ static void command_auth(pa_pdispatch *pd, uint32_t
> > command, uint32_t tag, pa_ta
> > 
> >       pa_log_debug("Negotiated SHM: %s", pa_yes_no(do_shm));
> >       pa_pstream_enable_shm(c->pstream, do_shm);
> > +    pa_proplist_setf(c->client->proplist, "native-protocol.shm", "%s",
> > pa_yes_no(do_shm));
> > 
> >       reply = reply_new(tag);
> >       pa_tagstruct_putu32(reply, PA_PROTOCOL_VERSION | (do_shm ? 0x80000000
> > : 0));
> > 
> 
> 

-- 

Peter Meerwald
+43-664-2444418 (mobile)


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

  Powered by Linux