diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-06-14 18:38:50 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-06-14 18:38:50 +0000 |
commit | c8cf0c1ce9cf1b38b302ae4a2a6fa798fef85f08 (patch) | |
tree | 9f73e3140dc8762a78b4972f921077f39c4b66b0 /src/protocol-simple.c | |
parent | edfad835cb7e4ab9f62de81cf4bf6b6ad9610b02 (diff) |
a bunch of fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@10 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/protocol-simple.c')
-rw-r--r-- | src/protocol-simple.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/protocol-simple.c b/src/protocol-simple.c index 3335bc14..e930f9ae 100644 --- a/src/protocol-simple.c +++ b/src/protocol-simple.c @@ -103,7 +103,10 @@ static void on_connection(struct socket_server*s, struct iochannel *io, void *us c->istream = NULL; c->ostream = NULL; c->protocol = p; - + + c->client = client_new(p->core, "SIMPLE", "Client"); + assert(c->client); + if (p->mode & PROTOCOL_SIMPLE_RECORD) { struct source *source; @@ -128,8 +131,6 @@ static void on_connection(struct socket_server*s, struct iochannel *io, void *us assert(c->istream); } - c->client = client_new(p->core, "SIMPLE", "Client"); - assert(c->client); iochannel_set_callback(c->io, io_callback, c); idxset_put(p->connections, c, NULL); @@ -137,6 +138,8 @@ static void on_connection(struct socket_server*s, struct iochannel *io, void *us fail: if (c) { + if (c->client) + client_free(c->client); if (c->istream) input_stream_free(c->istream); if (c->ostream) |