Commit Graph

23236 Commits

Author SHA1 Message Date
Automerge script 57d2e81d78 Merged revisions 377915 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r377915 | elguero | 2012-12-11 22:43:18 -0600 (Tue, 11 Dec 2012) | 17 lines
  
  Convert Dynamic Features Buffer To Use ast_str
  
  Currently, the buffer for the dynamic features list is set to a fixed size of
  128.  If the list is bigger than that, it results in the dynamic feature(s) not
  being recognized.
  
  This patch changes the buffer from a fixed size to a dynamic one.
  
  (closes issue ASTERISK-20680)
  Reported by: Clod Patry
  Tested by: Michael L. Young
  Patches: 
      asterisk-20680-dynamic-features-v2.diff 
                                       uploaded by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2221/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-12 05:17:36 +00:00
Automerge script 7a7f9cba43 Merged revisions 377911 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377911 | mmichelson | 2012-12-11 18:02:31 -0600 (Tue, 11 Dec 2012) | 22 lines
  
  Fix a potential deadlock in chan_sip during transfers.
  
  The issue comes from the fact that transfers may perform
  a redirecting update on a channel. The issue is that lock
  inversion between the channel and its tech_pvt occurs since
  the channel lock is released during the transfer process.
  
  The fix is to move when the redirecting update occurs to a
  place where neither the tech_pvt or the channel is locked so
  that the two can be locked in the proper order.
  
  (closes issue ASTERISK-20708)
  reported by Mark Michelson
  patches:
  	ASTERISK-20708-3.patch uploaded by Mark Michelson (License #5049)
  
  Tested by:
  	Tim Ringenbach at Asteria Solutions Group
  ........
  
  Merged revisions 377910 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-12 00:17:36 +00:00
Automerge script 686cdd0e79 Merged revisions 377906 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r377906 | mmichelson | 2012-12-11 16:42:11 -0600 (Tue, 11 Dec 2012) | 3 lines
  
  Add test events necessary for bridging tests to be able to properly run.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 23:17:37 +00:00
Mark Michelson 817a78075a Reset automerge property.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 22:25:21 +00:00
Automerge script ece052a45b automerge cancel
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 22:18:11 +00:00
Mark Michelson f5e9cf5975 Add automerge property back after conflict.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 21:52:09 +00:00
Automerge script 603bf5301f automerge cancel
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 21:19:46 +00:00
Automerge script 090b9e09f7 Merged revisions 377809 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377809 | rmudgett | 2012-12-11 14:05:32 -0600 (Tue, 11 Dec 2012) | 23 lines
  
  Cleanup pbx on exit.
  
  * Cleanup CLI commands on exit.
  
  * Unreference hints and statecbs containers on exit.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        pbx-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
        pbx-cleanup-10.patch (license #5909) patch uploaded by Corey Farrell
        pbx-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........
  
  Merged revisions 377806 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377807 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377808 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 20:20:16 +00:00
Mark Michelson 7995bc63c7 Some general cleanup, plus we now send state changes when threads activate.
This is now ready for review board, imo!



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 16:53:16 +00:00
Mark Michelson 2abda64003 Add threadpool option version check into threadpool creation routine.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 16:36:08 +00:00
Mark Michelson 8760e32ae3 Add auto-increment option and accompanying test.
This allows for the threadpool to automatically grow if tasks
are pushed to it and no idle threads are currently available.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 16:34:00 +00:00
Mark Michelson 29fc122783 Some documentation fixes and function call name fixes.
The documentation for taskprocessors was incorrect with
regards to when a listener's alloc callback was called.

I also made the names of queued function calls in the
threadpool more uniform.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 04:23:31 +00:00
Automerge script 605dcfad97 Merged revisions 377774 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377774 | rmudgett | 2012-12-10 20:44:53 -0600 (Mon, 10 Dec 2012) | 19 lines
  
  Cleanup logger on exit.
  
  * Cleanup CLI commands, destroy verbosers and logchannels lists on exit.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        logger-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........
  
  Merged revisions 377771 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377772 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377773 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 03:19:39 +00:00
Automerge script 4abf332cf0 Merged revisions 377743 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377743 | rmudgett | 2012-12-10 20:13:37 -0600 (Mon, 10 Dec 2012) | 25 lines
  
  Cleanup indications on exit.
  
  * Made ast_unregister_indication_country() unlink the found tone zone
  before selecting a new default_tone_zone to make it impossible to select
  the tone zone being unregistered again.
  
  * Ringcadence is no longer parsed twice in store_config_tone_zone().
  
  * Cleanup CLI commands and destroy default_tone_zone on exit.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        indications-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........
  
  Merged revisions 377740 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377741 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377742 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 02:19:39 +00:00
Automerge script 56a9f5b6cb Merged revisions 377707,377711 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377707 | rmudgett | 2012-12-10 18:37:01 -0600 (Mon, 10 Dec 2012) | 20 lines
  
  Cleanup dnsmgr on exit.
  
  * Cleanup dnsmgr thread and CLI commands on exit.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        dnsmgr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
        dnsmgr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........
  
  Merged revisions 377704 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377705 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377706 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377711 | rmudgett | 2012-12-10 19:04:50 -0600 (Mon, 10 Dec 2012) | 19 lines
  
  Cleanup event on exit.
  
  * Cleanup CLI commands on exit.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        event_shutdown-10-only.patch (license #5909) patch uploaded by Corey Farrell
        event_shutdown-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
  ........
  
  Merged revisions 377708 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377709 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377710 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 01:19:39 +00:00
Mark Michelson 1310e659bd Solve the issue about the "CHANGE THIS" and "XXX CHANGE THIS XXX" taskprocessor names.
Unfortunately, this required a taskprocessor listener change that makes listener allocation
utterly silly. I'm going to change the scheme so that allocation of taskprocessor listeners
is done internally within taskprocessor code. This will make it parallel with threadpool
code, which is a good thing.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 20:14:23 +00:00
Mark Michelson 90d76a5026 Make thread state waiting a little less ugly and not possible to lock up.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 19:32:50 +00:00
Automerge script 66c60e5523 Merged revisions 377658 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377658 | kmoore | 2012-12-10 10:56:37 -0600 (Mon, 10 Dec 2012) | 20 lines
  
  Ensure ReceiveFax provides a CED tone via T.38
  
  When using res_fax_digium, the T.38 CED tone was not being provided
  properly which would cause some incoming faxes to fail. This was not an
  issue with res_fax_spandsp since it does not strictly honor the
  send_ced flag and sends the CED tone whenever receiving a T.38 fax.
  
  (closes issue FAX-343)
  Reported-by: Benjamin Tietz
  Patch-by: Kinsey Moore
  ........
  
  Merged revisions 377655 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377656 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377657 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 17:19:37 +00:00
Mark Michelson 957cb0742b Improve timedwaits in tests to actually behave like they should.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 15:55:56 +00:00
Automerge script 81afbcca2c Merged revisions 377626 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377626 | kmoore | 2012-12-10 08:45:52 -0600 (Mon, 10 Dec 2012) | 20 lines
  
  Handle Session-Expires less than local Min-SE in 200 OK
  
  Ensure that a call is immediately torn down if a Session-Expires value
  received in a 200 OK is less than the local Min-SE. This also prevents
  Asterisk from allowing calls with Session-Expires below the
  RFC4028-mandated minimum (90s).
  
  (closes issue ASTERISK-20653)
  Review: https://reviewboard.asterisk.org/r/2237/
  Patch-by: Kinsey Moore
  ........
  
  Merged revisions 377623 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377624 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377625 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 15:21:05 +00:00
Automerge script 58f0ade4db Merged revisions 377594-377595 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377594 | igorg | 2012-12-10 00:56:04 -0600 (Mon, 10 Dec 2012) | 15 lines
  
  Fix codec mismatch
  
  Fix code to send in both rx and tx open stream messages correct codecs. Found that on phase 0/1 phones wrong codecs cause to no audio in some situations. 
  
  (issue ASTERISK-20183)
  ........
  
  Merged revisions 377591 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377592 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377593 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377595 | igorg | 2012-12-10 01:03:48 -0600 (Mon, 10 Dec 2012) | 3 lines
  
  Add firmware information to CLI devices listing
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 07:19:34 +00:00
Automerge script db0e7049ac Merged revisions 377579 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377579 | igorg | 2012-12-09 23:29:04 -0600 (Sun, 09 Dec 2012) | 7 lines
  
  Remove trailing whitespaces in number from incoming redial list. 
  
  Reported by: Igor Olhovskiy
  ........
  
  Merged revisions 377577 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 06:19:08 +00:00
Mark Michelson 64deed062a Add threadpool options and accompanying test.
The only test added so far is an idle thread timeout
option. This will greatly aid threadpool users who wish
to maintain a threadpool by allowing for idle threads to
die out as necessary.

Test passes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 06:13:09 +00:00
Mark Michelson 5dd22df050 Improve shutdown procedure.
This helps tests to pass more often than before.
They are far less likely to queue extra processes
into the control taskprocessor since they are prevented
once the threadpool begins to shut down.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 05:25:38 +00:00
Mark Michelson 03d617040a Add safeguards to ensure we don't improperly access a destroyed taskprocessor.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 04:08:29 +00:00
Automerge script 955307ef9f Merged revisions 377506,377512 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377506 | tilghman | 2012-12-09 19:29:32 -0600 (Sun, 09 Dec 2012) | 11 lines
  
  Remove some dead code and additionally handle a case that wasn't handled.
  ........
  
  Merged revisions 377487 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377504 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377505 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377512 | tilghman | 2012-12-09 19:41:50 -0600 (Sun, 09 Dec 2012) | 22 lines
  
  Improve documentation by making all of the colors used readable,
  no matter what the background color is.
  
  Dark blue on a black background is unreadable, as is yellow on a
  light background.  This patch turns on the bright attribute for
  colors when on a dark background and turns *off* the bright
  attribute when the -W command line option is used (indicating a
  _light_ background).  This ensures that text is readable in both
  cases.
  
  Patch by: tilghman
  Review: https://reviewboard.asterisk.org/r/2224
  ........
  
  Merged revisions 377509 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377510 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377511 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 02:20:30 +00:00
Mark Michelson 7be7baba30 Remove unnecessary debugging and add some useful debugging.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09 19:10:14 +00:00
Mark Michelson b6a73bb451 Add some useful debugging in threadpool test failure conditions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09 19:06:35 +00:00
Mark Michelson 293b18ecce Create longer thread destruction test.
This one involves shrinking the threadpool in such
a way that both idle and active threads are affected.

This test made me re-realize why the zombie state exists,
so I re-added it. We don't want to clog up the control
taskprocessor by waiting on active threads to complete
what they are doing. Instead, we mark them as zombies so
that when they are done, they can clean themselves up
properly.

Without the zombie state available, the new test actually
will deadlock.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09 18:56:25 +00:00
Automerge script 75559a4c42 Merged revisions 377463 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377463 | file | 2012-12-08 19:23:44 -0600 (Sat, 08 Dec 2012) | 9 lines
  
  Add missing support for "who hung up" to chan_motif.
  
  (closes issue ASTERISK-20671)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2208/
  ........
  
  Merged revisions 377462 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09 02:20:13 +00:00
Automerge script 0f7943c48a Merged revisions 377434 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377434 | rmudgett | 2012-12-07 18:30:40 -0600 (Fri, 07 Dec 2012) | 20 lines
  
  Fix order of SIP allow/disallow in MySQL contrib script.
  
  Using the contrib sippeers.sql script to create the sippeers MySQL table
  would result in being unable to place calls if you set the disallow value
  to all.
  
  (closes issue ASTERISK-20756)
  Reported by: Andre Luis
  Patches:
        sippeers.patch patch uploaded by Andre Luis
  ........
  
  Merged revisions 377431 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377432 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377433 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-08 01:19:36 +00:00
Mark Michelson 4deecdef72 Add a task distribution test.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-08 00:22:33 +00:00
Automerge script c75b8c5283 Merged revisions 377402 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377402 | rmudgett | 2012-12-07 17:45:15 -0600 (Fri, 07 Dec 2012) | 11 lines
  
  MALLOC_DEBUG: Only wait if we want atexit allocation dumps.
  ........
  
  Merged revisions 377398 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377399 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377401 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-08 00:19:39 +00:00
Mark Michelson b353c80dc0 Add threadpool reactivation test.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 23:42:42 +00:00
Mark Michelson afdbd80bc3 Add a single-thread multi-task test.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 22:35:11 +00:00
Automerge script 5f0a98bb0e Merged revisions 377384 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377384 | kmoore | 2012-12-07 16:08:48 -0600 (Fri, 07 Dec 2012) | 23 lines
  
  codec_dahdi: Fix output of "transcoder show" CLI command.
  
  In r306010 "Asterisk media architecture conversion - no more format
  bitfields", the logic for incrementing encoders and decoders when
  opening transcoder channels was changed without making the corresponding
  change when decrementing encoder / decoder channels.  The result being
  that when a channel was destroyed, codec_dahdi couldn't properly tell if
  it was an encoder or decoder, and the default case is to assume it was a
  decoder.
  
  This could result in negative numbers for decoders in use like in:
    VOIP6*CLI> transcoder show
    2/-2 encoders/decoders of 92 channels are in use.
  
  (closes issue ASTERISK-19921)
  Patch-by: Shaun Ruffell
  ........
  
  Merged revisions 377382 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377383 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 22:20:16 +00:00
Mark Michelson b8f35bb197 Remove unsafe write of listener member.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 21:53:18 +00:00
Mark Michelson d9f4952b8a Add test where we create a thread and push a task.
Passes!



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 19:50:38 +00:00
Mark Michelson 2dc89eb485 Add test where we add a task then create a thread for it.
It passes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 19:34:11 +00:00
Mark Michelson f275c11e78 Add threadpool destruction test.
It worked on the first try. Fun time.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 19:16:28 +00:00
Mark Michelson 3a25935f7d Fix infinite looping and crash problem.
MALLOC_DEBUG is complaining about corrupted memory on taskprocessor
listeners, but I'm not seeing it, nor is valgrind. Not sure what's up
there.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 19:05:30 +00:00
Mark Michelson ec29862a92 Fix up categories of threadpool tests.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 01:03:49 +00:00
Mark Michelson 4590bfd93d Add new threadpool test and fix some taskprocessor bugs.
The new thread creation test fails because Asterisk locks up
while trying to lock a taskprocessor.

While trying to debug that, I found a race condition during taskprocessor
creation where a default taskprocessor listener could try to operate on
a partially started taskprocessor. This was fixed by adding a new callback
to taskprocessor listeners.

Then while testing that change, I found some bugs in the taskprocessor
tests where I was not properly unlocking when done with a lock. Scoped
locks have spoiled me a bit.

I still have not figured out why the threadpool thread creation test
is locking up.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 00:30:35 +00:00
Automerge script 62981d2032 Merged revisions 377356 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377356 | rmudgett | 2012-12-06 18:00:39 -0600 (Thu, 06 Dec 2012) | 30 lines
  
  confbridge: Fix some resource leaks on conference teardown.
  
  * Made destroy_conference_bridge() destroy a missed ast_mutex_t and ast_cond_t.
  
  * Made join_conference_bridge() init the ast_mutex_t's and ast_cond_t so
  destroy_conference_bridge() can destroy them unconditionally.
  
  * Made join_conference_bridge() abort if the new conference could not be
  added to the conferences container.
  
  * Made leave_conference() discard any post-join actions if
  join_conference_bridge() had to abort early.
  
  * Made the join_conference_bridge() diagnostic messages better describe
  what happened.
  
  * Renamed leave_conference_bridge() to leave_conference() and made it only
  take a conference user pointer.  The conference pointer was redundant.
  
  * Made conf_bridge_profile_copy() use struct copy instead of memcpy().
  
  * No need to lock the conference in start_conf_record_thread() since all
  of the callers already have it locked.
  ........
  
  Merged revisions 377354 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377355 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 00:19:29 +00:00
Mark Michelson 9445402925 It helps if we actually assign the listener to the pool.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 20:45:42 +00:00
Mark Michelson c32634e0dd Add initial simple threadpool test.
This one simply pushes a task into the threadpool and ensures
that the listener gets the callbacks expected.

It currently crashes, so I need to figure out what's wrong.



git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 20:25:17 +00:00
Automerge script c81367bd9f Merged revisions 377341 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377341 | russell | 2012-12-06 11:29:13 -0600 (Thu, 06 Dec 2012) | 10 lines
  
  Recorded merge of revisions 377340 from http://svn.asterisk.org/svn/asterisk/branches/11
  
  ........
  Add CLI tab completion to 'acl show'.
  
  The 'acl show' CLI command allows you to show the details about a specific
  named ACL in acl.conf.  This patch adds tab completion to the command.
  
  Review: https://reviewboard.asterisk.org/r/2230/
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 18:19:22 +00:00
Automerge script 95b571b390 Merged revisions 377324,377329-377330 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377324 | mjordan | 2012-12-06 08:26:13 -0600 (Thu, 06 Dec 2012) | 13 lines
  
  Fix memory leak in 'manager show event' when command entered incorrectly
  
  When the CLI command 'manager show event' was run incorrectly and its usage
  instructions returned, a reference to the event container was leaked. This
  would prevent the container from being reclaimed when Asterisk exits. We now
  properly decrement the count on the ao2 object using the nifty RAII_VAR macro.
  
  Thanks to Russell for helping me stumble on this, and Terry for writing that
  ridiculously helpful macro.
  ........
  
  Merged revisions 377319 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377329 | russell | 2012-12-06 09:06:47 -0600 (Thu, 06 Dec 2012) | 7 lines
  
  Add CLI tab completion to 'acl show'.
  
  The 'acl show' CLI command allows you to show the details about a specific
  named ACL in acl.conf.  This patch adds tab completion to the command.
  
  Review: https://reviewboard.asterisk.org/r/2230/
................
  r377330 | russell | 2012-12-06 09:13:37 -0600 (Thu, 06 Dec 2012) | 6 lines
  
  Minor code cleanup in named_acl.c.
  
  This patch makes a few little cleanups to named_acl.c.  A couple non-public
  functions were made static and an opening brace for a function was moved to
  its own line, per the coding guidelines.
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06 15:19:58 +00:00
Automerge script 7a203dc72c Merged revisions 377260,377263 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377260 | file | 2012-12-05 10:51:58 -0600 (Wed, 05 Dec 2012) | 25 lines
  
  Fix a SIP request memory leak with TLS connections.
  
  During the TLS re-work in chan_sip some TLS specific code was moved
  into a separate function. This function operates on a copy of the
  incoming SIP request. This copy was never deinitialized causing a
  memory leak for each request processed.
  
  This function is now given a SIP request structure which it can use
  to copy the incoming request into. This reduces the amount of memory
  allocations done since the internal allocated components are reused
  between packets and also ensures the SIP request structure is
  deinitialized when the TLS connection is torn down.
  
  (closes issue ASTERISK-20763)
  Reported by: deti
  ........
  
  Merged revisions 377257 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377258 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377259 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377263 | jrose | 2012-12-05 11:17:06 -0600 (Wed, 05 Dec 2012) | 21 lines
  
  res_srtp: Fix a crash caused by srtp_dealloc on an already dealloced session
  
  When srtp_create fails, the session may be dealloced or just not alloced. At
  the same time though, the session pointer might not be set to NULL in this
  process and attempting to srtp_dealloc it again will cause a segfault. This
  patch checks for failure of srtp_create and sets the session pointer to NULL
  if it fails.
  
  (closes issue ASTERISK-20499)
  Reported by: tootai
  Review: https://reviewboard.asterisk.org/r/2228/
  ........
  
  Merged revisions 377256 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377261 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377262 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 17:20:37 +00:00
Automerge script 521f9e8dfe Merged revisions 377245-377246 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377245 | rmudgett | 2012-12-04 20:20:57 -0600 (Tue, 04 Dec 2012) | 8 lines
  
  Fix registering core show codecs/codec CLI commands twice.
  ........
  
  Merged revisions 377241 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377244 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377246 | rmudgett | 2012-12-04 20:23:10 -0600 (Tue, 04 Dec 2012) | 1 line
  
  Remove init_framer(). It no longer does anything.
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 03:19:08 +00:00