[polypaudio-commits] r1014 - in /trunk/src/polypcore: client.c protocol-esound.c protocol-native.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Jun 13 02:33:56 PDT 2006


Author: ossman
Date: Tue Jun 13 11:33:55 2006
New Revision: 1014

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1014&root=polypaudio&view=rev
Log:
Tweak the printing of client connections a bit so that it's more apparent
what and who it is that's connecting.

Modified:
    trunk/src/polypcore/client.c
    trunk/src/polypcore/protocol-esound.c
    trunk/src/polypcore/protocol-native.c

Modified: trunk/src/polypcore/client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/client.c?rev=1014&root=polypaudio&r1=1013&r2=1014&view=diff
==============================================================================
--- trunk/src/polypcore/client.c (original)
+++ trunk/src/polypcore/client.c Tue Jun 13 11:33:55 2006
@@ -86,6 +86,9 @@
 
 void pa_client_set_name(pa_client *c, const char *name) {
     assert(c);
+
+    pa_log_info(__FILE__": client %u changed name from \"%s\" to \"%s\"", c->index, c->name, name);
+
     pa_xfree(c->name);
     c->name = pa_xstrdup(name);
 

Modified: trunk/src/polypcore/protocol-esound.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/protocol-esound.c?rev=1014&root=polypaudio&r1=1013&r2=1014&view=diff
==============================================================================
--- trunk/src/polypcore/protocol-esound.c (original)
+++ trunk/src/polypcore/protocol-esound.c Tue Jun 13 11:33:55 2006
@@ -1139,7 +1139,7 @@
 static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) {
     struct connection *c;
     pa_protocol_esound *p = userdata;
-    char cname[256];
+    char cname[256], pname[128];
     assert(s && io && p);
 
     if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
@@ -1153,7 +1153,8 @@
     c->io = io;
     pa_iochannel_set_callback(c->io, io_callback, c);
 
-    pa_iochannel_socket_peer_to_string(io, cname, sizeof(cname));
+    pa_iochannel_socket_peer_to_string(io, pname, sizeof(pname));
+    snprintf(cname, sizeof(cname), "EsounD client (%s)", pname);
     assert(p->core);
     c->client = pa_client_new(p->core, __FILE__, cname);
     assert(c->client);

Modified: trunk/src/polypcore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/protocol-native.c?rev=1014&root=polypaudio&r1=1013&r2=1014&view=diff
==============================================================================
--- trunk/src/polypcore/protocol-native.c (original)
+++ trunk/src/polypcore/protocol-native.c Tue Jun 13 11:33:55 2006
@@ -2213,6 +2213,7 @@
 static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, void *userdata) {
     pa_protocol_native *p = userdata;
     struct connection *c;
+    char cname[256], pname[128];
     assert(io && p);
 
     if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
@@ -2235,8 +2236,10 @@
 
     c->version = 8;
     c->protocol = p;
+    pa_iochannel_socket_peer_to_string(io, pname, sizeof(pname));
+    snprintf(cname, sizeof(cname), "Native client (%s)", pname);
     assert(p->core);
-    c->client = pa_client_new(p->core, __FILE__, "Client");
+    c->client = pa_client_new(p->core, __FILE__, cname);
     assert(c->client);
     c->client->kill = client_kill_cb;
     c->client->userdata = c;




More information about the pulseaudio-commits mailing list