build times - tested, there is no measureable difference before and
after this commit.
In this change:
use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h
Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.
Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better.
For the time being I have left alone second-level directories
(main/db1-ast, etc.).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- the *_CURRENT macros no longer need the list head pointer argument
- add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r84236 | russell | 2007-10-01 14:56:28 -0500 (Mon, 01 Oct 2007) | 5 lines
Add another sanity check in the AGI read loop. We really don't care about
EAGAIN unless we didn't read an entire line. If there is a newline at the
end if the read buffer, break, because we got the whole thing.
(reported and patched by bmd)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r82929 | russell | 2007-09-18 17:42:27 -0500 (Tue, 18 Sep 2007) | 11 lines
Add a new patch to handle interrupting the fgets() call when using FastAGI.
This version of the patch maintains the original behavior of the code when
not using FastAGI.
(closes issue #10553)
Reported by: juggie
Patches:
res_agi_fgets-4.patch uploaded by juggie (license 24)
res_agi_fgets_1.4svn.patch uploaded by juggie (license 24)
Slight mods by me
Tested by: juggie, festr
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r82245 | russell | 2007-09-11 10:26:51 -0500 (Tue, 11 Sep 2007) | 9 lines
(closes issue #10553)
Reported by: juggie
Patches:
res_agi_fgets-2.patch uploaded by juggie (license 24)
Tested by: juggie
When using fastagi, fgets() can return before a full line is read. Add explicit
handling for the case where it gets interrupted.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80360 | russell | 2007-08-22 14:53:30 -0500 (Wed, 22 Aug 2007) | 5 lines
Juggie in #asterisk-dev was reporting problems where fgets would return
without reading the whole line when using fastagi. When this happens,
errno was set to EINTR or EAGAIN. This patch accounts for the possibility
and lets fgets continue in that case.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
* Use a thread local ast_str for building the string that will be written out
to the console for debug, and to the FD for the AGI itself, instead of allocating
a buffer on the heap every time the function is called.
* Use the information contained within the ast_str to determine how many bytes
need to be written instead of calling strlen().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r77788 | russell | 2007-07-30 14:13:31 -0500 (Mon, 30 Jul 2007) | 10 lines
(closes issue #10279)
Reported by: seanbright
Patches:
res_agi.carefulwrite.1.4.07252007.patch uploaded by seanbright (license 71)
res_agi.carefulwrite.trunk.07252007.patch uploaded by seanbright (license 71)
Allow the "agi_network: yes" line to be printed out in the AGI debug output.
Also, allow partial writes to be handled when writing out this line just like
it is for all of the others.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- Makes the structures handling external AGI commands a bit more thread-safe
- Makes AGI transparently work with both live and hungup channels
- DeadAGI is hence no longer necessary and is deprecated
- CLI bug fixes
- Commands will refuse to run if the channel is dead and the command is nonsensical
for dead channels.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This merges the trunk only part of the patches from this issue. In 1.4, res_agi
will issue a warning if you try to use DeadAGI on a channel that is not hung up.
Now, in trunk, it just plain won't let you do it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
for extracting application, function, manager, and agi documentation is the wrong
one to take. The most severe problem is that the output depends on which modules
are loaded as well as compile time options, which both determine which parts are
available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72986 65c4cc65-6c06-0410-ace0-fbb531ad65f3