summaryrefslogtreecommitdiffstats
path: root/polyp/protocol-simple.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-11-18 20:50:44 +0000
committerLennart Poettering <lennart@poettering.net>2004-11-18 20:50:44 +0000
commit8641af3c6d11e3e6710cb946e9a93d0e9f639519 (patch)
treece72b56c7460fed94808ee8023fad89df27c7e12 /polyp/protocol-simple.c
parenteef235d8795df740eb63cb135bd187b7ab9ac4ea (diff)
* some iochannel fixes
* introduce reference counting in ioline * fix memory leak in socket-client.c * fix double-free error in protocol-esound.c git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@293 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/protocol-simple.c')
-rw-r--r--polyp/protocol-simple.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/polyp/protocol-simple.c b/polyp/protocol-simple.c
index 058d4b82..3dddc474 100644
--- a/polyp/protocol-simple.c
+++ b/polyp/protocol-simple.c
@@ -180,9 +180,6 @@ static void do_work(struct connection *c) {
assert(c->protocol && c->protocol->core && c->protocol->core->mainloop && c->protocol->core->mainloop->defer_enable);
c->protocol->core->mainloop->defer_enable(c->defer_event, 0);
- if (pa_iochannel_is_hungup(c->io))
- goto fail;
-
if (pa_iochannel_is_writable(c->io))
if (do_write(c) < 0)
goto fail;
@@ -191,6 +188,9 @@ static void do_work(struct connection *c) {
if (do_read(c) < 0)
goto fail;
+ if (pa_iochannel_is_hungup(c->io))
+ c->protocol->core->mainloop->defer_enable(c->defer_event, 1);
+
return;
fail: