diff options
author | Alexander E. Patrakov <patrakov@gmail.com> | 2014-12-31 12:28:03 +0500 |
---|---|---|
committer | David Henningsson <david.henningsson@canonical.com> | 2015-02-12 20:33:45 +0100 |
commit | b094c92a0101029e6f2d7d340166a2afb5e5a8a5 (patch) | |
tree | 976938f92f8ab504ac337b3c177d64cfefc411eb /src/pulsecore/socket-server.c | |
parent | 73dee7c9f7fff28ddc5ca6eeded26ef8c41fe761 (diff) |
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@gmail.com>
Diffstat (limited to 'src/pulsecore/socket-server.c')
-rw-r--r-- | src/pulsecore/socket-server.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c index ce6169424..07925864d 100644 --- a/src/pulsecore/socket-server.c +++ b/src/pulsecore/socket-server.c @@ -85,7 +85,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 @@ -147,7 +146,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); @@ -160,8 +159,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; } @@ -229,7 +226,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; @@ -298,7 +295,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); @@ -366,7 +363,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); |