asterisk/asterisk.git
7 years agoMerged revisions 377966 via svnmerge from
Automerge script [Thu, 13 Dec 2012 15:17:41 +0000 (15:17 +0000)]
Merged revisions 377966 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377966 | kmoore | 2012-12-13 08:28:57 -0600 (Thu, 13 Dec 2012) | 23 lines

  Ensure Min-SE is included in outbound INVITEs

  Asterisk now includes Min-SE in outbound INVITEs when the value is not
  90 (the default) and session timers are not disabled. This has the
  effect of Asterisk following RFC4028 more closely with regard to 422
  responses and preventing situations in which Asterisk would be forced
  to temporarily accept a call to tear it down based on a Session-Expires
  below the locally configured Min-SE.

  (issue SWP-5051)
  Review: https://reviewboard.asterisk.org/r/2222/
  Reported-by: Kinsey Moore
  Patch-by: Kinsey Moore
  ........

  Merged revisions 377946 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377947 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377948 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377968 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377925 via svnmerge from
Automerge script [Wed, 12 Dec 2012 23:18:09 +0000 (23:18 +0000)]
Merged revisions 377925 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377925 | newtonr | 2012-12-12 16:43:40 -0600 (Wed, 12 Dec 2012) | 18 lines

  Incremented EXTRA_SOUNDS_VERSION in sounds/Makefile to 1.4.12 for new Extra Sounds releases

  See CHANGES-* files in English extra 1.4.12 tarballs for new sound prompts added.

  (closes ASTERISK-20328)
  Reported by: Matt Jordan
  (closes AST-755)
  Reported by: John Bigelow
  ........

  Merged revisions 377922 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377923 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377924 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377928 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377915 via svnmerge from
Automerge script [Wed, 12 Dec 2012 05:17:36 +0000 (05:17 +0000)]
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

7 years agoMerged revisions 377911 via svnmerge from
Automerge script [Wed, 12 Dec 2012 00:17:36 +0000 (00:17 +0000)]
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

7 years agoMerged revisions 377906 via svnmerge from
Automerge script [Tue, 11 Dec 2012 23:17:37 +0000 (23:17 +0000)]
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

7 years agoReset automerge property.
Mark Michelson [Tue, 11 Dec 2012 22:25:21 +0000 (22:25 +0000)]
Reset automerge property.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377903 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoautomerge cancel
Automerge script [Tue, 11 Dec 2012 22:18:11 +0000 (22:18 +0000)]
automerge cancel

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377887 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd automerge property back after conflict.
Mark Michelson [Tue, 11 Dec 2012 21:52:09 +0000 (21:52 +0000)]
Add automerge property back after conflict.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377879 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoautomerge cancel
Automerge script [Tue, 11 Dec 2012 21:19:46 +0000 (21:19 +0000)]
automerge cancel

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377856 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377809 via svnmerge from
Automerge script [Tue, 11 Dec 2012 20:20:16 +0000 (20:20 +0000)]
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

7 years agoSome general cleanup, plus we now send state changes when threads activate.
Mark Michelson [Tue, 11 Dec 2012 16:53:16 +0000 (16:53 +0000)]
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

7 years agoAdd threadpool option version check into threadpool creation routine.
Mark Michelson [Tue, 11 Dec 2012 16:36:08 +0000 (16:36 +0000)]
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

7 years agoAdd auto-increment option and accompanying test.
Mark Michelson [Tue, 11 Dec 2012 16:34:00 +0000 (16:34 +0000)]
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

7 years agoSome documentation fixes and function call name fixes.
Mark Michelson [Tue, 11 Dec 2012 04:23:31 +0000 (04:23 +0000)]
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

7 years agoMerged revisions 377774 via svnmerge from
Automerge script [Tue, 11 Dec 2012 03:19:39 +0000 (03:19 +0000)]
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

7 years agoMerged revisions 377743 via svnmerge from
Automerge script [Tue, 11 Dec 2012 02:19:39 +0000 (02:19 +0000)]
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

7 years agoMerged revisions 377707,377711 via svnmerge from
Automerge script [Tue, 11 Dec 2012 01:19:39 +0000 (01:19 +0000)]
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

7 years agoSolve the issue about the "CHANGE THIS" and "XXX CHANGE THIS XXX" taskprocessor names.
Mark Michelson [Mon, 10 Dec 2012 20:14:23 +0000 (20:14 +0000)]
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

7 years agoMake thread state waiting a little less ugly and not possible to lock up.
Mark Michelson [Mon, 10 Dec 2012 19:32:50 +0000 (19:32 +0000)]
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

7 years agoMerged revisions 377658 via svnmerge from
Automerge script [Mon, 10 Dec 2012 17:19:37 +0000 (17:19 +0000)]
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

7 years agoImprove timedwaits in tests to actually behave like they should.
Mark Michelson [Mon, 10 Dec 2012 15:55:56 +0000 (15:55 +0000)]
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

7 years agoMerged revisions 377626 via svnmerge from
Automerge script [Mon, 10 Dec 2012 15:21:05 +0000 (15:21 +0000)]
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

7 years agoMerged revisions 377594-377595 via svnmerge from
Automerge script [Mon, 10 Dec 2012 07:19:34 +0000 (07:19 +0000)]
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

7 years agoMerged revisions 377579 via svnmerge from
Automerge script [Mon, 10 Dec 2012 06:19:08 +0000 (06:19 +0000)]
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

7 years agoAdd threadpool options and accompanying test.
Mark Michelson [Mon, 10 Dec 2012 06:13:09 +0000 (06:13 +0000)]
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

7 years agoImprove shutdown procedure.
Mark Michelson [Mon, 10 Dec 2012 05:25:38 +0000 (05:25 +0000)]
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

7 years agoAdd safeguards to ensure we don't improperly access a destroyed taskprocessor.
Mark Michelson [Mon, 10 Dec 2012 04:08:29 +0000 (04:08 +0000)]
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

7 years agoMerged revisions 377506,377512 via svnmerge from
Automerge script [Mon, 10 Dec 2012 02:20:30 +0000 (02:20 +0000)]
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

7 years agoRemove unnecessary debugging and add some useful debugging.
Mark Michelson [Sun, 9 Dec 2012 19:10:14 +0000 (19:10 +0000)]
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

7 years agoAdd some useful debugging in threadpool test failure conditions.
Mark Michelson [Sun, 9 Dec 2012 19:06:35 +0000 (19:06 +0000)]
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

7 years agoCreate longer thread destruction test.
Mark Michelson [Sun, 9 Dec 2012 18:56:25 +0000 (18:56 +0000)]
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

7 years agoMerged revisions 377463 via svnmerge from
Automerge script [Sun, 9 Dec 2012 02:20:13 +0000 (02:20 +0000)]
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

7 years agoMerged revisions 377434 via svnmerge from
Automerge script [Sat, 8 Dec 2012 01:19:36 +0000 (01:19 +0000)]
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

7 years agoAdd a task distribution test.
Mark Michelson [Sat, 8 Dec 2012 00:22:33 +0000 (00:22 +0000)]
Add a task distribution test.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377418 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377402 via svnmerge from
Automerge script [Sat, 8 Dec 2012 00:19:39 +0000 (00:19 +0000)]
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

7 years agoAdd threadpool reactivation test.
Mark Michelson [Fri, 7 Dec 2012 23:42:42 +0000 (23:42 +0000)]
Add threadpool reactivation test.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377400 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd a single-thread multi-task test.
Mark Michelson [Fri, 7 Dec 2012 22:35:11 +0000 (22:35 +0000)]
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

7 years agoMerged revisions 377384 via svnmerge from
Automerge script [Fri, 7 Dec 2012 22:20:16 +0000 (22:20 +0000)]
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

7 years agoRemove unsafe write of listener member.
Mark Michelson [Fri, 7 Dec 2012 21:53:18 +0000 (21:53 +0000)]
Remove unsafe write of listener member.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd test where we create a thread and push a task.
Mark Michelson [Fri, 7 Dec 2012 19:50:38 +0000 (19:50 +0000)]
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

7 years agoAdd test where we add a task then create a thread for it.
Mark Michelson [Fri, 7 Dec 2012 19:34:11 +0000 (19:34 +0000)]
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

7 years agoAdd threadpool destruction test.
Mark Michelson [Fri, 7 Dec 2012 19:16:28 +0000 (19:16 +0000)]
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

7 years agoFix infinite looping and crash problem.
Mark Michelson [Fri, 7 Dec 2012 19:05:30 +0000 (19:05 +0000)]
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

7 years agoFix up categories of threadpool tests.
Mark Michelson [Fri, 7 Dec 2012 01:03:49 +0000 (01:03 +0000)]
Fix up categories of threadpool tests.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377369 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd new threadpool test and fix some taskprocessor bugs.
Mark Michelson [Fri, 7 Dec 2012 00:30:35 +0000 (00:30 +0000)]
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

7 years agoMerged revisions 377356 via svnmerge from
Automerge script [Fri, 7 Dec 2012 00:19:29 +0000 (00:19 +0000)]
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

7 years agoIt helps if we actually assign the listener to the pool.
Mark Michelson [Thu, 6 Dec 2012 20:45:42 +0000 (20:45 +0000)]
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

7 years agoAdd initial simple threadpool test.
Mark Michelson [Thu, 6 Dec 2012 20:25:17 +0000 (20:25 +0000)]
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

7 years agoMerged revisions 377341 via svnmerge from
Automerge script [Thu, 6 Dec 2012 18:19:22 +0000 (18:19 +0000)]
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

7 years agoMerged revisions 377324,377329-377330 via svnmerge from
Automerge script [Thu, 6 Dec 2012 15:19:58 +0000 (15:19 +0000)]
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

7 years agoMerged revisions 377260,377263 via svnmerge from
Automerge script [Wed, 5 Dec 2012 17:20:37 +0000 (17:20 +0000)]
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

7 years agoMerged revisions 377245-377246 via svnmerge from
Automerge script [Wed, 5 Dec 2012 03:19:08 +0000 (03:19 +0000)]
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

7 years agoMerged revisions 377229 via svnmerge from
Automerge script [Wed, 5 Dec 2012 01:19:26 +0000 (01:19 +0000)]
Merged revisions 377229 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377229 | rmudgett | 2012-12-04 19:11:26 -0600 (Tue, 04 Dec 2012) | 31 lines

  confbridge: Fix several small issues.

  * Made func_confbridge_helper() allow an empty value when setting options.
  You previously could not Set(CONFBRIDGE(user,pin)=) and clear the
  configured pin from the dialplan.

  * Made func_confbridge_helper() handle its datastore better if multiple
  threads attempt to set the first CONFBRIDGE option value on the channel.

  * Made the func_confbridge_helper() only output one diagnostic message
  concerning the option.

  * Made the bridge video_mode able to repeatedly change in the config file
  and CONFBRIDGE dialplan function.  The video_mode option values are an
  enum and not independent of each other.

  * Made handle_cli_confbridge_show_bridge_profile() better handle the
  video_mode option.

  * Simplified datastore handling code in conf_find_user_profile() and
  conf_find_bridge_profile().

  (closes issue ASTERISK-20655)
  Reported by: Birger "WIMPy" Harzenetter
  ........

  Merged revisions 377227 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377228 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377235 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd better listener support.
Mark Michelson [Tue, 4 Dec 2012 23:45:39 +0000 (23:45 +0000)]
Add better listener support.

Add some parameters to listener callbacks.
Add alloc and destroy callbacks for listeners.
Add public function for allocating a listener.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377226 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377214 via svnmerge from
Automerge script [Tue, 4 Dec 2012 23:19:30 +0000 (23:19 +0000)]
Merged revisions 377214 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377214 | rmudgett | 2012-12-04 16:34:05 -0600 (Tue, 04 Dec 2012) | 8 lines

  confbridge: Update online XML documentation.
  ........

  Merged revisions 377212 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377213 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377220 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove zombie state from threadpool altogether.
Mark Michelson [Tue, 4 Dec 2012 22:11:31 +0000 (22:11 +0000)]
Remove zombie state from threadpool altogether.

After giving it some consideration, there's no real
use for zombie threads. Listeners can't really use the
current number of zombie threads as a way of gauging activity,
zombifying threads is just an extra step before they die that
really serves no purpose, and since there's no way to re-animate
zombies, the operation does not need to be around.

I also fixed up some miscellaneous compilation errors that
were lingering from some past revisions.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377211 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoSimplify threadpool refcounting a bit.
Mark Michelson [Tue, 4 Dec 2012 21:21:15 +0000 (21:21 +0000)]
Simplify threadpool refcounting a bit.

Since threadpool shutdown is very strictly controlled,
there is no need to be so precise with reference counts
in queued operations. Since the threadpool shuts down its
own control taskprocessor before doing anything else destructive,
it can be guaranteed that all queued tasks will have a valid
pointer to the pool. This meant that some destructor functions
for helper structs could be removed entirely.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377210 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd some doxygen and rearrange code.
Mark Michelson [Tue, 4 Dec 2012 21:11:34 +0000 (21:11 +0000)]
Add some doxygen and rearrange code.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377209 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377196 via svnmerge from
Automerge script [Tue, 4 Dec 2012 13:20:08 +0000 (13:20 +0000)]
Merged revisions 377196 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377196 | russell | 2012-12-04 07:01:23 -0600 (Tue, 04 Dec 2012) | 7 lines

  Add libuuid to install_prereq for Fedora.

  I ran this script and my build failed.  pjproject requires this.
  ........

  Merged revisions 377195 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377201 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377168 via svnmerge from
Automerge script [Mon, 3 Dec 2012 23:19:30 +0000 (23:19 +0000)]
Merged revisions 377168 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377168 | rmudgett | 2012-12-03 17:00:08 -0600 (Mon, 03 Dec 2012) | 21 lines

  Cleanup ast_run_atexits() atexits list.

  * Convert atexits list to a mutex instead of a rd/wr lock.  The lock is
  only write locked.

  * Move CLI verbose Asterisk ending message to where AMI message is output
  in really_quit() to avoid further surprises about using stuff already
  shutdown.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  ........

  Merged revisions 377165 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377166 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377167 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377175 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377138 via svnmerge from
Automerge script [Mon, 3 Dec 2012 21:19:40 +0000 (21:19 +0000)]
Merged revisions 377138 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377138 | rmudgett | 2012-12-03 14:46:11 -0600 (Mon, 03 Dec 2012) | 23 lines

  Cleanup core main on exit.

  * Cleanup time zones on exit.

  * Make exit clean/unclean report consistent for AMI and CLI in
  really_quit().

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        core-cleanup-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
        core-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377135 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377136 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377137 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377145 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377107 via svnmerge from
Automerge script [Mon, 3 Dec 2012 20:19:34 +0000 (20:19 +0000)]
Merged revisions 377107 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377107 | rmudgett | 2012-12-03 13:33:06 -0600 (Mon, 03 Dec 2012) | 16 lines

  Cleanup config cache on exit.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        config-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
  ........

  Merged revisions 377104 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377105 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377106 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377114 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377072,377077 via svnmerge from
Automerge script [Mon, 3 Dec 2012 19:19:39 +0000 (19:19 +0000)]
Merged revisions 377072,377077 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377072 | rmudgett | 2012-12-03 12:45:18 -0600 (Mon, 03 Dec 2012) | 21 lines

  Cleanup CDR resources on exit.

  * Simplify do_reload() return handling since it never returned anything
  other than 0.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        cdr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
        cdr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377069 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377070 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377071 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377077 | rmudgett | 2012-12-03 13:17:24 -0600 (Mon, 03 Dec 2012) | 18 lines

  Cleanup CLI resources on exit and CLI command registration errors.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        cli-leaks-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
        cli-leaks-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377073 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377074 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377075 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377083 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix a few miscellaneous things
Mark Michelson [Mon, 3 Dec 2012 17:24:11 +0000 (17:24 +0000)]
Fix a few miscellaneous things

* Renamed some taskprocessor listener callbacks
* Fixed what would become a refcounting issue for pools
* Removed some XXX comments from allocation failure points

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377061 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377035,377040 via svnmerge from
Automerge script [Mon, 3 Dec 2012 17:19:46 +0000 (17:19 +0000)]
Merged revisions 377035,377040 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377035 | oej | 2012-12-03 10:45:49 -0600 (Mon, 03 Dec 2012) | 2 lines

  Formatting fixes
................
  r377040 | rmudgett | 2012-12-03 11:10:40 -0600 (Mon, 03 Dec 2012) | 16 lines

  Fix CCSS CLI commands and logger level not unregistered.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        ccss-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
  ........

  Merged revisions 377037 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 377038 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 377039 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377047 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoThis now compiles.
Mark Michelson [Mon, 3 Dec 2012 16:59:26 +0000 (16:59 +0000)]
This now compiles.

That's a milestone, of sorts. Things really need
arranging/documenting, and there's no function to
be able to push tasks to a threadpool.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377036 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 377018,377022 via svnmerge from
Automerge script [Mon, 3 Dec 2012 15:19:37 +0000 (15:19 +0000)]
Merged revisions 377018,377022 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377018 | oej | 2012-12-03 08:46:02 -0600 (Mon, 03 Dec 2012) | 5 lines

  Move functions to AFTER the block of forward declarations of functions.

  It was a mess. The first part of chan_sip.c is constants, declarations, structures and stuff,
  then forward declarations and then actual code. It's still a mess, but a bit less messy ;-)
................
  r377022 | file | 2012-12-03 08:56:36 -0600 (Mon, 03 Dec 2012) | 13 lines

  Fix an RTP instance reference count leak in chan_motif.

  When setting up an RTP instance the RTCP portion of the instance
  keeps a reference to the instance itself. In order to release this
  reference and stop RTCP the stop API call must be called before
  destroying the instance.

  (closes issue ASTERISK-20751)
  Reported by: joshoa
  ........

  Merged revisions 377021 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377028 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376998 via svnmerge from
Automerge script [Mon, 3 Dec 2012 10:20:59 +0000 (10:20 +0000)]
Merged revisions 376998 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376998 | oej | 2012-12-03 03:35:55 -0600 (Mon, 03 Dec 2012) | 4 lines

  Formatting changes

  Found a large amount of missing {} in the code before patching in another branch
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377003 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376984 via svnmerge from
Automerge script [Sat, 1 Dec 2012 01:19:10 +0000 (01:19 +0000)]
Merged revisions 376984 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376984 | file | 2012-11-30 18:47:42 -0600 (Fri, 30 Nov 2012) | 10 lines

  Tweak extension used for incoming calls received on Motif.

  Based on feedback from numerous individuals this patch tweaks incoming calls
  to first look for an extension with the name of the endpoint. If no such extension
  exists the call will silently fall back to the "s" extension as it previously
  did.
  ........

  Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376989 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376953 via svnmerge from
Automerge script [Fri, 30 Nov 2012 22:19:35 +0000 (22:19 +0000)]
Merged revisions 376953 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376953 | rmudgett | 2012-11-30 15:38:01 -0600 (Fri, 30 Nov 2012) | 24 lines

  chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.

  Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does
  not have a B channel available to assign to the call.

  (closes issue ABE-2869)
  Reported by: Guenther Kelleter
  Patches:
        setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter
        Modified

  ........

  Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
  ........

  Merged revisions 376950 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376951 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376952 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376962 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376918,376922 via svnmerge from
Automerge script [Fri, 30 Nov 2012 17:20:20 +0000 (17:20 +0000)]
Merged revisions 376918,376922 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376918 | mmichelson | 2012-11-30 10:56:53 -0600 (Fri, 30 Nov 2012) | 29 lines

  Fix potential crashes during SIP attended transfers.

  The principal behind this patch is simple. During a transfer,
  we manipulate channels that are owned by a separate thread than
  the one we currently are running in, so it makes sense that we
  need to grab a reference to the channels so that they cannot
  disappear out from under us.

  In the wild, crashes were sometimes seen when the transferring
  party would hang up the call before the transfer target answered
  the call. The most common place to see the crash occur was when
  attempting to send a connected line update to the transferer
  channel.

  (closes issue ASTERISK-20226)
  Reported by Jared Smith
  Patches:
   ASTERISK-20226.patch uploaded by Mark Michelson (License #5049)
  Tested by: Jared Smith
  ........

  Merged revisions 376901 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376916 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376917 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r376922 | seanbright | 2012-11-30 11:08:41 -0600 (Fri, 30 Nov 2012) | 11 lines

  Minor spelling fix to the VOLUME documentation.
  ........

  Merged revisions 376919 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376920 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376921 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376929 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoSome more progress.
Mark Michelson [Fri, 30 Nov 2012 00:19:50 +0000 (00:19 +0000)]
Some more progress.

Still does not compile.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376898 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376867,376871 via svnmerge from
Automerge script [Thu, 29 Nov 2012 23:19:44 +0000 (23:19 +0000)]
Merged revisions 376867,376871 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376867 | rmudgett | 2012-11-29 16:34:24 -0600 (Thu, 29 Nov 2012) | 13 lines

  Fix compile error.

  (issue ASTERISK-20724)
  ........

  Merged revisions 376864 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376865 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376866 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r376871 | rmudgett | 2012-11-29 17:01:16 -0600 (Thu, 29 Nov 2012) | 13 lines

  chan_local: Fix local_pvt ref leak in local_devicestate().

  Regression introduced by ASTERISK-20390 fix.
  ........

  Merged revisions 376868 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376869 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376870 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376878 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376837 via svnmerge from
Automerge script [Thu, 29 Nov 2012 22:20:25 +0000 (22:20 +0000)]
Merged revisions 376837 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376837 | elguero | 2012-11-29 15:58:41 -0600 (Thu, 29 Nov 2012) | 25 lines

  Improve Code Readability And Fix Setting natdetected Flag

  For 1.8, 10, 11 and trunk we are are improving the code readability.

  For 11 and trunk, auto nat detection was added.  The natdetected flag was being
  set to 1 when the host address in the VIA header did not specifiy a port.  This
  patch fixes this by setting the port on the temporary sock address used to
  SIP_STANDARD_PORT in order for the sock address comparison to work properly.

  (closes issue ASTERISK-20724)
  Reported by: Michael L. Young
  Patches:
      asterisk-20724-set-port-v2.diff uploaded by Michael L. Young (license 5026)

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

  Merged revisions 376834 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376835 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376836 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376844 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoCommit some progress towards threadpools.
Mark Michelson [Thu, 29 Nov 2012 18:54:51 +0000 (18:54 +0000)]
Commit some progress towards threadpools.

Does this compile? Not even close.
But I figure I don't want to lose this all in the case
of some catastrophe.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376833 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376820-376821 via svnmerge from
Automerge script [Thu, 29 Nov 2012 17:19:50 +0000 (17:19 +0000)]
Merged revisions 376820-376821 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376820 | pkiefer | 2012-11-29 10:44:42 -0600 (Thu, 29 Nov 2012) | 14 lines

  Fix chan_sip websocket payload handling

  Websocket by default doesn't return an ast_str for the payload received. When
  converting it to an ast_str on chan_sip the last character was being omitted,
  because ast_str functions expects that the given length includes the trailing
  0x00. payload_len only has the actual string length without counting the
  trailing zero.

  For most cases this passed unnoticed as most of SIP messages ends with \r\n.

  (closes issue ASTERISK-20745)
  Reported by: I?\195?\177aki Baz Castillo
  Review: https://reviewboard.asterisk.org/r/2219/
........
  r376821 | dlee | 2012-11-29 11:16:50 -0600 (Thu, 29 Nov 2012) | 5 lines

  Fixed ast_random's comment about locking.

  The original comment was separated from the code at some point, and didn't
  reflect the use of libc's other than glibc for Linux.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376827 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376791 via svnmerge from
Automerge script [Thu, 29 Nov 2012 01:20:42 +0000 (01:20 +0000)]
Merged revisions 376791 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376791 | rmudgett | 2012-11-28 18:48:12 -0600 (Wed, 28 Nov 2012) | 32 lines

  Add MALLOC_DEBUG atexit unreleased malloc memory summary.

  * Adds the following CLI commands to control MALLOC_DEBUG reporting of
  unreleased malloc memory when Asterisk is shut down.
  memory atexit list on
  memory atexit list off
  memory atexit summary byline
  memory atexit summary byfunc
  memory atexit summary byfile
  memory atexit summary off

  * Made check all remaining allocated region blocks atexit for fence
  violations.

  * Increased the allocated region hash table size by about three times.  It
  still isn't large enough considering the number of malloced blocks
  Asterisk uses.

  * Made CLI "memory show allocations anomalies" use
  regions_check_all_fences().

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

  Merged revisions 376788 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376789 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376790 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376798 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376761 via svnmerge from
Automerge script [Thu, 29 Nov 2012 00:21:13 +0000 (00:21 +0000)]
Merged revisions 376761 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376761 | rmudgett | 2012-11-28 18:07:55 -0600 (Wed, 28 Nov 2012) | 25 lines

  Enhance MALLOC_DEBUG CLI commands.

  * Fixed CLI "memory show allocations" misspelling of anomalies option.
  The command will still accept the original misspelling.

  * Miscellaneous tweaks to CLI "memory show allocations" command output
  format.

  * Made CLI "memory show summary" summarize by line number instead of by
  function if a filename is given.

  * Made CLI "memory show summary" sort its output by filename or
  function-name/line-number depending upon request.

  * Miscellaneous tweaks to CLI "memory show summary" command output format.
  ........

  Merged revisions 376758 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376759 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376760 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376728 via svnmerge from
Automerge script [Wed, 28 Nov 2012 17:20:23 +0000 (17:20 +0000)]
Merged revisions 376728 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376728 | jrose | 2012-11-28 10:47:44 -0600 (Wed, 28 Nov 2012) | 22 lines

  manager: Make challenge work with allowmultiplelogin=no

  Prior to this patch, challenge would yield a multiple logins error if used
  without providing the username (which isn't really supposed to be an argument
  to challenge) if allowmultiplelogin was set to no because allowmultiplelogin
  finds a user with a zero length login name. This check is simply disabled for
  the challenge action when the username is empty by this patch.

  (closes issue ASTERISK-20677)
  Reported by: Vladimir
  Patches:
      challenge_action_nomultiplelogin.diff uploaded by Jonathan Rose (license 6182)
  ........

  Merged revisions 376725 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376726 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376727 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376735 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376691 via svnmerge from
Automerge script [Wed, 28 Nov 2012 00:19:59 +0000 (00:19 +0000)]
Merged revisions 376691 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376691 | rmudgett | 2012-11-27 18:13:10 -0600 (Tue, 27 Nov 2012) | 39 lines

  Fix extension matching with the '-' char.

  The '-' char is supposed to be ignored by the dialplan extension matching.
  Unfortunately, it's treatment is not handled consistently throughout the
  extension matching code.

  * Made the old exten matching code consistently ignore '-' chars.

  * Made the old exten matching code consistently handle case in the
  matching.

  * Made ignore empty character sets.

  * Fixed ast_extension_cmp() to return -1, 0, or 1 as documented.  The only
  user of it in pbx_lua.c was testing for -1.  It was originally returning
  the strcmp() value for less than which is not usually going to be -1.

  * Fix character set sorting if the sets have the same number of characters
  and start with the same character.  Character set [0-9] now sorts before
  [02-9a] as originally intended.

  * Updated some extension label and priority already in use warnings to
  also indicate if the extension is aliased.

  (closes issue ASTERISK-19205)
  Reported by: Philippe Lindheimer, Birger "WIMPy" Harzenetter
  Tested by: rmudgett

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

  Merged revisions 376688 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376689 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376690 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376698 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376660 via svnmerge from
Automerge script [Tue, 27 Nov 2012 21:19:40 +0000 (21:19 +0000)]
Merged revisions 376660 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376660 | rmudgett | 2012-11-27 14:39:51 -0600 (Tue, 27 Nov 2012) | 27 lines

  Remove unnecessary channel module references.

  * Removed call to ast_module_user_hangup_all() in res_config_mysql.c since
  it is effectively a noop.  No channels can attach a reference to that
  module.

  * Removed call to ast_module_user_hangup_all() in app_celgenuserevent.c.
  The caller of unload_module() has already called it.

  * Removed redundant channel module references in pbx_dundi.c.  The
  registered dialplan function callback dispatchers for the read/read2/write
  callbacks already reference the module before calling.

  * pbx_dundi: Moved unregistering CLI commands, DUNDi switch, and dialplan
  functions to the first thing the unload_module() does.  This will reduce
  the chance of new channels using DUNDi services while the module is being
  torn down.
  ........

  Merged revisions 376657 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376658 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376659 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376667 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376630 via svnmerge from
Automerge script [Tue, 27 Nov 2012 18:20:18 +0000 (18:20 +0000)]
Merged revisions 376630 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376630 | rmudgett | 2012-11-27 11:54:25 -0600 (Tue, 27 Nov 2012) | 13 lines

  Made AST_LIST_REMOVE() simpler and use better names.

  * Update doxygen of AST_LIST_REMOVE().
  ........

  Merged revisions 376627 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376628 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376629 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376637 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376589 via svnmerge from
Automerge script [Fri, 23 Nov 2012 00:20:55 +0000 (00:20 +0000)]
Merged revisions 376589 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376589 | mjordan | 2012-11-22 18:02:23 -0600 (Thu, 22 Nov 2012) | 29 lines

  Re-initialize logmsgs mutex upon logger initialization to prevent lock errors

  Similar to the patch that moved the fork earlier in the startup sequence to
  prevent mutex errors in the recursive mutex surrounding the read/write thread
  registration lock, this patch re-initializes the logmsgs mutex.  Part of the
  start up sequence before forking the process into the background includes
  reading asterisk.conf; this has to occur prior to the call to daemon in order
  to read startup parameters.  When reading in a conf file, log statements can
  be generated.  Since this can't be avoided, the mutex instead is
  re-initialized to ensure a reset of any thread tracking information.

  This patch also includes some additional debugging to catch errors when
  locking or unlocking the recursive mutex that surrounds locks when the
  DEBUG_THREADS build option is enabled.  DO_CRASH or THREAD_CRASH will
  cause an abort() if a mutex error is detected.

  (issue ASTERISK-19463)
  Reported by: mjordan
  Tesetd by: mjordan
  ........

  Merged revisions 376586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376587 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376588 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376596 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376575 via svnmerge from
Automerge script [Wed, 21 Nov 2012 19:20:22 +0000 (19:20 +0000)]
Merged revisions 376575 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376575 | rmudgett | 2012-11-21 12:33:16 -0600 (Wed, 21 Nov 2012) | 20 lines

  Add red-black tree container type to astobj2.

  * Add red-black tree container type.

  * Add CLI command "astobj2 container dump <name>"

  * Added ao2_container_dump() so the container could be dumped by other
  modules for debugging purposes.

  * Changed ao2_container_stats() so it can be used by other modules like
  ao2_container_check() for debugging purposes.

  * Updated the unit tests to check red-black tree containers.

  (closes issue ASTERISK-19970)
  Reported by: rmudgett
  Tested by: rmudgett

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376580 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376562 via svnmerge from
Automerge script [Tue, 20 Nov 2012 22:19:11 +0000 (22:19 +0000)]
Merged revisions 376562 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376562 | dlee | 2012-11-20 16:06:05 -0600 (Tue, 20 Nov 2012) | 8 lines

  Added missing newlines to websocket ast_logs.

  Without these newlines, log messages just continue tacking onto the same
  line, and do not flush immediately.
  ........

  Merged revisions 376561 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376567 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove extra ast_backtrace() call I had in while debugging.
Mark Michelson [Tue, 20 Nov 2012 19:23:55 +0000 (19:23 +0000)]
Remove extra ast_backtrace() call I had in while debugging.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376551 via svnmerge from
Automerge script [Tue, 20 Nov 2012 19:19:31 +0000 (19:19 +0000)]
Merged revisions 376551 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376551 | mmichelson | 2012-11-20 13:09:37 -0600 (Tue, 20 Nov 2012) | 20 lines

  Add "Require: timer" to 200 OK responses when appropriate.

  The method by which the Require header is added to 200 responses is
  inspired by the method that Olle Johansson uses in his darjeeling-prack
  branch.

  (closes issue ASTERISK-20570)
  Reported by Matt Jordan, at the behest of Olle Johansson

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

  Merged revisions 376521 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376522 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376550 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376556 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376541 via svnmerge from
Automerge script [Tue, 20 Nov 2012 18:19:37 +0000 (18:19 +0000)]
Merged revisions 376541 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376541 | alecdavis | 2012-11-20 11:39:11 -0600 (Tue, 20 Nov 2012) | 19 lines

  Reduce CLI spam of "Extension Changed" device state messages.

  Asterisk 11 follows RFC3265 that states that after every subscribe or resubscribe a notify should be sent.
  Thus the console if filled continuously with the following after every subscribe;
    == Extension Changed 8512[phones] new state IDLE for Notify User cisco1

  In Asterisk 1.8 only changes would be sent. Thus only when a device state changed was anything emitted to the console.

  fix:
  Only print to console when device state isn't forced.

  (closes ASTERISK-20706)
  Reported by: alecdavis
  Tested by: alecdavis
  alecdavis (license 585)
  ........

  Merged revisions 376540 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376546 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoGet rid of trailing whitespace.
Mark Michelson [Mon, 19 Nov 2012 22:34:27 +0000 (22:34 +0000)]
Get rid of trailing whitespace.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376500 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoReorganize code and change behavior of ast_taskprocessor_execute() when taskprocessor...
Mark Michelson [Mon, 19 Nov 2012 21:31:32 +0000 (21:31 +0000)]
Reorganize code and change behavior of ast_taskprocessor_execute() when taskprocessor is shutting down.

Moved code around to be easier to follow.

ast_taskprocessor_execute() will now return 0 if the taskprocessor is being shut down.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376499 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd doxygen to taskprocessor tests.
Mark Michelson [Mon, 19 Nov 2012 20:35:39 +0000 (20:35 +0000)]
Add doxygen to taskprocessor tests.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376498 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376472 via svnmerge from
Automerge script [Mon, 19 Nov 2012 20:20:36 +0000 (20:20 +0000)]
Merged revisions 376472 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376472 | wdoekes | 2012-11-19 14:03:56 -0600 (Mon, 19 Nov 2012) | 17 lines

  Fix most leftover non-opaque ast_str uses.

  Instead of calling str->str, one should use ast_str_buffer(str). Same
  goes for str->used as ast_str_strlen(str) and str->len as
  ast_str_size(str).

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

  Merged revisions 376469 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376470 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376471 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376479 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376457 via svnmerge from
Automerge script [Mon, 19 Nov 2012 02:19:08 +0000 (02:19 +0000)]
Merged revisions 376457 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376457 | mjordan | 2012-11-18 20:14:54 -0600 (Sun, 18 Nov 2012) | 7 lines

  Fix uninitialized in this function error

  With some versions of gcc, n_buckets will be flagged as being uninitialized
  before use.  While its technically impossible (since the switch statement,
  even without a default, accounts for all possibilities), we'll initialize the
  variable to 0 anyway.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376462 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376447 via svnmerge from
Automerge script [Sun, 18 Nov 2012 21:19:45 +0000 (21:19 +0000)]
Merged revisions 376447 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376447 | mjordan | 2012-11-18 14:27:45 -0600 (Sun, 18 Nov 2012) | 55 lines

  Reorder startup sequence to prevent lockups when process is sent to background

  Although it is very rare and timing dependent, the potential exists for the
  call to 'daemon' to cause what appears to be a deadlock in Asterisk during
  startup.  This can occur when a recursive mutex is obtained prior to the
  daemon call executing.  Since daemon uses fork to send the process into the
  background, any threading primitives are unsafe to re-use after the call.
  Implementations of pthread recursive mutexes are highly likely to store the
  thread identifier of the thread that previously obtained the mutex.  If
  the mutex was locked prior to the fork, a subsequent unlock operation will
  potentially fail as the thread identifier is no longer valid.  Since the
  mutex is still locked, all subsequent attempts to grab the mutex by other
  threads will block.

  This behavior exhibited itself most often when DEBUG_THREADS was enabled, as
  this compile time option surrounds the mutexes in Asterisk with another
  recursive mutex that protects the storage of thread related information.  This
  made it much more likely that a recursive mutex would be obtained prior to
  daemon and unlocked after the call.

  This patch does the following:
  a) It backports a patch from Asterisk 11 that prevents the spawning of the
     localtime monitoring thread.  This thread is now spawned after Asterisk has
     fully booted.
  b) It re-orders the startup sequence to call daemon earlier during Asterisk
     startup.  This limits the potential of threading primitives being accessed
     by initialization calls before daemon is called.
  c) It removes calls to ast_verbose/ast_log/etc. prior to daemon being called.
     Developers should send error messages directly to stderr prior to daemon,
     as calls to ast_log may access recursive mutexes that store thread related
     information.
  d) It reorganizes when thread local storage is created for storing lock
     information during the creation of threads.  Prior to this patch, the
     read/write lock protecting the list of threads in ast_register_thread would
     utilize the lock in the thread local storage prior to it being initialized;
     this patch prevents that.

  On a very related note, this patch will *greatly* improve the stability of the
  Asterisk Test Suite.

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

  (closes issue ASTERISK-19463)
  Reported by: mjordan
  Tested by: mjordan
  ........

  Merged revisions 376428 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........

  Merged revisions 376431 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376441 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376453 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMerged revisions 376416 via svnmerge from
Automerge script [Sun, 18 Nov 2012 15:20:26 +0000 (15:20 +0000)]
Merged revisions 376416 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376416 | mjordan | 2012-11-18 08:31:32 -0600 (Sun, 18 Nov 2012) | 13 lines

  Add a test event that reports changes in ConfBridge state

  This patch adds a test event to ConfBridge that reports transitions between
  states in ConfBridge.  This is used by tests in the Asterisk Test Suite
  that verify state changes based on the entering/leaving of conference
  participants.
  ........

  Merged revisions 376414 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........

  Merged revisions 376415 from http://svn.asterisk.org/svn/asterisk/branches/11
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376422 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRestructure taskprocessor load test to test integrity of task execution.
Mark Michelson [Sat, 17 Nov 2012 22:27:39 +0000 (22:27 +0000)]
Restructure taskprocessor load test to test integrity of task execution.

This throws a random number to each task and stores a copy locally. After
all tasks have executed, the data is checked to be sure tasks executed
in the correct order.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376413 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd a second default taskprocessor test that executes 20000 tasks.
Mark Michelson [Sat, 17 Nov 2012 21:55:42 +0000 (21:55 +0000)]
Add a second default taskprocessor test that executes 20000 tasks.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376412 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoChange the default taskprocessor test so it will never hang forever.
Mark Michelson [Sat, 17 Nov 2012 21:48:59 +0000 (21:48 +0000)]
Change the default taskprocessor test so it will never hang forever.

Changes the ast_cond_wait() to an ast_cond_timedwait() so that
if there is an issue, we'll never wait forever for the task to
finish execution.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376411 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoTest that shutdown callback is called when expected.
Mark Michelson [Fri, 16 Nov 2012 05:00:42 +0000 (05:00 +0000)]
Test that shutdown callback is called when expected.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376383 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoChange the write-up on taskprocessors to reflect the new design.
Mark Michelson [Fri, 16 Nov 2012 04:44:12 +0000 (04:44 +0000)]
Change the write-up on taskprocessors to reflect the new design.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376382 65c4cc65-6c06-0410-ace0-fbb531ad65f3