]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
We need to check for res being 0 in do_message itself, otherwise our headers will...
authorJoshua Colp <jcolp@digium.com>
Fri, 12 Jan 2007 16:42:33 +0000 (16:42 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 12 Jan 2007 16:42:33 +0000 (16:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@50602 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index edad0d3fe0a7934b25bdbe0d7975921a144509f2..3761754a55a0efc03b412d9ff38c16d5f92f31f1 100644 (file)
@@ -2060,7 +2060,9 @@ static int do_message(struct mansession *s)
 
        for (;;) {
                res = get_input(s, header_buf);
-               if (res > 0) {
+               if (res == 0) {
+                       continue;
+               } else if (res > 0) {
                        /* Strip trailing \r\n */
                        if (strlen(header_buf) < 2)
                                continue;
@@ -2086,9 +2088,7 @@ static void *session_do(void *data)
        for (;;) {
                res = do_message(s);
                
-               if (res == 0) {
-                       continue;
-               } else if (res < 0) {
+               if (res < 0) {
                        break;
                } else if (s->eventq->next) {
                        if (process_events(s))