]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
revert patch from issue #10553, as someone not using fastagi reported that this
authorRussell Bryant <russell@russellbryant.com>
Wed, 12 Sep 2007 15:11:11 +0000 (15:11 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 12 Sep 2007 15:11:11 +0000 (15:11 +0000)
broke their system.

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

res/res_agi.c

index cae43e667a7d9593f18ec9c544a975b3eb0bb3d5..77472b011256e422ea37271310cb485d715952f7 100644 (file)
@@ -1867,25 +1867,10 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi
                                ast_frfree(f);
                        }
                } else if (outfd > -1) {
-                       size_t len = sizeof(buf);
-                       size_t buflen = 0;
-
                        retry = AGI_NANDFS_RETRY;
                        buf[0] = '\0';
 
-                       while (buflen < (len - 1)) {
-                               fgets(buf + buflen, len, readf);
-                               if (feof(readf)) 
-                                       break;
-                               if (ferror(readf) && ((errno != EINTR) && (errno != EAGAIN))) 
-                                       break;
-                               buflen = strlen(buf);
-                               len -= buflen;
-                               if (agidebug)
-                                       ast_verbose( "AGI Rx << temp buffer %s - errno %s\n", buf, strerror(errno));
-                       }
-
-                       if (!buf[0]) {
+                       if (!fgets(buf, sizeof(buf), readf)) {
                                /* Program terminated */
                                if (returnstatus)
                                        returnstatus = -1;