[pulseaudio-commits] Branch 'next' - src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Wed Dec 31 04:40:12 PST 2014


 src/pulsecore/socket-server.c |   11 ++++-------
 src/pulsecore/socket-server.h |    1 -
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 72f5c3e4f96ae96125fe4f963b09db6f9da28424
Author: Alexander E. Patrakov <patrakov at gmail.com>
Date:   Wed Dec 31 12:28:03 2014 +0500

    Make pa_socket_server_new static
    
    While at it, also remove SOCKET_SERVER_GENERIC, because it is always
    being overwritten with a specific socket type.
    
    Signed-off-by: Alexander E. Patrakov <patrakov at gmail.com>

diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c
index 2c6b4f9..4c0524b 100644
--- a/src/pulsecore/socket-server.c
+++ b/src/pulsecore/socket-server.c
@@ -87,7 +87,6 @@ struct pa_socket_server {
     pa_io_event *io_event;
     pa_mainloop_api *mainloop;
     enum {
-        SOCKET_SERVER_GENERIC,
         SOCKET_SERVER_IPV4,
         SOCKET_SERVER_UNIX,
         SOCKET_SERVER_IPV6
@@ -149,7 +148,7 @@ finish:
     pa_socket_server_unref(s);
 }
 
-pa_socket_server* pa_socket_server_new(pa_mainloop_api *m, int fd) {
+static pa_socket_server* socket_server_new(pa_mainloop_api *m, int fd) {
     pa_socket_server *s;
 
     pa_assert(m);
@@ -162,8 +161,6 @@ pa_socket_server* pa_socket_server_new(pa_mainloop_api *m, int fd) {
 
     pa_assert_se(s->io_event = m->io_new(m, fd, PA_IO_EVENT_INPUT, callback, s));
 
-    s->type = SOCKET_SERVER_GENERIC;
-
     return s;
 }
 
@@ -231,7 +228,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file
         }
     }
 
-    pa_assert_se(s = pa_socket_server_new(m, fd));
+    pa_assert_se(s = socket_server_new(m, fd));
 
     s->filename = pa_xstrdup(filename);
     s->type = SOCKET_SERVER_UNIX;
@@ -300,7 +297,7 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address
         goto fail;
     }
 
-    pa_assert_se(ss = pa_socket_server_new(m, fd));
+    pa_assert_se(ss = socket_server_new(m, fd));
 
     ss->type = SOCKET_SERVER_IPV4;
     ss->tcpwrap_service = pa_xstrdup(tcpwrap_service);
@@ -368,7 +365,7 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
         goto fail;
     }
 
-    pa_assert_se(ss = pa_socket_server_new(m, fd));
+    pa_assert_se(ss = socket_server_new(m, fd));
 
     ss->type = SOCKET_SERVER_IPV6;
     ss->tcpwrap_service = pa_xstrdup(tcpwrap_service);
diff --git a/src/pulsecore/socket-server.h b/src/pulsecore/socket-server.h
index a72bd9e..14dc5a3 100644
--- a/src/pulsecore/socket-server.h
+++ b/src/pulsecore/socket-server.h
@@ -31,7 +31,6 @@
 
 typedef struct pa_socket_server pa_socket_server;
 
-pa_socket_server* pa_socket_server_new(pa_mainloop_api *m, int fd);
 pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *filename);
 pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address, uint16_t port, bool fallback, const char *tcpwrap_service);
 pa_socket_server* pa_socket_server_new_ipv4_loopback(pa_mainloop_api *m, uint16_t port, bool fallback, const char *tcpwrap_service);



More information about the pulseaudio-commits mailing list