summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-02-17Fix a couple of bugs in test tab completion.Mark Michelson
1. Add missing unlock of lists. 2. Swap order of arguments to test_cat_cmp in complete_test_name. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17Tab completion for test categories and names for "test show registered" and ↵Mark Michelson
"test execute" CLI commands. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17Fix two problems in ast_str functions found while writing a unit test.Mark Michelson
1. The documentation for ast_str_set and ast_str_append state that the max_len parameter may be -1 in order to limit the size of the ast_str to its current allocated size. The problem was that the max_len parameter in all cases was a size_t, which is unsigned. Thus a -1 was interpreted as UINT_MAX instead of -1. Changing the max_len parameter to be ssize_t fixed this issue. 2. Once issue 1 was fixed, there was an off-by-one error in the case where we attempted to write a string larger than the current allotted size to a string when -1 was passed as the max_len parameter. When trying to write more than the allotted size, the ast_str's __AST_STR_USED was set to 1 higher than it should have been. Thanks to Tilghman for quickly spotting the offending line of code. Oh, and the unit test that I referenced in the top line of this commit will be added to reviewboard shortly. Sit tight... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17Add support for GROUP_MATCH_COUNT regex matching on categoryJeff Peeler
Current support for regex matching was previously only available on the group. Also, error reporting for regex failures has been added. In addition to this feature enhancement a unit test has been written to check the regular expression logic to ensure the count operation is working as expected. (closes issue #16642) Reported by: kobaz Patches: groupmatch2.patch uploaded by kobaz (license 834) Review: https://reviewboard.asterisk.org/r/503/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17modified device2extension_test's categoryDavid Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17unit test for combined device state mapping and device to exten state mappingDavid Vossel
Review: https://reviewboard.asterisk.org/r/516/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17addition of dynamic parkinglots featureDavid Vossel
This feature allows for parkinglots to be created dynamically within the dialplan. Thanks to all who were involved with getting this patch written and tested! (closes issue #15135) Reported by: IgorG Patches: features.dynamic_park.v3.diff uploaded by IgorG (license 20) 2009090400_dynamicpark.diff.txt uploaded by mvanbaak (license 7) dynamic_parkinglot.diff uploaded by dvossel (license 671) Tested by: eliel, IgorG, acunningham, mvanbaak, zktech Review: https://reviewboard.asterisk.org/r/352/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17Merged revisions 247168 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r247168 | mmichelson | 2010-02-17 10:24:17 -0600 (Wed, 17 Feb 2010) | 3 lines Make sure that when autofill is disabled that callers not in the front of the queue cannot place calls. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17RTP documentation states that you can pass NULL as the module, so make sure ↵Tilghman Lesher
that's really the case. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-17Make all of the various rtpqos parameters in this branch available from the ↵Tilghman Lesher
CHANNEL function. Also includes a test for retrieving rtpqos parameters, including a NULL RTP driver. Additionally, some further separation of the SIP internal API into headers was necessary. (closes issue #16652) Reported by: kkm Patches: 20100204__issue16652.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/501/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Add va_end calls to __ast_str_helper.Mark Michelson
According to the man page for stdarg(3), "Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function." There were several cases in __ast_str_helper where va_copy was not matched with a corresponding call to va_end. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16generate connected line info update from info in h.323 packetsAlexandr Anikin
Tested by: benngard git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Add some clarifying documentation to the ast_str_set and ast_str_append ↵Mark Michelson
functions. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16swap openssl with OpenSSL in warning message.David Vossel
(issue #16673) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16warning message if openssl support is missing while attempting tls connectionDavid Vossel
(closes issue #16673) Reported by: michaesc Patches: tls_error_msg.diff uploaded by dvossel (license 671) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Add unit test for dialplan pattern matching.Mark Michelson
This test works by reading input from arrays to build a sample dialplan. From there, patterns are attempted to be matched against said dialplan, with the expected match given. We then search in our example dialplan to see if we find a match and if what we find matches what we expected it to match. (closes issue #16809) Reported by: lmadsen Tested by: mmichelson Review: https://reviewboard.asterisk.org/r/504/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16fixes sample rate conversion issue with Monitor applicationDavid Vossel
When using ast_seekstream with the read/write streams of a monitor, the number of samples we are seeking must be of the same rate as the stream or the jump calculation will be incorrect. This patch adds logic to correctly convert the number of samples to jump to the sample rate the read/write stream is using. For example, if the call is G722 (16khz) and the read/write stream is recording a 8khz wav, seeking 320 samples of 16khz audio is not the same as seeking 320 samples of 8khz audio when performing the ast_seekstream on the stream. ABE-2044 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Revert changes for now, pending discussionTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Add a few more targets for DEBUG_THREADLOCALSTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Change the blanket rules to delete .lastclean on all CFLAGS menuselect ↵Tilghman Lesher
targets to be more particular. This change builds upon the recent change to menuselect to add 'touch_on_change' as an attribute of both categories and members. This should allow only the most invasive defines to cause a complete rebuild, while defines which only affect a subset of modules will only cause a rebuild of that smaller set. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-16Allow Timer B to be set on the peer, and ensure SIP rules are followed (or ↵Tilghman Lesher
warn) in comparison to Timer T1. (closes issue #16643) Reported by: nahuelgreco Patches: 20100204__issue16643.diff.txt uploaded by tilghman (license 14) Tested by: oej git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-15Merged revisions 246709 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246709 | tilghman | 2010-02-15 17:42:33 -0600 (Mon, 15 Feb 2010) | 5 lines Make the menuselect instructions correct by allowing 'make menuselect' to actually solve dependency problems. (Previously, it would fail out again with the same message about running 'make menuselect', which was NOT at all helpful.) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-15Restore triedtopribridge flag code removed in -r211197.Richard Mudgett
Ooops. Failed to note that we were inside a for loop and pri_channel_bridge() needs to be executed only once. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-15Instead of just automatically filtering out in the Makefile, give an ↵Tilghman Lesher
indication of dependencies in menuselect. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-15chan_sip parse code refactoring plus two new unit testsDavid Vossel
Code Refactoring Changes - read_to_parts() moved to reqresp_parser.c and has been renamed as get_name_and_number() - get_in_brackets() moved to reqresp_parser.c - find_closing_quotes() added to sip_utils.h Logic Changes - get_name_and_number() now uses parse_uri() and get_calleridname() for parsing. Before this change only names within quotes were found, when names not within quotes are possible. New Unit Tests -sip_get_name_and_number_test -sip_get_in_brackets_test (closes issue #16707) Reported by: Nick_Lewis Patches: issue16706.diff uploaded by dvossel (license 671) Review: https://reviewboard.asterisk.org/r/499/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-12Merged revisions 246545 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246545 | dvossel | 2010-02-12 17:30:17 -0600 (Fri, 12 Feb 2010) | 16 lines lock channel during datastore removal On channel destruction the channel's datastores are removed and destroyed. Since there are public API calls to find and remove datastores on a channel, a lock should be held whenever datastores are removed and destroyed. This resolves a crash caused by a race condition in app_chanspy.c. (closes issue #16678) Reported by: tim_ringenbach Patches: datastore_destroy_race.diff uploaded by tim ringenbach (license 540) Tested by: dvossel ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-12Blocked revisions 246460 via svnmergeJason Parker
........ r246460 | qwell | 2010-02-12 12:52:28 -0600 (Fri, 12 Feb 2010) | 1 line Fix some silly formatting, and remove unnecessary option_debug checks ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-12fixes areas where port should be removed from domain during parsingDavid Vossel
A patch was committed recently that converted duplicate uri parsing code to use the parse_uri function. There were two instances where this conversion did not mimic previous behavior exactly because the port was not being parsed off the end of the domain. In order to do this, a dummy pointer argument needs to be passed into parse_uri so it will know it must parse out the port from the domain. If a port output paramenter is not present, the domain is returned with the port still attached. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-12Updated doc for OSP lookup application.TransNexus OSP Development
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-11fixes some test description formatting inconsistencies so log file looks niceDavid Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-11astobj2 unit test and bug fixDavid Vossel
A bug was discovered during the creation of the astobj2 unit test. When OBJ_MULTIPLE | OBJ_UNLINK is used, the objects being returned had a ref count issue. This patch resolves that. Review: https://reviewboard.asterisk.org/r/496/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Add a test module for the event API, test_event.c.Russell Bryant
This module includes a single test so far that creates events using two different methods and does some verification on the result to make sure the correct data can be retrieved from the event that was created. One bug was found in the event API while developing this test, which makes me happy. :-) Review: https://reviewboard.asterisk.org/r/495/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10additional parse_uri test and documentationDavid Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10res_pktccops needs to be able to export a symbol for chan_mgcpTilghman Lesher
(closes issue #16782) Reported by: nahuelgreco Patches: res_pktccops.exports uploaded by nahuelgreco (license 162) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Fussy compiler on another machine...Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Fix weird issue with unit tests on optimized build - turned out to be a ↵Tilghman Lesher
signing issue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Merged revisions 246115 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue #16677) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Change channel state on local channels for busy,answer,ring.Jeff Peeler
Previously local channels channel state never changed. This became problematic when the state of the other side of the local channel was lost, for example during a masquerade. Changing the state of the local channel allows for the scenario to be detected when the channel state is set to ringing, but the peer isn't ringing. The specific problem scenario is described in 164201. Although this was noted on one of the issues, here is the tested dialplan verified to work: exten => 9700,1,Dial(Local/*9700@default&Local/0009700@default) exten => *9700,1,Set(GLOBAL(TESTCHAN)=${CHANNEL:0:${MATH(${LEN(${CHANNEL})}-1):0:2}}1) exten => *9700,n,wait(3) ;3 works, 1 did not exten => *9700,n,Dial(SIP/5001) exten => 0009700,1,Wait(1) ;1 works, 3 did not exten => 0009700,n,ChannelRedirect(${TESTCHAN},parkedcalls,701,1) (closes issue #14992) Reported by: davidw git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Solaris doesn't like outputting a NULL to a %s in format strings.Tilghman Lesher
Detect all platforms that don't like that, either, and ensure that when documentation is missing, we pass a non-NULL pointer when outputting the corresponding documentation. (closes issue #16689) Reported by: bklang Patches: 20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/497/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Enable warnings on atypical conditions for the FILTER function (suggested by ↵Tilghman Lesher
mmichelson on the -dev list). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10Merged revisions 245944 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r245944 | tilghman | 2010-02-10 07:37:13 -0600 (Wed, 10 Feb 2010) | 2 lines Include examples of FILTER usage in extension patterns where a "." may be a risk. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09Various updates to the unit test API.Russell Bryant
1) It occurred to me that the difference in usage between the error ast_str and the ast_test_update_status() usage has turned out to be a bit ambiguous in practice. In a lot of cases, the same message was being sent to both. In other cases, it was only sent to one or the other. My opinion now is that in every case, I think it makes sense to do both; we should output it to the CLI as well as save it off for logging purposes. This change results in most of the changes in this diff, since it required changes to all existing unit tests. It also allowed for some simplifications of unit test API implementation code. 2) Update ast_test_status_update() to include the file, function, and line number for the code providing the update. 3) There are some formatting tweaks here and there. Hopefully they aren't too distracting for code review purposes. Reviewboard's diff viewer seems to do a pretty good job of pointing out when something is a whitespace change. 4) I moved the md5_test and sha1_test into the test_utils module. It seemed like a better approach since these tests are so tiny. 5) I changed the number of nodes used in heap_test_2 from 1 million to 100 thousand. The only reason for this was to reduce the time it took for this test to run. 6) Remove an unused function prototype that was at the bottom of utils.h. 7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro. The one minor difference in behavior is that it no longer checks for a test registered with the same name. 8) Expand the code in test_alloc() to provide specific error messages for each failure case, to clearly inform developers if they forget to set the name, summary, description, etc. 9) Tweak the output of the "test show registered" CLI command. I swapped the name and category to have the category first. It seemed more natural since that is the sort key. 10) Don't output the status ast_str in the "test show results" CLI command. This is going to tend to be pretty verbose, so just leave that for the detailed test logs (test generate results). Review: https://reviewboard.asterisk.org/r/493/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09fixes a merging error for the iaxs and iaxsl off by one fixDavid Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09Merged revisions 245792 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r245792 | dvossel | 2010-02-09 16:55:38 -0600 (Tue, 09 Feb 2010) | 12 lines Fixes iaxs and iaxsl size off by one issue. 2^15 = 32768 which is the maximum allowed iax2 callnumber. Creating the iaxs and iaxsl array of size 32768 means the maximum callnumber is actually out of bounds. This causes a nasty crash. (closes issue #15997) Reported by: exarv Patches: iax_fix.diff uploaded by dvossel (license 671) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09Ensure frames are only freed once.Tilghman Lesher
(closes issue #16361) Reported by: vlad Patches: 20100208__issue16361.diff.txt uploaded by tilghman (license 14) Tested by: kenny, bloodoff, misaksen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09This commit removes an extra newline in T.38 generated SDP packets. This bug ↵Matthew Nicholson
was caused by the fix introduced in r243860. (closes issue #16766) Reported by: raivisr Patches: t38-sdp-newline-fix1.diff uploaded by mnicholson (license 96) Tested by: raivisr git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09Don't offer MMR or JBIG transcoding during T.38 negotiation.Kevin P. Fleming
After further discussion with Steve Underwood, we should not (yet) be offering to receive MMR or JBIG transcoded streams from T.38 endpoints. A future spandsp release will support those features, and then they can be enabled during negotiation git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-08Fix return value of get_ie_str() and get_ie_str_hash() for non-existent IE.Russell Bryant
I found this bug while developing a unit test for event allocation. Testing is awesome. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-08UNREGISTER instead of REGISTER in unload_module().Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-08Use memmove() instead of memcpy() for a case where the buffers overlap.Russell Bryant
Once again, valgrind is freaking awesome. That is all. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245610 65c4cc65-6c06-0410-ace0-fbb531ad65f3