summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2011-11-09Add a unit test for ast_sockaddr_split_hostportTerry Wilson
Review: https://reviewboard.asterisk.org/r/1575/ ........ Merged revisions 344157 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344175 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-29Fix AST_LIST_INSERT_BEFORE_CURRENT() updating the wrong variable.Richard Mudgett
AST_LIST_INSERT_BEFORE_CURRENT() could not be used twice in an iteration or before AST_LIST_REMOVE_CURRENT() without corrupting the list. AST_LIST_INSERT_BEFORE_CURRENT() could also corrupt the list if AST_LIST_INSERT_BEFORE_CURRENT() or AST_LIST_REMOVE_CURRENT() is used on the next iteration. * Fixed cut and paste error using the wrong variable in AST_LIST_INSERT_BEFORE_CURRENT(). * Added linked list unit tests for AST_LIST_INSERT_BEFORE_CURRENT(), AST_LIST_APPEND_LIST(), and AST_LIST_INSERT_LIST_AFTER(). ........ Merged revisions 342661 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342662 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-17Set 'core' support level for test_format_api.cPaul Belanger
........ Merged revisions 341146 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29Merged revisions 338556 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r338556 | pabelanger | 2011-09-29 17:14:34 -0400 (Thu, 29 Sep 2011) | 9 lines Merged revisions 338555 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r338555 | pabelanger | 2011-09-29 17:12:21 -0400 (Thu, 29 Sep 2011) | 2 lines Test modules should depend on the TEST_FRAMEWORK flag ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29Merged revisions 338552 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r338552 | qwell | 2011-09-29 15:54:55 -0500 (Thu, 29 Sep 2011) | 9 lines Merged revisions 338551 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r338551 | qwell | 2011-09-29 15:54:13 -0500 (Thu, 29 Sep 2011) | 1 line Test modules have a support level of core. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-28Merged revisions 338228 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r338228 | qwell | 2011-09-28 15:54:35 -0500 (Wed, 28 Sep 2011) | 9 lines Merged revisions 338227 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r338227 | qwell | 2011-09-28 15:52:47 -0500 (Wed, 28 Sep 2011) | 1 line Add support levels to non-module sections of menuselect (cflags, utils, etc). ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26Merged revisions 337974 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r337974 | rmudgett | 2011-09-26 14:35:23 -0500 (Mon, 26 Sep 2011) | 37 lines Merged revisions 337973 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r337973 | rmudgett | 2011-09-26 14:30:39 -0500 (Mon, 26 Sep 2011) | 30 lines Fix deadlock when using dummy channels. Dummy channels created by ast_dummy_channel_alloc() should be destoyed by ast_channel_unref(). Using ast_channel_release() needlessly grabs the channel container lock and can cause a deadlock as a result. * Analyzed use of ast_dummy_channel_alloc() and made use ast_channel_unref() when done with the dummy channel. (Primary reason for the reported deadlock.) * Made app_dial.c:dial_exec_full() not call ast_call() holding any channel locks. Chan_local could not perform deadlock avoidance correctly. (Potential deadlock exposed by this issue. Secondary reason for the reported deadlock since the held lock was part of the deadlock chain.) * Fixed some uses of ast_dummy_channel_alloc() not checking the returned channel pointer for failure. * Fixed some potential chan=NULL pointer usage in func_odbc.c. Protected by testing the bogus_chan value. * Fixed needlessly clearing a 1024 char auto array when setting the first char to zero is enough in manager.c:action_getvar(). (closes issue ASTERISK-18613) Reported by: Thomas Arimont Patches: jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: Thomas Arimont ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20Merged revisions 337062 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r337062 | kmoore | 2011-09-20 16:05:01 -0500 (Tue, 20 Sep 2011) | 18 lines Merged revisions 337061 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r337061 | kmoore | 2011-09-20 16:04:11 -0500 (Tue, 20 Sep 2011) | 11 lines Make CANMATCH with the new pattern match engine behave more like the old one When checking an extension for E_CANMATCH using the new extension matching algorithm, an exact match was not returned as a possible match resulting in the queue failing to allow a caller to exit on DTMF. This removes the requirement that an extension be longer than acquired digits for an E_CANMATCH operation to succeed. (closes issue ASTERISK-18044) Review: https://reviewboard.asterisk.org/r/1367/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-16Merged revisions 332177 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332177 | pabelanger | 2011-08-16 16:11:49 -0400 (Tue, 16 Aug 2011) | 11 lines Merged revisions 332176 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332176 | pabelanger | 2011-08-16 16:10:13 -0400 (Tue, 16 Aug 2011) | 4 lines Flag test modules as 'core' Review: https://reviewboard.asterisk.org/r/1369/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-12Merged revisions 331659 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331659 | twilson | 2011-08-12 11:31:21 -0500 (Fri, 12 Aug 2011) | 11 lines Merged revisions 331658 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331658 | twilson | 2011-08-12 11:30:26 -0500 (Fri, 12 Aug 2011) | 4 lines Fix netsock2 multiple zero-expansion test Remove erroneous single bracket. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29astobj2: Avoid using temporary objects + ao2_find() with OBJ_POINTER.Russell Bryant
There is a fairly common pattern making its way through the code base where we put a temporary object on the stack so we can call ao2_find() with OBJ_POINTER. The purpose is so that it can be passed into the object hash function. However, this really seems like a hack and potentially error prone. This patch is a first stab at approach to avoid having to do that. It adds a new flag, OBJ_KEY, which can be used instead of OBJ_POINTER in these situations. Then, the hash function can know whether it was given an object or some custom data to hash. The patch also changes some uses of ao2_find() for iax2_user and iax2_peer objects to reflect how OBJ_KEY would be used. So long, and thanks for all the fish. Review: https://reviewboard.asterisk.org/r/1184/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-20Merged revisions 328992 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/2.0 ................ r328992 | twilson | 2011-07-20 15:18:25 -0500 (Wed, 20 Jul 2011) | 12 lines Merged revisions 328987 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328987 | twilson | 2011-07-20 15:16:58 -0500 (Wed, 20 Jul 2011) | 5 lines We can't guarantee an eth0 is present FreeBSD test fails on this case presumably because there is no eth0 on the test machine. Better to just remove this test for now. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19Merged revisions 328717 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328717 | twilson | 2011-07-18 20:55:32 -0500 (Mon, 18 Jul 2011) | 14 lines Merged revisions 328716 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328716 | twilson | 2011-07-18 20:35:53 -0500 (Mon, 18 Jul 2011) | 7 lines Make AST_LIST_REMOVE safer AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This commit also adds linked list unit tests. Review: https://reviewboard.asterisk.org/r/1321/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12Merged revisions 327793 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327793 | tilghman | 2011-07-12 10:35:46 -0500 (Tue, 12 Jul 2011) | 14 lines Use 'printf' (POSIX issue 4) instead of 'echo -n', for portability. The problem with using 'echo -n' is that it is not portable. While BSD systems required that the '-n' option be removed and interpreted, System V required that all strings should be echoed with no interpretation of options. This fundamental difference of behavior means that it is never possible to use the '-n' flag to echo in tests which are meant to be portable. In this case, on Mac OS X 10.6, the /bin/sh shell builtin 'echo' uses the System V semantics of the command, and thus the SHELL test failed on that platform. http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html#tag_04_41_16 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11use printf instead of echo -n in substitution testMatthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11Merged revisions 327512 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327512 | mnicholson | 2011-07-11 08:53:59 -0500 (Mon, 11 Jul 2011) | 2 lines reset our buffer each iteration when doing variable substitution ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08Merged revisions 327106 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327106 | mnicholson | 2011-07-08 14:52:51 -0500 (Fri, 08 Jul 2011) | 11 lines Reset our ast_str before passing it on to dialplan function backends. It is possible for a dialplan backend to not modify the given buffer or ast_str and still return success. This causes any previous value stored in the buffer to be used as if the new function call provided it. Some functions also append to the given buffer assuming it is empty. The test_substitution unit test has also been modified to detect this problem. (closes issue ASTERISK-17878) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08Merged revisions 327046 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r327046 | russell | 2011-07-08 11:00:05 -0500 (Fri, 08 Jul 2011) | 2 lines Fix an error and add more log message info to help see why this fails on FreeBSD. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-06Replace Berkeley DB with SQLite 3Terry Wilson
There were some bugs in the very ancient version of Berkeley DB that Asterisk used. Instead of spending the time tracking down the bugs in the Berkeley code we move to the much better documented SQLite 3. Conversion of the old astdb happens at runtime by running the included astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave identically to the old Berkeley backend, but in the future we could offer a much more robust interface. We do not include the SQLite 3 library in the source tree, but instead rely upon the distribution-provided libraries. SQLite is so ubiquitous that this should not place undue burden on administrators. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23Merged revisions 324557 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r324557 | twilson | 2011-06-22 22:10:38 -0500 (Wed, 22 Jun 2011) | 5 lines Remove tests for parsing address with invalid port getaddrinfo on OS X returns with EAI_NONAME error when passed a port greater than 65535. Linux throws no error, so remove the tests for now. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-22Merged revisions 324484 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r324484 | twilson | 2011-06-22 13:52:04 -0500 (Wed, 22 Jun 2011) | 20 lines Stop sending IPv6 link-local scope-ids in SIP messages The idea behind the patch listed below was used, but in a more targeted manner. There are now address stringification functions for addresses that are meant to be sent to a remote party. Link-local scope-ids only make sense on the machine from which they originate and so are stripped in the new functions. There is also a host sanitization function added to chan_sip which is used for when peer and dialog tohost fields or sip_registry hostnames are used to craft a SIP message. Also added are some basic unit tests for netsock2 address parsing. (closes issue ASTERISK-17711) Reported by: ch_djalel Patches: asterisk-1.8.3.2-ipv6_ll_scope.patch uploaded by ch_djalel (license 1251) Review: https://reviewboard.asterisk.org/r/1278/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-16Merged revisions 323990 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323990 | rmudgett | 2011-06-16 13:12:32 -0500 (Thu, 16 Jun 2011) | 5 lines The test_event unit test is occasionally failing. Wait for the special posted event to process before adding a new subscription. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15Merged revisions 323866 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323866 | twilson | 2011-06-15 15:03:58 -0500 (Wed, 15 Jun 2011) | 2 lines Remove now-useless cast of ARRAY_LEN ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15Merged revisions 323859 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323859 | twilson | 2011-06-15 14:45:20 -0500 (Wed, 15 Jun 2011) | 2 lines Fix more ARRAY_LEN format string issues ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15Merged revisions 323672 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323672 | twilson | 2011-06-15 10:09:51 -0700 (Wed, 15 Jun 2011) | 5 lines Cast ARRAY_LEN to size_t for ast_logging 32-bit and 64-bit machines return different types for ARRAY_LEN(), so cast it before using in a format string. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15Merged revisions 323669-323670 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323669 | rmudgett | 2011-06-15 11:43:18 -0500 (Wed, 15 Jun 2011) | 21 lines [regression] Voicemail MWI is no longer sent. When leaving a voicemail, the MWI message is never sent. The same thing happens when checking a voicemail and marking it as read. If you restart Asterisk, everything comes up at that state correctly, but changes to the messages in voicemail causes the light to not be set appropriately. Very easy to reproduce. * Made ast_event_check_subscriber() return TRUE if there are ANY subscribers to an event type when there are no restricting ie values passed. This allows an event being queued to be queued. (closes issue ASTERISK-18002) Reported by: lmadsen Tested by: lmadsen, irroot Patches: jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621) (closes issue ASTERISK-18019) ........ r323670 | rmudgett | 2011-06-15 11:43:31 -0500 (Wed, 15 Jun 2011) | 7 lines Add a test to the event unit tests to catch ASTERISK-18002. The new tests check to see if there are ANY subscribers to the event type when ast_event_check_subscriber() is not passed any specific ie values. (issue ASTERISK-18002) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-10Merged revisions 322923 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r322923 | twilson | 2011-06-09 19:33:23 -0700 (Thu, 09 Jun 2011) | 2 lines Add some astdb unit tests ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03Merged revisions 321871 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321871 | rmudgett | 2011-06-03 15:58:13 -0500 (Fri, 03 Jun 2011) | 27 lines Event subscription fixes. Must commit the subscription fixes together with the integration subscription tests. The subscription fixes cause an erroneously passing test to fail. The new subscription tests detect errors without the subscription fixes. * Added missing event_names[] table entry. * Reworked ast_event_check_subscriber()/match_sub_ie_val_to_event() to correctly detect if a subscriber exists for the proposed event. * Made match_ie_val() and match_sub_ie_val_to_event() check the buffer length for RAW payload types. * Fixed error handling memory leak in ast_event_sub_activate(), ast_event_unsubscribe(), and ast_event_queue(). * Made ast_event_new() and ast_event_check_subscriber() better protect themselves from an invalid payload type. * Added container lock protection between removing old cache events and adding the new cached event in ast_event_queue_and_cache()/event_update_cache(). * Added new event subscription tests. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03Fix some astobj2 iterator breakage, add another unit test.Russell Bryant
Review: https://reviewboard.asterisk.org/r/1254/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04Fix compiler warning.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24According to section 19.1.2 of RFC 3261:Matthew Nicholson
For each component, the set of valid BNF expansions defines exactly which characters may appear unescaped. All other characters MUST be escaped. This patch modifies ast_uri_encode() to encode strings in line with this recommendation. This patch also adds an ast_escape_quoted() function which escapes '"' and '\' characters in quoted strings in accordance with section 25.1 of RFC 3261. The ast_uri_encode() function has also been modified to take an ast_flags struct describing the set of rules it should use when escaping characters to allow for it to escape SIP URIs in addition to HTTP URIs and other types of URIs or variations of those two URI types in the future. The ast_uri_decode() function has also been modified to accept an ast_flags struct describing the set of rules to use when decoding to enable decoding '+' as ' ' in legacy http URLs. The unit tests for these functions have also been updated. ABE-2705 Review: https://reviewboard.asterisk.org/r/1081/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20Some scheduler API cleanup and improvements.Russell Bryant
Previously, I had added the ast_sched_thread stuff that was a generic scheduler thread implementation. However, if you used it, it required using different functions for modifying scheduler contents. This patch reworks how this is done and just allows you to optionally start a thread on the original scheduler context structure that has always been there. This makes it trivial to switch to the generic scheduler thread implementation without having to touch any of the other code that adds or removes scheduler entries. In passing, I made some naming tweaks to add ast_ prefixes where they were not there before. Review: https://reviewboard.asterisk.org/r/1007/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-15Merged revisions 295078 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r295078 | tilghman | 2010-11-15 12:30:13 -0600 (Mon, 15 Nov 2010) | 16 lines Merged revisions 295062 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r295062 | tilghman | 2010-11-15 12:24:02 -0600 (Mon, 15 Nov 2010) | 9 lines Merged revisions 295026 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r295026 | tilghman | 2010-11-15 11:58:37 -0600 (Mon, 15 Nov 2010) | 2 lines Create test verifying results of expression parser ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-22Merged revisions 292741 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r292741 | mmichelson | 2010-10-22 12:09:52 -0500 (Fri, 22 Oct 2010) | 12 lines Prevent multiple runs of event_sub_test from producing false failure results. The array of test subscriptions was declared "static," meaning that the data.count field would retain its value between runs of the test. After the first test run, this would result in false reports of test failures. I chose to just remove the "static" keyword from the structure since it's not a huge deal to construct this structure during each run of the test. Another alternative would have been to zero out the data.count fields of each test subscription instead. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-30Merged revisions 289543,289581 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r289543 | tilghman | 2010-09-30 12:50:52 -0500 (Thu, 30 Sep 2010) | 2 lines More Solaris compatibility fixes ........ r289581 | tilghman | 2010-09-30 15:23:10 -0500 (Thu, 30 Sep 2010) | 2 lines Solaris fixes. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-28Merged revisions 289104 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r289104 | tilghman | 2010-09-28 13:18:43 -0500 (Tue, 28 Sep 2010) | 4 lines Solaris compatibility fixes Review: https://reviewboard.asterisk.org/r/942/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10Merged revisions 285931 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r285931 | tilghman | 2010-09-09 20:25:50 -0500 (Thu, 09 Sep 2010) | 21 lines Merged revisions 285930 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r285930 | tilghman | 2010-09-09 20:16:32 -0500 (Thu, 09 Sep 2010) | 14 lines Merged revisions 285889 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r285889 | tilghman | 2010-09-09 19:13:45 -0500 (Thu, 09 Sep 2010) | 7 lines Fix Mac OS X build. This also fixes a rather grievous calculation error for the offset of ast_fdset, which was masked on Linux and FreeBSD, because these platforms check the first 256 FDs regardless of the bitmask setting (due to backwards compatibility). ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02Merged revisions 284597 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r284597 | tilghman | 2010-09-02 00:00:34 -0500 (Thu, 02 Sep 2010) | 29 lines Merged revisions 284593,284595 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines Merged revisions 284478 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows. This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing a potential crash bug in all supported releases. (closes issue #17678) Reported by: russell Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select Review: https://reviewboard.asterisk.org/r/824/ ........ ................ r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines Failed to rerun bootstrap.sh after last commit ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-29Merged revisions 280446 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r280446 | pabelanger | 2010-07-29 14:37:32 -0400 (Thu, 29 Jul 2010) | 2 lines Remove res_crypto dependency. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@280447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-29Merged revisions 280414 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r280414 | pabelanger | 2010-07-29 12:44:22 -0400 (Thu, 29 Jul 2010) | 2 lines crypto_loaded_test depends on res_crypto, else test will fail. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@280415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-25Merged revisions 279442 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r279442 | pabelanger | 2010-07-25 17:26:42 -0400 (Sun, 25 Jul 2010) | 2 lines Add trailing backslash to silence warning message. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-21make func_file unit test's category consistent with other testsDavid Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19Remove the fe80:1234::1234 test case from test_acl.cMark Michelson
The ACL test was failing on Mac OS X because it would convert the above invalid link-local address into fe80::1234 while reporting no error from getaddrinfo(). Linux does not do this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19Make ACLs IPv6-capable.Mark Michelson
ACLs can now be configured to match IPv6 networks. This is only relevant for ACLs in chan_sip for now since other channel drivers do not support IPv6 addressing. However, once those channel drivers are outfitted to support IPv6 addressing, the ACLs will already be ready for IPv6 support. https://reviewboard.asterisk.org/r/791 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16updated devicestate test for device state changesMatthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16Fix trunk build for Mac OS X 10.6Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14Remove the old stub files, preferring the optional_api method.Tilghman Lesher
(closes issue #17475) Reported by: tilghman Review: https://reviewboard.asterisk.org/r/695/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14ast_callerid restructuringRichard Mudgett
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3