summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesLuigi Rizzo
who really need it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20move internal function declarations to include/asterisk/_private.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20switch compile-time option checking to string storage mode in this branch tooKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19Be a bit more pedantic about the type for holding the md5 sum for the build ↵Russell Bryant
options. Also, doxygenify the comment. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19move the declaration of struct ast_channel ast_frame and ast_moduleLuigi Rizzo
to compat.h so it is always available - hopefully this will let us reduce the number of inclusions of channel.h and frame.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyLuigi Rizzo
were included almost everywhere. Remove some of the instances. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19revert inclusion of options.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-18Use the easy way that rizzo mentioned, only include malloc.h on the Windows ↵Joshua Colp
platform. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-18Revert last commit, apparently buildbot lied to me.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-18Change how we handle alloca to conform with how it is suggested in the ↵Joshua Colp
autoconf manual for AC_FUNC_ALLOCA. FreeBSD 6 now builds again and no other platforms should be broken by this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17Use autoconf logic to determine the presence of ↵Joshua Colp
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP and PTHREAD_MUTEX_RECURSIVE_NP. Enclose error message from network.h in " git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17if alloca.h is not present, try malloc.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17prefer socket.h over other variants (winsock etc.)Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17start using asterisk/network.h for network related headers.Luigi Rizzo
Also remove some unnecessary includes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17wrapper for all generic network headers that have different namesLuigi Rizzo
and locations on the various systems. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17use autoconf results to conditionally compile timersubLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17compatibility fixes for cygwinLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17some version of flex produce code that wants __STDC_VERSION__Luigi Rizzo
defined, but the compiler does not always define it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17timersub is a macro not a function, so write the check in a wayLuigi Rizzo
that detects both formats. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17Update the configure script check for sys/poll.h to also provide the result inRussell Bryant
include/asterisk/autoconfig.h. Also, move the conditional include of sys/poll.h or asterisk/poll-compat.h into asterisk/config.h instead of the two headers it existed in before. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17add detection for timersub() and winsock.h/winsock2.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17provide definitions for __LITTLE_ENDIAN and __BIG_ENDIAN if not present.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17use poll as detected by configureLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17acinclude.m4: add a function to help checking sdl-config, gtk-configLuigi Rizzo
and the like (this could be used for gtk and gtk2 as well) Other files: add tests for sdl, sdl_image and avcodec and regenerate configure and autoconfig.h.in git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17add check for the presence of globLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16paths are already in include/asterisk/paths.h so don't duplicateLuigi Rizzo
them in include/asterisk.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16whitespace only change - adjust indentation and add someLuigi Rizzo
comments on the content of these two files. utils.h (which is included in over 150 files) contains a lot of unrelated functions which require the inclusion of a large number of other headers. At some point we should partition its content in a better way. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16logger.h does not need options.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16remove redundant #include "asterisk/compat.h",Luigi Rizzo
but make sure that asterisk/compiler.h is included everywhere git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
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
2007-11-16Merged revisions 89325 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89325 | kpfleming | 2007-11-16 10:47:46 -0600 (Fri, 16 Nov 2007) | 4 lines To help combat problems where people build external modules (asterisk-addons or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash. If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16add a small new function to retrieve variables from a configLuigi Rizzo
once we have a pointer to the category. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15If we're going to be passing a negative value for the size of a stringfield,Tilghman Lesher
in order to indicate something, then using an UNSIGNED parameter is bad, mmmmmkay? git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15access channel locks through ast_channel_lock/unlock/trylock and notLuigi Rizzo
through ast_mutex primitives. To detect all occurrences, I have renamed the lock field in struct ast_channel so it is clear that it shouldn't be used directly. There are some uses in res/res_features.c (see details of the diff) that are error prone as they try and lock two channels without caring about the order (or without explaining why it is safe). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14make the 'name' and 'value' fields in ast_variable const char *Luigi Rizzo
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14Fix up various coding guidelines issues ...Russell Bryant
- handle memory allocation failures - add an ast_ prefix to a publicly exported function - put curly braces in the right places - add a bunch of spaces where they should be be used git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13This fixes a build error on my mac. It also works on my linux box. Let meRussell Bryant
know if it breaks any other platform ... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12Doxygen fixes.Jason Parker
Also fix a common typo I kept seeing (arguement) in various files. Closes issue #11222, patch by snuffy (with arguement > argument by me). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12Thanks to snuffy for this doxygen update to hashtab.h; closes issue #11223Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12Thanks to snuff-work, who brought up that these fixes might need to be made.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-09This is the perhaps the biggest, boldest, most daring change I've ever ↵Steve Murphy
committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08improve linked-list macros in two ways:Kevin P. Fleming
- 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
2007-11-07Print out the channel name as a prefix to the "agi debug" output. This makesRussell Bryant
AGI debugging on busy systems much easier. (closes issue #10730) Reported by: junky Patches: agi_debug_chan.diff uploaded by junky (license 177) 20070923_10730.diff uploaded by mvanbaak (license 7) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Commit some cleanups to the format type code.Tilghman Lesher
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits. - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution. (This doesn't affect anything immediately, until another codec has wb support.) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Merged revisions 89045 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89045 | tilghman | 2007-11-06 13:09:06 -0600 (Tue, 06 Nov 2007) | 2 lines We went to the trouble of creating a method of tracking failed trylocks, then never turned it on (oops). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Additional TDD changes (preparing for SIP changes - adding TDD support to SIP)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Allow gtalk and jingle to use TLS connections again.Jason Parker
Closes issue #9972 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Set up detection of IP_PKTINFO in autoconf for chan_unistimTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Merged revisions 88805 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r88805 | russell | 2007-11-05 16:07:54 -0600 (Mon, 05 Nov 2007) | 12 lines After seeing crashes related to channel variables, I went looking around at the ways that channel variables are handled. In general, they were not handled in a thread-safe way. The channel _must_ be locked when reading or writing from/to the channel variable list. What I have done to improve this situation is to make pbx_builtin_setvar_helper() and friends lock the channel when doing their thing. Asterisk API calls almost all lock the channel for you as necessary, but this family of functions did not. (closes issue #10923, reported by atis) (closes issue #11159, reported by 850t) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06Merged revisions 88931 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r88931 | russell | 2007-11-06 07:50:15 -0600 (Tue, 06 Nov 2007) | 8 lines Remove some checks to see if locks are initialized from the non-DEBUG_THREADS versions of the lock routines. These are incorrect for a number of reasons: - It breaks the build on mac. - If there is a problem with locks not getting initialized, then the proper fix is to find that place and fix the code so that it does get initialized. - If additional debug code is needed to help find the problem areas, then this type of things should _only_ be put in the DEBUG_THREADS wrappers. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88932 65c4cc65-6c06-0410-ace0-fbb531ad65f3