aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2007-10-01Fulfull a feature request from Qwell on the "core show locks" output. It willrussell1-10/+17
now note the lock type for each lock that a thread holds. (mutex, rdlock, or wrlock) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84271 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Show rwlocks in the "core show locks" output. Before, it only showed mutexes.russell1-0/+79
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84206 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-30Fix the AST_MODULE_INFO macro for C++ modules. The load and reload parametersrussell1-1/+1
were in the wrong place. (closes issue #10846, alebm) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84146 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-27if an Agent is redirected, the base channel should actually be redirected. ↵dhubbard1-0/+6
This was causing multiple issues, especially issue 7706 and BE-160 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84018 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set ofrussell2-5/+5
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18Add a new patch to handle interrupting the fgets() call when using FastAGI.russell1-0/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@82929 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-14Add checking for libusb here, so nobody has to deal with conflicts in therussell1-0/+3
chan_usbradio-1.4 branch every time the configure script gets changed git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82385 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-13Only compile in tracking astobj2 statistics if dev-mode is enabled. Also, whenrussell1-0/+1
dev mode is enabled, register the CLI command that can be used to run the astobj2 test and print out statistics. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82337 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Working on issue #10531 exposed a rather nasty 64-bit issue on ast_mktime, so wetilghman1-4/+0
updated the localtime.c file from source. Next we'll have to write ast_strptime to match. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82285 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-09Fix inline compiles on really old compilers (who uses gcc 2.7 anymore, really?)tilghman1-3/+11
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82028 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06This should fix a build issue that people building against uClibc were ↵qwell1-2/+0
seeing with the addition of astobj2 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81778 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06Various string length fixes. Removed an unused variable in aji_client ↵phsultan1-5/+17
structure (context) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81743 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-05Fix an issue that can occur when you do an attended transfer to parking. Ifrussell2-0/+4
you complete the transfer before the announcement of the parking spot finishes, then the channel being parked will hear the remainder of the announcement. These changes make it so that will not happen anymore. Basically, res_features sets a flag on the channel is playing the announcement to so that the file streaming core knows that it needs to watch out for a channel masquerade, and if it occurs, to abort the announcement. (closes BE-182) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81599 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-05Solaris x86 compatibility fixtilghman1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81569 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-04Remove the typedefs on ao2_container and ao2_iterator. This is simply becauserussell1-25/+17
we don't typedef objects anywhere else in Asterisk, so we might as well make this follow the same convention. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81448 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-01Making match_by_addr into ao2_match_by_addr and making it availablemmichelson1-0/+1
everywhere since it could be a handy callback to have git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81426 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-31Remove references to a debugging parameter that does not existrussell1-2/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81418 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23When executing a dynamic feature, don't look it up a second time by digit ↵russell1-1/+1
pattern after we already looked it up by name. This causes broken behavior if there is more than one feature defined with the same digit pattern. (closes issue #10539, reported by bungalow, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80573 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23This is a hack to maintain old behavior of chan_iax2. This ensures that ifrussell1-1/+8
the peers and users are being stored in a linked list, that they go in the list in the same order that the older code used. This is necessary to maintain the behavior of which peers and users get matched when traversing the container. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80497 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-22Add some more documentation on iterating ao2 containers. The documentationrussell1-33/+45
implies that is possible to miss an object or see an object twice while iterating. After looking through the code and talking with mmichelson, I have documented the exact conditions under which this can happen (which are rare and harmless in most cases). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80426 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-22Merge changes from team/russell/iax_refcount.russell2-0/+534
This set of changes fixes problems with the handling of iax2_user and iax2_peer objects. It was very possible for a thread to still hold a reference to one of these objects while a reload operation tries to delete them. The fix here is to ensure that all references to these objects are tracked so that they can't go away while still in use. To accomplish this, I used the astobj2 reference counted object model. This code has been in one of Luigi Rizzo's branches for a long time and was primarily developed by one of his students, Marta Carbone. I wanted to go ahead and bring this in to 1.4 because there are other problems similar to the ones fixed by these changes, so we might as well go ahead and use the new astobj if we're going to go through all of the work necessary to fix the problems. As a nice side benefit of these changes, peer and user handling got more efficient. Using astobj2 lets us not hold the container lock for peers or users nearly as long while iterating. Also, by changing a define at the top of chan_iax2.c, the objects will be distributed in a hash table, drastically increasing lookup speed in these containers, which will have a very big impact on systems that have a large number of users or peers. The use of the hash table will be made the default in trunk. It is not the default in 1.4 because it changes the behavior slightly. Previously, since peers and users were stored in memory in the same order they were specified in the configuration file, you could influence peer and user matching order based on the order they are specified in the configuration. The hash table does not guarantee any order in the container, so this behavior will be going away. It just means that you have to be a little more careful ensuring that peers and users are matched explicitly and not forcing chan_iax2 to have to guess which user is the right one based on secret, host, and access list settings, instead of simply using the username. If you have any questions, feel free to ask on the asterisk-dev list. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80362 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-21ugh. removing the diffs from ulaw.h and alaw.h for now; accidentally added ↵murf2-99/+1
them in 80166 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80167 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-21This patch solves problem 1 in 8126; it should not slow down the alaw codec, ↵murf2-1/+99
but should prevent signal degradation via multiple trips thru the codec. Fossil estimates the twice thru this codec will prevent fax from working. 4-6 times thru would result hearable, noticeable, voice degradation. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17Don't send a semicolon over the wire in sip notify messages.qwell1-0/+7
Caused by fix for issue 9938. I basically took the code that existed before 9938 was fixed, and copied it into a new function - ast_unescape_semicolon There should be very few places this will be needed (pbx_config does NOT need this (see issue 9938 for details)) Issue 10430, patch by me, with help/ideas from murf (thanks murf). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79904 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13Instead of accepting a single DTMF character accept a full string.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79334 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13Add an API call to allow the engine to know that DTMF was received.file1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79207 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-10From a user complaint on #asterisk, I have forced pbx_spool to explain what ↵murf1-0/+10
reason codes mean, when they are logged git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79099 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-10The last set of changes that I made to "core show locks" made it not able torussell1-9/+17
track mutexes unless they were declared using AST_MUTEX_DEFINE_STATIC. Locks initialized with ast_mutex_init() were not tracked. It should work now. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78995 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Fix the return value of AST_LIST_REMOVE(). This shouldn't be causing anyrussell1-1/+1
problems, though, because the only code that uses the return value only checks to see if it is NULL. (closes issue #10390, pointed out by mihai) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-05Fix compilation failure when MALLOC_DEBUG is enabled, but DEBUG_THREADS is notrussell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78143 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-03Changed the behavior of sip's realtime_peer function to match the ↵mmichelson1-0/+8
corresponding way of matching for non-realtime peers. Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the IP address. In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-03Add some improvements to lock debugging. These changes take effectrussell1-9/+67
with DEBUG_THREADS enabled and provide the following: * This will keep track of which locks are held by which thread as well as which lock a thread is waiting for in a thread-local data structure. A reference to this structure is available on the stack in the dummy_start() function, which is the common entry point for all threads. This information can be easily retrieved using gdb if you switch to the dummy_start() stack frame of any thread and print the contents of the lock_info variable. * All of the thread-local structures for keeping track of this lock information are also stored in a list so that the information can be dumped to the CLI using the "core show locks" CLI command. This introduces a little bit of a performance hit as it requires additional underlying locking operations inside of every lock/unlock on an ast_mutex. However, the benefits of having this information available at the CLI is huge, especially considering this is only done in DEBUG_THREADS mode. It means that in most cases where we debug deadlocks, we no longer have to request access to the machine to analyze the contents of ast_mutex_t structures. We can now just ask them to get the output of "core show locks", which gives us all of the information we needed in most cases. I also had to make some additional changes to astmm.c to make this work when both MALLOC_DEBUG and DEBUG_THREADS are enabled. I disabled tracking of one of the locks in astmm.c because it gets used inside the replacement memory allocation routines, and the lock tracking code allocates memory. This caused infinite recursion. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78095 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Add some fixes for building on Solaris.file1-2/+7
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77869 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Extend autoconf logic to determine which version of gethostbyname_r is on ↵file1-2/+5
the system. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77863 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Add a flag to the speech API that allows an engine to set whether it ↵file1-2/+3
received results or not. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77831 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-24Merged revisions 76934 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76934 | tilghman | 2007-07-24 17:11:33 -0500 (Tue, 24 Jul 2007) | 2 lines Oops, res contains the error code, not errno. I was wondering why a mutex was reporting "No such file or directory"... ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@76937 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Instead of figuring out kernel versions that have compiler.h and not... ↵file1-0/+3
let's just use autoconf to check for it's presence. (issue #10174 reported by francesco_r) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74572 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-10Merged revisions 74373 via svnmerge from qwell1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r74373 | qwell | 2007-07-10 13:37:23 -0500 (Tue, 10 Jul 2007) | 5 lines Use res_ndestroy on systems that have it. Otherwise, use res_nclose. This prevents a memleak on NetBSD - and possibly others. Issue 10133, patch by me, reported and tested by scw ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74374 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-28regenerate the configure script for rizzorussell1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72493 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-18To prevent 92138749238754 more reports of "I have unixodbc installed, butrussell1-0/+3
still can't build *_odbc.so!", check for ltdl directly, instead of just listing it as another library to include in the unixodbc check in the configure script. This also makes ltdl show up as a dependency in menuselect so people know what to go install. (related to issue #9989, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69702 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14use ast_localtime() in every place localtime_r() was being usedkpfleming1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11Solaris 10 sometimes (?) needs this include in order to have NULL defined.qwell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68814 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-07Issue #9738 - Make sure we can unload res_jabber. Patch by phsultan - thanks!oej1-1/+2
Due to a bug in the iksemel library, this will not work if you are using GTLS in the connection. That's being investigated. If you figure out a way to handle that without us having to patch iksemel, let us know in the bug report. Thanks. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67993 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Merged revisions 67715 via svnmerge from russell1-3/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r67715 | russell | 2007-06-06 11:40:51 -0500 (Wed, 06 Jun 2007) | 5 lines We have some bug reports showing crashes due to a double free of a channel. Add a sanity check to ast_channel_free() to make sure we don't go on trying to free a channel that wasn't found in the channel list. (issue #8850, and others...) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67716 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05This bug has been hanging over my head ever since I wrote this SLA code.russell1-2/+3
Every time I tried to go debug it by adding some debug output, the behavior would change. It turns out I wasn't crazy. I had the following piece of code: if (remove) AST_LIST_REMOVE_CURRENT(...); Well, AST_LIST_REMOVE_CURRENT was not wrapped in braces, so my conditional statement didn't do much good at all. It always ran at least all of the macro minus the first statement, so I was seeing list entries magically disappear when they weren't supposed to. After many hours of debugging, I have come to this extremely irritating fix. :) (issues #9581, #9497) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67492 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05When shutting down "gracefully", go through and run the unload() callbacks forrussell1-0/+7
all of the modules. "stop now" is considered a non-graceful shutdown and will not go through this process. (issue #9804, reported by chrisost, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67308 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-04Fix some compiler warnings in C++ modules.russell1-2/+2
(issue #9866, reported by osk, patch by Corydon76) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67018 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-31Change a couple of header files to not use "new", which is a reserved keywordrussell2-2/+2
in C++. (issue #9830, reported by osk) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66775 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Checking for the strip application needs to be done with AC_PATH_TOOLrussell1-0/+3
instead of AC_PATH_PROG to properly handle cross compilation environments. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66026 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Fix handling of zero-length frames when a codec is capable of native PLC.qwell1-0/+1
Issue 9183, patch by Mihai. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65877 f38db490-d61c-443f-a65b-d21fe96a405b