summaryrefslogtreecommitdiffstats
path: root/polyp/protocol-cli.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-11 01:17:39 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-11 01:17:39 +0000
commit1f0961368f58a9fec319d86c79a86a9f0d008cf5 (patch)
treec712a897bb34ade3c03a06ba754264153ac3bc16 /polyp/protocol-cli.c
parent6c512fb5a3fdb578179be79672c5096de1a1d25b (diff)
* remove a lot of compiler warnings introduced by using some new GCC flags
* add typedefs for public structs and enums and drop the struct/enum prefixs from all uses where it makes sense git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@447 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/protocol-cli.c')
-rw-r--r--polyp/protocol-cli.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/polyp/protocol-cli.c b/polyp/protocol-cli.c
index 107acb19..d2d73550 100644
--- a/polyp/protocol-cli.c
+++ b/polyp/protocol-cli.c
@@ -35,25 +35,25 @@
#define MAX_CONNECTIONS 25
struct pa_protocol_cli {
- struct pa_module *module;
- struct pa_core *core;
- struct pa_socket_server*server;
- struct pa_idxset *connections;
+ pa_module *module;
+ pa_core *core;
+ pa_socket_server*server;
+ pa_idxset *connections;
};
-static void cli_eof_cb(struct pa_cli*c, void*userdata) {
- struct pa_protocol_cli *p = userdata;
+static void cli_eof_cb(pa_cli*c, void*userdata) {
+ pa_protocol_cli *p = userdata;
assert(p);
pa_idxset_remove_by_data(p->connections, c, NULL);
pa_cli_free(c);
}
-static void on_connection(struct pa_socket_server*s, struct pa_iochannel *io, void *userdata) {
- struct pa_protocol_cli *p = userdata;
- struct pa_cli *c;
+static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) {
+ pa_protocol_cli *p = userdata;
+ pa_cli *c;
assert(s && io && p);
- if (pa_idxset_ncontents(p->connections)+1 > MAX_CONNECTIONS) {
+ if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.\n", MAX_CONNECTIONS);
pa_iochannel_free(io);
return;
@@ -66,11 +66,11 @@ static void on_connection(struct pa_socket_server*s, struct pa_iochannel *io, vo
pa_idxset_put(p->connections, c, NULL);
}
-struct pa_protocol_cli* pa_protocol_cli_new(struct pa_core *core, struct pa_socket_server *server, struct pa_module *m, struct pa_modargs *ma) {
- struct pa_protocol_cli* p;
+pa_protocol_cli* pa_protocol_cli_new(pa_core *core, pa_socket_server *server, pa_module *m, PA_GCC_UNUSED pa_modargs *ma) {
+ pa_protocol_cli* p;
assert(core && server);
- p = pa_xmalloc(sizeof(struct pa_protocol_cli));
+ p = pa_xmalloc(sizeof(pa_protocol_cli));
p->module = m;
p->core = core;
p->server = server;
@@ -81,12 +81,12 @@ struct pa_protocol_cli* pa_protocol_cli_new(struct pa_core *core, struct pa_sock
return p;
}
-static void free_connection(void *p, void *userdata) {
+static void free_connection(void *p, PA_GCC_UNUSED void *userdata) {
assert(p);
pa_cli_free(p);
}
-void pa_protocol_cli_free(struct pa_protocol_cli *p) {
+void pa_protocol_cli_free(pa_protocol_cli *p) {
assert(p);
pa_idxset_free(p->connections, free_connection, NULL);