another normalization of AMI vs HTTP identification.
authorLuigi Rizzo <rizzo@icir.org>
Tue, 28 Nov 2006 09:39:16 +0000 (09:39 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Tue, 28 Nov 2006 09:39:16 +0000 (09:39 +0000)
Should really define a macro IS_AMI(s) so it is clear what
we want to do.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48078 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 4b0f87e..5a852bf 100644 (file)
@@ -1149,7 +1149,7 @@ static int action_waitevent(struct mansession *s, struct message *m)
                ast_mutex_unlock(&s->__lock);
                if (needexit)
                        break;
-               if (!s->inuse && s->fd > 0) {   /* AMI session */
+               if (s->managerid == 0) {        /* AMI session */
                        if (ast_wait_for_input(s->fd, 1000))
                                break;
                } else {        /* HTTP session */