Skip to content

Commit

Permalink
Enlarge AMI buffer; try to catch more potential buffer errors
Browse files Browse the repository at this point in the history
Previous to this commit the current_pointer could get reset if it was not at the end of the data when the buffer was trimmed. This should now catch the condition and fix it if possible.  If impossible (because the current pointer would be outside the sliced data) an Exception is raised.

In addition several commands (such as "core show applications") could exceed the 8KB buffer.  Expand it to 128KB and raise an Exception if incoming messages are too large.

TODO: Catch the exception in Adhearsion, log it and attempt to reset the AMI connection.  Right now the thread silently dies unless Thread.abort_on_exception = true
  • Loading branch information
bklang committed Oct 23, 2010
1 parent d96e393 commit 5599dbb
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 112 deletions.

0 comments on commit 5599dbb

Please sign in to comment.