dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

13 Commits

Author SHA1 Message Date
lmadsen e73cab2f3f Merged revisions 328247 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-07-14 20:28:54 +00:00
mnicholson 9dd80bbb53 According to section 19.1.2 of RFC 3261:
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: http://svn.digium.com/svn/asterisk/trunk@303509 f38db490-d61c-443f-a65b-d21fe96a405b
2011-01-24 18:59:22 +00:00
tilghman d0607f4d52 Merged revisions 289543,289581 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@289588 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-30 20:40:08 +00:00
tilghman fbff1f9490 Merged revisions 289104 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@289112 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-28 18:20:20 +00:00
pabelanger 178157252e Merged revisions 280446 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@280447 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-29 18:51:39 +00:00
pabelanger 469e9a62b5 Merged revisions 280414 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@280415 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-29 16:45:34 +00:00
tilghman 34a5c533f3 Fix trunk build for Mac OS X 10.6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276870 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16 04:23:02 +00:00
tilghman 943f6b879d Remove the old stub files, preferring the optional_api method.
(closes issue #17475)
 Reported by: tilghman
 
Review: https://reviewboard.asterisk.org/r/695/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276490 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14 20:48:59 +00:00
tilghman cc07f75cb0 Kill some startup warnings and errors and make some messages more helpful in tracking down the source.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275105 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09 17:00:22 +00:00
dvossel 87fa537a28 base64 unit test
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250235 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02 23:38:29 +00:00
russell d8d63de328 Various updates to the unit test API.
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: http://svn.digium.com/svn/asterisk/trunk@245864 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09 23:32:14 +00:00
russell 27e20347a1 UNREGISTER instead of REGISTER in unload_module().
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245623 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-08 23:34:01 +00:00
dvossel 1bc7ad599c RFC compliant uri and display-name encode/decode
1.  URI Encoding
This patch changes ast_uri_encode()'s behavior when doreserved is enabled.
Previously when doreserved was enabled only a small set of reserved
characters were encoded.  This set was comprised primarily of the reserved
characters defined in RFC3261 section 25.1, but contained other characters as
well.  Rather than only escaping the reserved set, doreserved now escapes
all characters not within the unreserved set as defined by RFC 3261 and
RFC 2396.  Also, the 'doreserved' variable has been renamed to 'do_special_char'
in attempts to avoid confusion.

When doreserve is not enabled, the previous logic of only encoding the
characters <= 0X1F and > 0X7f remains, except for the '%' character, which
must always be encoded as it signifies a HEX escaped character during the decode
process.

2. URI Decoding: Break up URI before decode.
In chan_sip.c ast_uri_decode is called on the entire URI instead of it's
individual parts after it is parsed.  This is not good as ast_uri_decode
can introduce special characters back into the URI which can mess up parsing.
This patch resolves this by not decoding a URI until parsing is completely
done.  There are many instances where we check to see if pedantic checking
is enabled before we decode a URI.  In these cases a new macro,
SIP_PEDANTIC_DECODE, is used on the individual parsed segments of the URI
rather than constantly putting if (pedantic) { decode() } checks everywhere
in the code.  In the areas where ast_uri_decode is not dependent upon
pedantic checking this macro is not used, but decoding is still moved to
each individual part of the URI.  The only behavior that should change from
this patch is the time at which decoding occurs.

Since I had to look over every place URI parsing occurs to create this
patch, I found several places where we use duplicate code for parsing.
To consolidate the code, those areas have updated to use the parse_uri()
function where possible.

3. SIP display-name decoding according to RFC3261 section 25.
To properly decode the display-name portion of a FROM header, chan_sip's
get_calleridname() function required a complete re-write.  More information
about this change can be found in the comments at the beginning of this function.

4. Unit Tests.
Unit tests for ast_uri_encode, ast_uri_decode, and get_calleridname() have been
written.  This involved the addition of the test_utils.c file for testing the
utils api.

(closes issue #16299)
Reported by: wdoekes
Patches:
      astsvn-16299-get_calleridname.diff uploaded by wdoekes (license 717)
      get_calleridname_rewrite.diff uploaded by dvossel (license 671)
Tested by: wdoekes, dvossel, Nick_Lewis

Review: https://reviewboard.asterisk.org/r/469/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@243200 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-26 16:30:08 +00:00