[polypaudio-commits] r952 - /trunk/src/utils/padsp.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue May 23 09:37:36 PDT 2006


Author: lennart
Date: Tue May 23 18:37:33 2006
New Revision: 952

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=952&root=polypaudio&view=rev
Log:
pass the binary name as client name to polypaudio

Modified:
    trunk/src/utils/padsp.c

Modified: trunk/src/utils/padsp.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/utils/padsp.c?rev=952&root=polypaudio&r1=951&r2=952&view=diff
==============================================================================
--- trunk/src/utils/padsp.c (original)
+++ trunk/src/utils/padsp.c Tue May 23 18:37:33 2006
@@ -278,9 +278,21 @@
     i->n_fragments = 0;
 }
 
+static char *client_name(char *buf, size_t n) {
+    char p[PATH_MAX];
+    
+    if (pa_get_binary_name(p, sizeof(p)))
+        snprintf(buf, n, "oss[%s]", pa_path_get_filename(p));
+    else
+        snprintf(buf, n, "oss");
+
+    return buf;
+}
+
 static fd_info* fd_info_new(fd_info_type_t type, int *_errno) {
     fd_info *i;
     int sfds[2] = { -1, -1 };
+    char name[64];
 
     debug(__FILE__": fd_info_new()\n");
 
@@ -320,7 +332,7 @@
         goto fail;
     }
 
-    if (!(i->context = pa_context_new(pa_threaded_mainloop_get_api(i->mainloop), "oss"))) {
+    if (!(i->context = pa_context_new(pa_threaded_mainloop_get_api(i->mainloop), client_name(name, sizeof(name))))) {
         *_errno = EIO;
         debug(__FILE__": pa_context_new() failed\n");
         goto fail;




More information about the pulseaudio-commits mailing list