diff mbox series

[v2,3/4] audio: paaudio: fix client name

Message ID f7c0fa20f3ee3c10409bde0d474fc2a47177838d.1566847960.git.DirtY.iCE.hu@gmail.com
State New
Headers show
Series Audio: misc fixes for "Audio 20190821 patches" | expand

Commit Message

=?UTF-8?B?Wm9sdMOhbiBLxZF2w6Fnw7M=?= Aug. 26, 2019, 7:59 p.m. UTC
pa_context_new expects a client name, not a server socket path.

Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
---
 audio/paaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gerd Hoffmann Aug. 27, 2019, 5:37 a.m. UTC | #1
On Mon, Aug 26, 2019 at 09:59:03PM +0200, Kővágó, Zoltán wrote:
> pa_context_new expects a client name, not a server socket path.
> 
> Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
> ---
>  audio/paaudio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/audio/paaudio.c b/audio/paaudio.c
> index bfef9acaad..777b8e4718 100644
> --- a/audio/paaudio.c
> +++ b/audio/paaudio.c
> @@ -866,7 +866,7 @@ static void *qpa_conn_init(const char *server)
>      }
>  
>      c->context = pa_context_new(pa_threaded_mainloop_get_api(c->mainloop),
> -                                server);
> +                                "qemu");

qemu_get_vm_name() would be a better default (returns the name set by
the user using "qemu -name $whatever", can be NULL if unset).

cheers,
  Gerd
Maxim Levitsky Aug. 27, 2019, 11:26 a.m. UTC | #2
On Tue, 2019-08-27 at 07:37 +0200, Gerd Hoffmann wrote:
> On Mon, Aug 26, 2019 at 09:59:03PM +0200, Kővágó, Zoltán wrote:
> > pa_context_new expects a client name, not a server socket path.
> > 
> > Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
> > Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
> > ---
> >  audio/paaudio.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/audio/paaudio.c b/audio/paaudio.c
> > index bfef9acaad..777b8e4718 100644
> > --- a/audio/paaudio.c
> > +++ b/audio/paaudio.c
> > @@ -866,7 +866,7 @@ static void *qpa_conn_init(const char *server)
> >      }
> >  
> >      c->context = pa_context_new(pa_threaded_mainloop_get_api(c->mainloop),
> > -                                server);
> > +                                "qemu");
> 
> qemu_get_vm_name() would be a better default (returns the name set by
> the user using "qemu -name $whatever", can be NULL if unset).

That is exactly what I was thinking about this too.
Best regards,
	Maxim Levitsky

> 
> cheers,
>   Gerd
>
diff mbox series

Patch

diff --git a/audio/paaudio.c b/audio/paaudio.c
index bfef9acaad..777b8e4718 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -866,7 +866,7 @@  static void *qpa_conn_init(const char *server)
     }
 
     c->context = pa_context_new(pa_threaded_mainloop_get_api(c->mainloop),
-                                server);
+                                "qemu");
     if (!c->context) {
         goto fail;
     }