summaryrefslogtreecommitdiffstats
path: root/src/astmanproxy.c
diff options
context:
space:
mode:
authorDavid Troy <dave@popvox.com>2006-04-03 19:39:36 +0000
committerDavid Troy <dave@popvox.com>2006-04-03 19:39:36 +0000
commit7122b49be0d135619e6eb848798b4bc620a9b808 (patch)
treed821e24702e9e67b28fd6143504b9fa028c57276 /src/astmanproxy.c
parentecc49089c697a2cb7331358def5ce7640fae65bf (diff)
downloadastmanproxy-7122b49be0d135619e6eb848798b4bc620a9b808.tar.gz
astmanproxy-7122b49be0d135619e6eb848798b4bc620a9b808.tar.xz
astmanproxy-7122b49be0d135619e6eb848798b4bc620a9b808.zip
git-svn-id: http://svncommunity.digium.com/svn/astmanproxy/branches/1.20pre@74 f02b47b9-160a-0410-81a6-dc3441afb0ec
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) {