]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_agi: Add message indicating need for \n character in verbose message
authorJonathan Rose <jrose@digium.com>
Wed, 25 Jul 2012 21:00:00 +0000 (21:00 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 25 Jul 2012 21:00:00 +0000 (21:00 +0000)
The while loop responsible for reading AGI messages from a fastAGI service
can end up looping indefinitely when an AGI script fails to indicate the end
of a message with a \n character. This patch adds an indication that we are
expecting a \n character to end the message to make it more clear to users
that this is necessary if they are receiving this warning over and over.

(issue ASTERISK-20061)
Reported by: Eike Kuiper

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

res/res_agi.c

index a6f879152028672945594054127f0f3da5f44035..cb34188ab7701550f54d48569b417c47fe827e6c 100644 (file)
@@ -3539,7 +3539,7 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi
                                        break;
                                len = sizeof(buf) - buflen;
                                if (agidebug)
-                                       ast_verbose( "AGI Rx << temp buffer %s - errno %s\n", buf, strerror(errno));
+                                       ast_verbose("AGI Rx << temp buffer %s - errno %s\nNo \\n received, checking again.\n", buf, strerror(errno));
                        }
 
                        if (!buf[0]) {