summaryrefslogtreecommitdiffstats
path: root/src/astmanproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/astmanproxy.c')
-rw-r--r--src/astmanproxy.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/astmanproxy.c b/src/astmanproxy.c
index 457a3bf..25aab23 100644
--- a/src/astmanproxy.c
+++ b/src/astmanproxy.c
@@ -181,8 +181,11 @@ int WriteClients(struct message *m) {
}
} else
c->output->write(c, m);
- if ( c->input->autodisconnect && c->input->autodisconnect() )
- c->dead = 1;
+ if (c->inputcomplete) {
+ pthread_mutex_lock(&c->lock);
+ c->outputcomplete = 1;
+ pthread_mutex_unlock(&c->lock);
+ }
}
c = c->next;
}
@@ -254,7 +257,11 @@ void *session_do(struct mansession *s)
for (;;) {
/* Get a complete message block from input handler */
memset(&m, 0, sizeof(struct message) );
+ if (debug > 3)
+ debugmsg("calling %s_read...", s->input->formatname);
res = s->input->read(s, &m);
+ if (debug > 3)
+ debugmsg("%s_read result =%d", s->input->formatname, res);
m.session = s;
if (res > 0) {