Commit Graph

790 Commits

Author SHA1 Message Date
Joshua Colp a6da07a515 Merged revisions 98966 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98966 | file | 2008-01-16 13:50:10 -0400 (Wed, 16 Jan 2008) | 6 lines

Add missing NULLs at end of two ast_load_realtimes.
(closes issue #11769)
Reported by: tequ
Patches:
      chaniax.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 17:51:52 +00:00
Russell Bryant 4fb04cb58a Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines

Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:31:53 +00:00
Tilghman Lesher 857e3412f4 Several manager changes:
1) Add the Dialplan class, for NewExten and VarSet events, which should cut
down on the volume of traffic in the Call class.
2) Permit some commands to be run from multiple classes, such as allowing
DBGet to be run from either the System or the Reporting class.
3) Heavily document each class in the sample config, as there were several
that made no sense to be in the write= line, and two that made no sense to be
in the read= line (since they controlled no permissions there).

(Closes issue #10386)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:12:35 +00:00
Russell Bryant 4d6c570974 Merged revisions 96394 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r96394 | russell | 2008-01-03 16:44:22 -0600 (Thu, 03 Jan 2008) | 3 lines

Don't crash if the iax2 pvt structure has been destroyed before we get to this point
(closes issue #11672, reported by snuffy, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 22:46:37 +00:00
Russell Bryant 21e057e79d Fix a bug in peer handling that caused multiple instances of a peer to end up
in the peers container after a reload.  Somehow, this bug doesn't exist in 1.4 ...
(closes issue #11626)
(reported by pnlarsson, additional info from mvanbaak, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 16:51:16 +00:00
Russell Bryant 3de7bc9ae3 Merged revisions 94256 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r94256 | russell | 2007-12-20 14:22:22 -0600 (Thu, 20 Dec 2007) | 13 lines

Merged revisions 94255 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r94255 | russell | 2007-12-20 14:21:41 -0600 (Thu, 20 Dec 2007) | 5 lines

Fix another potential seg fault ...

(closes issue #11606)
Reported by: dimas

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 20:25:05 +00:00
Tilghman Lesher c019f13746 Merged revisions 93949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93949 | tilghman | 2007-12-19 11:04:13 -0600 (Wed, 19 Dec 2007) | 3 lines

Avoid segfault in chan_iax when peer isn't defined
(Closes issue #11602)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 17:13:06 +00:00
Tilghman Lesher df9dbc3951 Merged revisions 93668 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r93668 | tilghman | 2007-12-18 12:29:39 -0600 (Tue, 18 Dec 2007) | 10 lines

Merged revisions 93667 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r93667 | tilghman | 2007-12-18 12:23:06 -0600 (Tue, 18 Dec 2007) | 2 lines

Fixing AST-2007-027 (Closes issue #11119)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:39:25 +00:00
Luigi Rizzo fd88390af7 remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 09:46:18 +00:00
Olle Johansson f3471c1652 Merged revisions 93182 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93182 | oej | 2007-12-17 08:15:13 +0100 (MÃ¥n, 17 Dec 2007) | 8 lines

Issue 11574: Add dependencies on res_monitor and res_features. 

I wonder if Asterisk can run at all without res_features. My guess is that 
there's propably a lot of more modules and the core that depends on it.

Reported by: caio1982
(closes issue #11574)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 21:12:24 +00:00
Olle Johansson 17afebc1a6 HUGE improvements to QoS/CoS handling by IgorG
- Refer to the proper documentation
- Implement separate signalling/media QoS/CoS in many channels using RTP
- Improve warnings and verbose messages
- Deprecate some old settings

Minor modifications by me, a big effort from IgorG.
Thanks!


Reported by: IgorG
Patches: 
      qoscleanup-89394-4-trunk.patch uploaded by IgorG (license 20)
Tested by: IgorG
(closes issue #11145)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16 10:51:53 +00:00
Russell Bryant 44fc07ee63 Revert an "optimization" that I added in revision 89887, as the user who reported
issue #11449 has demonstrated that it actually was a performance hit on his
machine.  I think that it is possible that it could still be a benefit on systems
under higher load, especially SMP systems, but I don't have enough time or interest
to find out at the moment.
(closes issue #11449)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 23:44:26 +00:00
Russell Bryant fac7480820 Merged revisions 90348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines

Change the behavior of ao2_link().  Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.

This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container.  It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 19:34:47 +00:00
Russell Bryant 753f7086cd Merge changes from team/russell/iax2_frame_queue
This patch is an optimization for chan_iax2.  This module is now heavily
multi-threaded.  However, there is still a good number of globally shared
resources that prevent things from happen asynchronously.  One of those things
was the global IAX frame queue.  This queue was used to hold frames that have
been deferred for transmitting by another thread, and frames that may need to
get retransmitted.

I changed the frame queue to be per-call, since almost all of the frame queue
handling only cares about frames specific to a call number.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:50:25 +00:00
Olle Johansson 28257e4005 More additions from the "moremanager" branch, this time for IAX2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 20:36:59 +00:00
Steve Murphy 86476c607f closes issue #11285, where an unload of a module that creates a dialplan context, causes a crash when you do a 'dialplan show' of that context. This is because the registrar string is defined in the module, and the stale pointer is traversed. The reporter offered a patch that would always strdup the registrar string, which is practical, but I preferred to destroy the created contexts in each module where one is created. That seemed more symmetric. There were only 6 place in asterisk where this is done: chan_sip, chan_iax2, chan_skinny, res_features, app_dial, and app_queue. The two apps destroyed the context, but left the contexts. All is fixed now and unloads should be dialplan friendly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:54:12 +00:00
Luigi Rizzo 7e8835e0d7 remove another set of redundant #include "asterisk/options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:24:55 +00:00
Russell Bryant 192252ec58 fix a small gramatical error in a comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 18:24:23 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 0595b5e2aa include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 18:52:04 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Tilghman Lesher fc74a46ee2 Merged revisions 89298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89298 | tilghman | 2007-11-15 12:05:56 -0600 (Thu, 15 Nov 2007) | 5 lines

Yet another memory corruption issue.
Reported by: atis
Patch by: tilghman
Fixes issue #10923

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:11:36 +00:00
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 13:18:40 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
Luigi Rizzo 08b10da53b Simplify the implementation and the API for stringfields;
details and examples are in include/asterisk/stringfields.h.

Not applicable to older branches except for 1.4 which will
receive a fix for the routines that free memory pools.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-04 19:44:31 +00:00
Tilghman Lesher 97fe45ab93 Janitor: use ast_free to pair calls of ast_malloc and ast_calloc
Reported by: eliel
Patch by: eliel
Closes issue #11135


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 06:07:18 +00:00
Russell Bryant 3978cb6f1c Merged revisions 87686 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87686 | russell | 2007-10-30 16:19:09 -0500 (Tue, 30 Oct 2007) | 11 lines

Merge the changes from team/russell/iax2_poke_fix and iax2-poke-fix-trunk

There was a race condition related to the handling of POKEing peers.  Essentially, 
a reference to a peer is held by the scheduler when there are pending callbacks, 
but the reference count didn't reflect it.  So, it was possible for a peer to hit
a reference count of zero and have its destructor begin to be called at the same
time that the scheduler thread ran a POKE related callback.  If that happened,
a crash would likely occur.

(closes issue #11082, closes issue #11094)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 21:22:48 +00:00
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 20:05:18 +00:00
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:29:40 +00:00
Jason Parker 65761cbd7a More changes to NEW_CLI.
Also fixes a few cli messages and some minor formatting.

(closes issue #11001)
Reported by: seanbright
Patches:
      newcli.1.patch uploaded by seanbright (license 71)
      newcli.2.patch uploaded by seanbright (license 71)
      newcli.4.patch uploaded by seanbright (license 71)
      newcli.5.patch uploaded by seanbright (license 71)
      newcli.6.patch uploaded by seanbright (license 71)
      newcli.7.patch uploaded by seanbright (license 71)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:01:00 +00:00
Jason Parker ed690fc348 Switch dundi to new tos config format.
Remove old unused defines for old style.

Closes issue 10860, patch by IgorG.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 23:20:40 +00:00
Russell Bryant d78463be1e Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it.  It replaces a bunch of simple calls to snprintf with ast_copy_string

(closes issue #10843)
Reported by: Corydon76
Patches: 
      2007092900_10843.diff uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 15:23:19 +00:00
Russell Bryant 9f64905d4e Merged revisions 83432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines

gcc 4.2 has a new set of warnings dealing with cosnt pointers.  This set of
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2.
(closes issue #10774, patch from qwell)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 14:40:10 +00:00
Russell Bryant 86e640bf77 Merged revisions 83175 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83175 | russell | 2007-09-19 14:13:29 -0500 (Wed, 19 Sep 2007) | 8 lines

When handling a reload of chan_iax2, don't use an ao2_callback() to POKE all
peers.  Instead, use an iterator.  By using an iterator, the peers container
is not locked while the POKE is being done.  It can cause a deadlock if the
peers container is locked because poking a peer will try to lock pvt structs,
while there is a lot of other code that will hold a pvt lock when trying to
go lock the peers container.
(reported to me directly by Loic Didelot.  Thank you for the debug info!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 19:14:58 +00:00
Russell Bryant ded76a8988 convert various places that access the channel lock directly to use the channel lock wrappers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 22:59:36 +00:00
Russell Bryant 9388173f85 Make the MALLOC_DEBUG output for free() useful again. After changing calls to
free to be ast_free, astmm said all calls to free were coming from utils.h


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 18:57:56 +00:00
Jason Parker 6a90ea5cf4 After some discussions, we decided that the return values here were a bit messy.
This also fixes a bug on reload, where peers may not have reregistered properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 21:55:32 +00:00
Tilghman Lesher c121ed6bec Change the IAXPeers command to have manager-style output, instead of CLI-style output (closes issue #8254)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-10 20:03:51 +00:00
Russell Bryant 9bda1c5a94 Merged revisions 81448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81448 | russell | 2007-09-04 13:37:44 -0500 (Tue, 04 Sep 2007) | 4 lines

Remove the typedefs on ao2_container and ao2_iterator.  This is simply because
we don't typedef objects anywhere else in Asterisk, so we might as well make
this follow the same convention.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-04 18:40:07 +00:00
Joshua Colp 3213f6dc2d Merged revisions 81439 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81439 | file | 2007-09-04 11:23:18 -0300 (Tue, 04 Sep 2007) | 6 lines

(closes issue #10632)
Reported by: jamesgolovich
Patches:
      asterisk-iaxfirmwareleak.diff.txt uploaded by jamesgolovich (license 176)
Fix memory leak when unloading chan_iax2. The firmware files were not being freed.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-04 14:25:21 +00:00
Russell Bryant 51af103a79 Merged revisions 81433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81433 | russell | 2007-09-03 13:57:53 -0500 (Mon, 03 Sep 2007) | 5 lines

Remove a couple of calls to ast_string_field_free_pools() on peers in error
handling blocks in the code for building peers.  The peer object destructor
does this and doing it twice will cause a crash.
(closes issue #10625, reported by and patched by pnlarsson)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-03 18:59:08 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Tilghman Lesher 6bdc66e9b0 Changed one too many variable settings in issue #9315 (closes issue #10592)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 15:21:10 +00:00
Russell Bryant 225d9166ec Merged revisions 81291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81291 | russell | 2007-08-28 16:38:26 -0500 (Tue, 28 Aug 2007) | 3 lines

Change the message about receiving a mini-frame before the first full voice
frame to a DEBUG message.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 21:39:36 +00:00
Russell Bryant d3687bdb93 Merged revisions 80932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80932 | russell | 2007-08-26 13:11:26 -0500 (Sun, 26 Aug 2007) | 3 lines

Remove an extra signal_condition() for the scheduler thread.
(closes issue #10564, patch from casper)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-26 18:12:58 +00:00
Russell Bryant 7c41c3a5bc Merged revisions 80895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80895 | russell | 2007-08-25 12:37:39 -0500 (Sat, 25 Aug 2007) | 7 lines

Fix some issues with the handling of the scheduler in chan_iax2.  Most of the
places that scheduled items to be executed by the scheduler thread did not
signal the scheduler thread to wake up so that it could recalculate the time
until the next action.  These changes will make the scheduler thread more
responsive and ensure that actions get executed as close to when intended as
possible instead of it being possible for very long delays.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-25 17:55:45 +00:00
Russell Bryant 700b5d8442 Merged revisions 80849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80849 | russell | 2007-08-24 16:22:50 -0500 (Fri, 24 Aug 2007) | 5 lines

If dnsmgr is in use, and no DNS servers are available when Asterisk first
starts, then don't give up on poking peers.  Allow the poke to get rescheduled
so that it will work once the dnsmgr is able to resolve the host.
(closes issue #10521, patch by jamesgolovich)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 21:23:14 +00:00
Russell Bryant 488cd9a7a6 Merged revisions 80499 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80499 | russell | 2007-08-23 12:02:50 -0500 (Thu, 23 Aug 2007) | 3 lines

Fix some code where it was possible for a reference to a peer to not get
released when it should.  Thank you to Marta Carbone for pointing this out!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 17:04:04 +00:00
Russell Bryant f6f9c14723 allow peers and users to go into a hash table
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 21:35:08 +00:00
Russell Bryant f04ed4641b Unsubscribe from MWI events in the peer destructor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 20:46:16 +00:00
Russell Bryant 50d7fc81aa Merged revisions 80362 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80362 | russell | 2007-08-22 15:21:36 -0500 (Wed, 22 Aug 2007) | 34 lines

Merge changes from team/russell/iax_refcount.

This set of changes fixes problems with the handling of iax2_user and iax2_peer
objects.  It was very possible for a thread to still hold a reference to one of
these objects while a reload operation tries to delete them.  The fix here is to
ensure that all references to these objects are tracked so that they can't go away
while still in use.

To accomplish this, I used the astobj2 reference counted object model.  This
code has been in one of Luigi Rizzo's branches for a long time and was primarily
developed by one of his students, Marta Carbone.  I wanted to go ahead and bring
this in to 1.4 because there are other problems similar to the ones fixed by these
changes, so we might as well go ahead and use the new astobj if we're going to go
through all of the work necessary to fix the problems.

As a nice side benefit of these changes, peer and user handling got more efficient.
Using astobj2 lets us not hold the container lock for peers or users nearly as long
while iterating.  Also, by changing a define at the top of chan_iax2.c, the objects
will be distributed in a hash table, drastically increasing lookup speed in these
containers, which will have a very big impact on systems that have a large number of
users or peers.

The use of the hash table will be made the default in trunk.  It is not the default
in 1.4 because it changes the behavior slightly.  Previously, since peers and users
were stored in memory in the same order they were specified in the configuration file,
you could influence peer and user matching order based on the order they are specified
in the configuration.  The hash table does not guarantee any order in the container,
so this behavior will be going away.  It just means that you have to be a little
more careful ensuring that peers and users are matched explicitly and not forcing
chan_iax2 to have to guess which user is the right one based on secret, host, and
access list settings, instead of simply using the username.

If you have any questions, feel free to ask on the asterisk-dev list.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 20:44:23 +00:00
Joshua Colp 477e7dcbc7 (closes issue #10495)
Reported by: stevedavies
Make sure context pointer is valid or else chan_iax2 will go kaboom.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 00:54:19 +00:00
Tilghman Lesher 749b67bd1d We weren't properly encapsulating the mtime ignores of config files (closes issue #10488)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-18 13:52:44 +00:00
Russell Bryant c67f7fd3da Make use of ast_sched_replace() in some places in chan_iax2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 14:14:59 +00:00
Russell Bryant 0b44b92cf5 Merged revisions 79756 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79756 | russell | 2007-08-16 16:29:24 -0500 (Thu, 16 Aug 2007) | 11 lines

Fix more deadlocks in chan_iax2 that were introduced by making frame handling
and scheduling multi-threaded.  Unfortunately, we have to do some expensive
deadlock avoidance when queueing frames on to the ast_channel owner of the IAX2
pvt struct.  This was already handled for regular frames, but ast_queue_hangup
and ast_queue_control were still used directly.  Making these changes introduced
even more places where the IAX2 pvt struct can disappear in the context of a
function holding its lock due to calling a function that has to unlock/lock it
to avoid deadlocks.  I went through and fixed all of these places to account for
this possibility.
(issue #10362, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:33:38 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Dwayne M. Hubbard 6186647ac3 added counter for iax2 show registry CLI output, closes issue 10461, thanks junky
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 18:23:39 +00:00
Russell Bryant 4b584bbdf7 Merged revisions 79470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79470 | russell | 2007-08-14 13:49:10 -0500 (Tue, 14 Aug 2007) | 2 lines

Fix another spot where an iax2_peer would be leaked if realtime was in use.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 18:50:12 +00:00
Russell Bryant 4e038cdc7c Merged revisions 79436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79436 | russell | 2007-08-14 12:31:39 -0500 (Tue, 14 Aug 2007) | 3 lines

Fix some memory leaks throughout chan_iax2 related to the use of realtime.
I found these while working on iax2_peer object reference tracking.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 17:33:12 +00:00
Russell Bryant e05da8e948 Merged revisions 79301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79301 | russell | 2007-08-13 15:37:50 -0500 (Mon, 13 Aug 2007) | 3 lines

Don't call find_peer in registry_authrequest with the pvt lock held to avoid a
deadlock.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:40:47 +00:00
Russell Bryant 16373a4e5f Merged revisions 79276 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79276 | russell | 2007-08-13 15:18:30 -0500 (Mon, 13 Aug 2007) | 4 lines

Release the pvt lock before calling find_peer in register_verify to avoid a
deadlock.  Also, remove some unnecessary locking in auth_fail that was only done
recursively.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:20:43 +00:00
Russell Bryant 982a3ac424 Merged revisions 79274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79274 | russell | 2007-08-13 15:02:57 -0500 (Mon, 13 Aug 2007) | 3 lines

Don't call find_peer within update_registry with a pvt lock held.  This can
cause a deadlock as the code will eventually call find_callno.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:06:19 +00:00
Russell Bryant 0dd52f7196 Merged revisions 79272 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79272 | russell | 2007-08-13 14:27:39 -0500 (Mon, 13 Aug 2007) | 9 lines

I am fighting deadlocks in chan_iax2.  I have tracked them down to a single
core issue.  You can not call find_callno() while holding a pvt lock as this
function has to lock another (every) other pvt lock.  Doing so can lead to a
classic deadlock.  So, I am tracking down all of the code paths where this
can happen and fixing them.

The fix I committed earlier today was along the same theme.  This patch fixes
some code down the path of authenticate_reply.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 19:29:30 +00:00
Russell Bryant a2847deb73 Merged revisions 79214 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79214 | russell | 2007-08-13 10:28:13 -0500 (Mon, 13 Aug 2007) | 4 lines

Fix a potential deadlock in socket_process.  check_provisioning can eventually
call find_callno.  You can't hold a pvt lock while calling find_callno because
it goes through and locks every single one looking for a match.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 15:32:05 +00:00
Joshua Colp d5eda8709c Merged revisions 79174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines

(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:22:46 +00:00
Russell Bryant 9d1acad76b Fix a problem that I had introduced into MWI handling. I had ignored
the mailbox context.  Now, all related MWI event dealings pay attention
to the context as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 17:07:36 +00:00
Joshua Colp f2fc44d07e Correct spelling. s/threaads/threads/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 19:03:46 +00:00
Russell Bryant d9407da71d Merged revisions 78242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78242 | russell | 2007-08-06 15:44:09 -0500 (Mon, 06 Aug 2007) | 4 lines

Fix an issue where dynamic threads can get free'd, but still exist in the 
dynamic thread list.
(closes issue #10392, patch from Mihai, with credit to his colleague, Pete)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 20:45:09 +00:00
Russell Bryant 661fa0b374 Merged revisions 78063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78063 | russell | 2007-08-03 12:01:07 -0500 (Fri, 03 Aug 2007) | 4 lines

Only pass through HOLD and UNHOLD control frames when the mohinterpret option
is set to "passthrough".  This was pointed out by Kevin in the middle of a
training session.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-03 17:02:00 +00:00
Russell Bryant bcabfbb89a Merged revisions 78028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78028 | russell | 2007-08-02 21:04:22 -0500 (Thu, 02 Aug 2007) | 6 lines

Don't reuse the timespec that was set to 0 in the previous timedwait as it
will just return immediately.  Also, fix some logic so the thread's lock
isn't unlocked twice in the weird case of dynamic threads getting acquired
right after a timeout.
(pointed out by SteveK)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-03 02:05:02 +00:00
Russell Bryant 7b3dcbb842 Merged revisions 77949 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77949 | russell | 2007-08-02 14:25:14 -0500 (Thu, 02 Aug 2007) | 5 lines

Fix the case where a dynamic thread times out waiting for something to do
during the first time it runs.  This shouldn't ever happen, but we should
account for it anyway.
(pointed out by pete, who works with mihai)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 19:26:12 +00:00
Russell Bryant 85ba8d515a Merged revisions 77943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77943 | russell | 2007-08-02 13:04:43 -0500 (Thu, 02 Aug 2007) | 9 lines

Fix another race condition in the handling of dynamic threads.  If the dynamic
thread timed out waiting for something to do, but was acquired to perform an
action immediately afterwords, then wait on the condition again to give the
other thread a chance to finish setting up the data for what action this thread
should perform.  Otherwise, if it immediately continues, it will perform the
wrong action.
(reported on IRC by mihai, patch by me)
(related to issue #10289)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 18:05:23 +00:00
Russell Bryant 12ed8e8d07 Fix an issue that Simon pointed out to me on IRC. There were cases in the
trunk version of find_idle_thread() where the old full frame processing
information was not cleared out.  This would have caused full frames to get
deferred for processing by threads that weren't actually processing frames for
that call.  Nice catch!!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 17:09:42 +00:00
Russell Bryant 171791dd8b Merged revisions 77939 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77939 | russell | 2007-08-02 11:56:04 -0500 (Thu, 02 Aug 2007) | 4 lines

Add another sanity check to vnak_retransmit().  This check ensures that frames
that have already been marked for deletion don't get retransmitted.
(closes issue #10361, patch from mihai)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 16:58:26 +00:00
Russell Bryant 1990a00ca4 Merged revisions 77887 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77887 | russell | 2007-08-01 17:16:17 -0500 (Wed, 01 Aug 2007) | 23 lines

Fix some race conditions which have been causing weird problems in chan_iax2.
The most notable problem is that people have been seeing storms of VNAK frames
being sent due to really old frames mysteriously being in the retransmission
queue and never getting removed.

It was possible that a dynamic thread got created, but did not acquire its lock
before the thread that created it signals it to perform an action.  When this
happens, the thread will sleep until it hits a timeout, and then get destroyed.
So, the action never gets performed and in some cases, means a frame doesn't
get transmitted and never gets freed since the scheduler never gets a chance
to reschedule transmission.

Another less severe race condition is in the handling of a timeout for a dynamic
thread.  It was possible for it to be acquired to perform at action at the same
time that it hit a timeout.  When this occurs, whatever action it was acquired
for would never get performed.

(patch contributed by Mihai and SteveK)
(closes issue #10289)
(closes issue #10248)
(closes issue #10232)
(possibly related to issue #10359)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 22:24:23 +00:00
Joshua Colp d9aee5e353 Merged revisions 77869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines

Add some fixes for building on Solaris.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01 18:01:33 +00:00
Russell Bryant 3ca4126887 Change another unnecessary use of the increment operator to explicitly set the var to 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 20:36:18 +00:00
Russell Bryant 3b49339387 Explicitly set a variable to 1 instead of using the increment operator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 20:33:44 +00:00
Russell Bryant a27203a5bc Merged revisions 77794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77794 | russell | 2007-07-30 15:16:43 -0500 (Mon, 30 Jul 2007) | 8 lines

Fix an issue that could potentially cause corruption of the global iax frame
queue.  In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro.  However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong.  :)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 20:21:05 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Luigi Rizzo 546c742106 silence a warning in ast-devmode on a potentially uninitialized var.
At first sight (but the function is very large so i am not 100% sure)
the code seems correct, so maybe my compiler is just not smart
enough to figure that out at the optimization level it has.

Not worthwhile merging to 1.4 i believe.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 21:58:13 +00:00
Tilghman Lesher 1c17bc177d Merged revisions 76803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76803 | qwell | 2007-07-24 11:32:20 -0500 (Tue, 24 Jul 2007) | 3 lines

Don't create the Asterisk channel until we are starting the PBX on it.
(ASA-2007-018)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 17:05:10 +00:00
Russell Bryant 3c10aab644 Merged revisions 76485 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76485 | russell | 2007-07-23 07:25:01 -0500 (Mon, 23 Jul 2007) | 6 lines

Use a signed integer for storing the number of bytes in the packet read from
the network.  Using an unsigned value here made it impossible to handle an
error returned from recvfrom().  Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 12:29:46 +00:00
Steve Murphy 0e969271ae After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 23:24:27 +00:00
Russell Bryant 7b09e738f0 Merged revisions 75928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75928 | russell | 2007-07-19 10:53:15 -0500 (Thu, 19 Jul 2007) | 14 lines

Merged revisions 75927 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75927 | russell | 2007-07-19 10:49:42 -0500 (Thu, 19 Jul 2007) | 6 lines

When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 15:53:50 +00:00
Russell Bryant 5272289355 I thought I noticed a memory leak earlier when I saw that the contents of this
list were not destroyed when the module is unloaded.  However, after reading
the code related to the use of this list a lot today, I realized that it isn't
necessary.  So, I have added a comment to explain why it isn't necessary.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 22:52:54 +00:00
Tilghman Lesher 9c99cba373 Change IAX variables to use datastores (closes issue #9315)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 22:40:03 +00:00
Russell Bryant 4681316959 Merged revisions 75759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75759 | russell | 2007-07-18 16:09:46 -0500 (Wed, 18 Jul 2007) | 13 lines

Merged revisions 75757 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75757 | russell | 2007-07-18 16:09:13 -0500 (Wed, 18 Jul 2007) | 5 lines

When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that 
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 21:10:27 +00:00
Russell Bryant 707ca59923 convert some lines indented with spaces to tabs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 19:50:21 +00:00
Tilghman Lesher 81bc1d7af5 Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 19:47:20 +00:00
Russell Bryant b5ff588044 Merged revisions 75445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines

Merged revisions 75444 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines

Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:49:09 +00:00
Russell Bryant 681e45f0b2 Merged revisions 75441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75441 | russell | 2007-07-17 15:42:12 -0500 (Tue, 17 Jul 2007) | 12 lines

Merged revisions 75440 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75440 | russell | 2007-07-17 15:41:41 -0500 (Tue, 17 Jul 2007) | 4 lines

After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:42:50 +00:00
Steve Murphy 8a7732f067 via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:40:29 +00:00
Russell Bryant 08b1a342e5 Merged revisions 74767 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r74767 | russell | 2007-07-11 17:57:07 -0500 (Wed, 11 Jul 2007) | 13 lines

Merged revisions 74766 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74766 | russell | 2007-07-11 17:53:26 -0500 (Wed, 11 Jul 2007) | 5 lines

The function make_trunk() can fail and return -1 instead of a valid new call
number.  Fix the uses of this function to handle this instead of treating it
as the new call number.  This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 23:05:34 +00:00
Russell Bryant 04de82d61c Merged revisions 73555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r73555 | russell | 2007-07-05 18:05:33 -0500 (Thu, 05 Jul 2007) | 3 lines

copy from the correct buffer when deferring a full frame
(related to issue #9937)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 23:06:01 +00:00
Russell Bryant d339ac7156 Merged revisions 73551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r73551 | russell | 2007-07-05 17:31:31 -0500 (Thu, 05 Jul 2007) | 6 lines

* Store the call number that a thread is processing without the full frame bit
  set to ease debugging
* When deferring a full frame for processing, stick it into the queue for the
  thread that is processing frames for that call, not the one that read the
  current frame and is about to go back into the idle list
(related to issue #9937)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 22:32:30 +00:00
Joshua Colp fab0bded8c Yet another Solaris tweak...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 20:35:35 +00:00
Russell Bryant 8fd5e05635 Merged revisions 71003 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r71003 | russell | 2007-06-21 22:14:41 -0500 (Thu, 21 Jun 2007) | 3 lines

Fix a small typo which ... well ... completely broke chan_iax2.  oops!
(issue #9937, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 03:15:34 +00:00
Russell Bryant 992c8ec757 Merged revisions 70883 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70883 | russell | 2007-06-21 16:14:53 -0500 (Thu, 21 Jun 2007) | 3 lines

Put the thread reading from the socket back in the idle list if it deferred the
processing of a full frame to another thread

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 21:16:36 +00:00
Russell Bryant 82151ac23f Merged revisions 70866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70866 | russell | 2007-06-21 16:07:04 -0500 (Thu, 21 Jun 2007) | 5 lines

If a full frame is received while one of the iax2 threads is in the middle
of handling a full frame for the same call, queue it up for processing by that
same thread later instead of dropping it.
(issue #9937, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 21:12:03 +00:00