Steve Murphy [Wed, 31 Oct 2007 03:51:52 +0000 (03:51 +0000)]
Included some verbage in the check_includes func, to inform the user that included contexts that have no match in the AEL, might be OK, as AEL cannot check in the extensions.conf or the in-memory contexts, as they may not be there at the time of the check.
Russell Bryant [Tue, 30 Oct 2007 21:19:09 +0000 (21:19 +0000)]
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.
Joshua Colp [Tue, 30 Oct 2007 16:13:39 +0000 (16:13 +0000)]
Add two more checks before printing out a warning message about bridging. If either channel has hungup of course the bridge will have failed.
(closes issue #10009)
Reported by: dimas
Kevin P. Fleming [Mon, 29 Oct 2007 22:04:29 +0000 (22:04 +0000)]
don't put '-pipe' into ASTCFLAGS if '-save-temps' is already there (used when debugging preprocessor issues) because the compiler will whine about each compile command
Russell Bryant [Mon, 29 Oct 2007 20:22:07 +0000 (20:22 +0000)]
Add some more details to the output of "core show locks". When a thread
is waiting for a lock, this will now show the details about who currently
has it locked.
(inspired by issue #11100)
Russell Bryant [Mon, 29 Oct 2007 19:21:06 +0000 (19:21 +0000)]
Remove a lock that doesn't make any sense. The regions lock needs to be held
when traversing the list of allocated chunks so that they can be printed out
to the CLI.
(Thanks to eliel on #asterisk-dev for pointing this out!)
Joshua Colp [Mon, 29 Oct 2007 17:20:28 +0000 (17:20 +0000)]
Fix issue where if both sides of the dialog cancelled the dialog at the same time chan_sip could kepe retransmitting a response for no reason.
(closes issue #9566)
Reported by: atca_pres
Patches:
bug9566.patch uploaded by oej
Tilghman Lesher [Sun, 28 Oct 2007 13:46:55 +0000 (13:46 +0000)]
Add autoservice to several more functions which might delay in their responses.
Also, make sure that func_odbc functions have a channel on which to set
variables.
Reported by russell
Fixed by tilghman
Closes issue #11099
Steve Murphy [Fri, 26 Oct 2007 16:34:02 +0000 (16:34 +0000)]
closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config,
Tilghman Lesher [Fri, 26 Oct 2007 13:54:30 +0000 (13:54 +0000)]
The addition of autoservice to func_curl additionally made func_curl dependent
on the existence of a channel, with no real reason. This should make func_curl
once again work without a channel.
Reported by jmls.
Fixed by tilghman.
Closes issue #11090
Russell Bryant [Mon, 22 Oct 2007 21:36:12 +0000 (21:36 +0000)]
If lock tracking is not enabled, then we can not attempt to log any mutex
failures. If so, we could end up in infinite recursion. The only lock that
is affected by this is a mutex in astmm.c used when MALLOC_DEBUG is enabled.
Russell Bryant [Mon, 22 Oct 2007 15:43:30 +0000 (15:43 +0000)]
Update the static mutex initializer to include the initialization of
the internal mutex used to protect the lock debugging data.
(closes issue #11044, patch suggested by Ivan)
Joshua Colp [Mon, 22 Oct 2007 14:27:03 +0000 (14:27 +0000)]
Move log message to before the frame it references is freed.
(closes issue #11050)
Reported by: slavon
Patches:
channel.c.86662.diff uploaded by casper (license 55)
Joshua Colp [Fri, 19 Oct 2007 16:38:29 +0000 (16:38 +0000)]
When returning a DTMF digit from ast_control_streamfile cast it as a char so that 0 does not overlap with the success return code.
(closes issue #11023)
Reported by: cfc
Joshua Colp [Fri, 19 Oct 2007 15:33:49 +0000 (15:33 +0000)]
Fix two issues with domains and transfers. If a port was given in the hostname it was treated as part of the hostname. If domains were configured but external domains were not enabled all transfers would be considered remote.
(closes issue #11027)
Reported by: ramonpeek
Patches:
11027-1.diff uploaded by ramonpeek (license 266)
Russell Bryant [Thu, 18 Oct 2007 18:03:10 +0000 (18:03 +0000)]
The channel needs to stay locked while running timer callbacks, as they access
and modify channel data that may change elsewhere. I went through every timer
callback in the source tree to make sure that none of them did any additional
locking that could introduce deadlocks, and all is well.
(closes issue #10765)
Reported by: Ivan
Patches:
ast_1_4_11_svn_patch_channel_rc.diff uploaded by Ivan (license 229)
Mark Michelson [Thu, 18 Oct 2007 17:38:26 +0000 (17:38 +0000)]
If a non-existent file is specified to be played either as a periodic announcement
or as a hold/position announcement, the caller would be kicked out of the queue.
No longer does this happen.
Russell Bryant [Thu, 18 Oct 2007 04:40:52 +0000 (04:40 +0000)]
Revert a change that I made for issue #10979 which, as has been pointed out to
me in issue #11018, doesn't really make sense. There is no reason to have
the base64 decode function force a '\0' terminated buffer, when the result is
almost always binary, anyway. In fact, this caused some breakage, as some code
in res_crypto passed in a buffer exactly the right size to get its binary
result, which got stomped on by this patch.
Mark Michelson [Wed, 17 Oct 2007 21:39:05 +0000 (21:39 +0000)]
Changing the strategy field of the call_queue struct to be signed instead of unsigned,
since the code attempts to set the strategy to -1 if you specify a bogus strategy.
While this isn't a huge issue in 1.4, it could be a problem for someone who, say, tries
to use the roundrobin strategy in trunk (despite all the deprecation warnings in 1.4).
Russell Bryant [Tue, 16 Oct 2007 22:14:36 +0000 (22:14 +0000)]
Some locking errors exposed the fact that the lock debugging code itself was
not thread safe. How ironic! Anyway, these changes ensure that the code that
is accessing the lock debugging data is thread-safe.
Many thanks to Ivan for finding and fixing the core issue here, and also
thanks to those that tested the patch and provided test results.
(closes issue #10571)
(closes issue #10886)
(closes issue #10875)
(might close some others, as well ...)
Patches: (from issue #10571)
ivan_ast_1_4_12_rel_patch_lock.h.diff uploaded by Ivan (license 229)
- a few small changes by me
Mark Michelson [Tue, 16 Oct 2007 21:14:34 +0000 (21:14 +0000)]
Trying to remove a non-dynamic queue member via dynamic means can lead to some
interesting (read nasty) situations. This patch clears up the issue by making
only dynamic queue members removable via dynamic methods.
Russell Bryant [Mon, 15 Oct 2007 20:59:27 +0000 (20:59 +0000)]
Previously, app_queue created a thread to handle every single device state
change. I changed this a while ago in trunk for performance reasons. However,
bug 8407 points out that it is actually a race condition, causing device state
changes to get processed in random order. So, I backported my changes from
trunk to 1.4.
(closes issue #8407, patch provided by tim_ringenbach, committed patch by me)
Russell Bryant [Mon, 15 Oct 2007 19:11:38 +0000 (19:11 +0000)]
The loop in the handler for the "core show locks" could potentially block for
some amount of time. Be a little bit more careful and prepare all of the
output in an intermediary buffer while holding a global resource. Then, after
releasing it, send the output to ast_cli().
Russell Bryant [Mon, 15 Oct 2007 16:54:57 +0000 (16:54 +0000)]
Make the default for the srvlookup option to be yes. It doesn't really make
sense for it to default to off. The default configuration file has it on, and
proper RFC behavior, as indicated by a comment in the code, is for it to be on.
So, let's have it on by default to make lives easier.
(closes issue #10954, suggested by jtodd)
Russell Bryant [Mon, 15 Oct 2007 16:34:13 +0000 (16:34 +0000)]
Make a few changes so that characters in the upper half of the ISO-8859-1
character set don't get stripped when reading configuration.
(closes issue #10982, dandre)
Joshua Colp [Mon, 15 Oct 2007 14:55:04 +0000 (14:55 +0000)]
If Monitor or a spy was added to a P2P or native bridged channel bring the channel back to the generic bridging core so the monitor or spy operations work.
(closes issue #10943)
Reported by: julianjm
Russell Bryant [Sat, 13 Oct 2007 05:48:10 +0000 (05:48 +0000)]
Fix an issue with console verbosity when running asterisk -rx to execute a command
and retrieve its output. The issue was that there was no way for the main Asterisk
process to know that the remote console was connecting in the -rx mode. The way that
James has fixed this is to have all remote consoles muted by default. Then, regular
remote consoles automatically execute a CLI command to unmute themselves when they
first start up.
Joshua Colp [Thu, 11 Oct 2007 15:26:20 +0000 (15:26 +0000)]
When creating a new packet don't try to stop retransmission of it. It was just allocated/created so it's impossible for it to have already been scheduled.
(closes issue #10945)
Reported by: flefoll
Patches:
chan_sip.c.br14.85280.xmit_reliable-patch uploaded by flefoll (license 244)
Russell Bryant [Wed, 10 Oct 2007 15:56:23 +0000 (15:56 +0000)]
I introduced a new member to the ast_filestream struct in 1.4.12, but put it
in the middle of the struct, instead of at the end. One of the Debian folks,
paravoid, pointed out that this breaks binary compatability with modules
compiled against older headers. So, I'm moving the new member to the end
of the struct to resolve the situation.
Joshua Colp [Wed, 10 Oct 2007 14:14:56 +0000 (14:14 +0000)]
Close voicemail message description file if duration did not meet the minimum, or else we will eventually run out of file descriptors.
(closes issue #10918)
Reported by: brak2718
Patches:
vm1.4.12.1.patch uploaded by brak2718 (license 279)
Tilghman Lesher [Tue, 9 Oct 2007 21:55:06 +0000 (21:55 +0000)]
This commit fixes the following issues:
- Deadlock in ast_write (issue #10406)
- Deadlock in ast_read (issue #10406)
- Possible mutex initialization error in lock.h (issue #10571)