[asterisk-bugs] [Asterisk 0016032]: [patch] AGI returns bogus "510 Invalid or unknown command"
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Jan 19 12:43:13 CST 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16032
======================================================================
Reported By: notahat
Assigned To: seanbright
======================================================================
Project: Asterisk
Issue ID: 16032
Category: Resources/res_agi
Reproducibility: random
Severity: minor
Priority: normal
Status: closed
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 222530
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-10-06 21:19 CDT
Last Modified: 2011-01-19 12:43 CST
======================================================================
Summary: [patch] AGI returns bogus "510 Invalid or unknown
command"
Description:
When res_agi.c reads from the AGI stream, it incorrectly calculates the
number of free bytes remaining in the read buffer. In certain circumstances
(such as repeated EAGAIN errors from fgets), this causes it to incorrectly
interpret the buffer as full. That then confuses the code interpreting the
command, leading to a bogus "510 invalid or unknown command" error being
returned.
======================================================================
----------------------------------------------------------------------
(0130714) svnbot (reporter) - 2011-01-19 12:43
https://issues.asterisk.org/view.php?id=16032#c130714
----------------------------------------------------------------------
Repository: asterisk
Revision: 302549
_U branches/1.8/
U branches/1.8/res/res_agi.c
------------------------------------------------------------------------
r302549 | seanbright | 2011-01-19 12:43:12 -0600 (Wed, 19 Jan 2011) | 17
lines
Merged revisions 302548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r302548 | seanbright | 2011-01-19 13:37:09 -0500 (Wed, 19 Jan 2011) | 10
lines
Properly handle partial reads from fgets() when handling AGIs.
When fgets() failed with EAGAIN, we were continually decrementing the
available
space left in our buffer, resulting in botched command handling.
(closes issue https://issues.asterisk.org/view.php?id=16032)
Reported by: notahat
Patches:
agi_buffer_patch2.diff uploaded by fnordian (license 110)
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=302549
Issue History
Date Modified Username Field Change
======================================================================
2011-01-19 12:43 svnbot Checkin
2011-01-19 12:43 svnbot Note Added: 0130714
======================================================================
More information about the asterisk-bugs
mailing list