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)
Joshua Colp [Mon, 8 Oct 2007 15:03:07 +0000 (15:03 +0000)]
Don't keep trying to native bridge if either of the channels are involved in a masquerade operation to be done.
(closes issue #10696)
Reported by: tbelder
Russell Bryant [Mon, 8 Oct 2007 03:28:34 +0000 (03:28 +0000)]
Enable file dependency tracking for _all_ builds, and not just for builds with
dev-mode enabled. I have seen enough problems caused by this that I don't think
it's worth keeping. I want to continue to encourage anybody that is interested
to continue to run Asterisk from svn. Furthermore, I do not want their systems
to break when we change a structure definition in a header file. :)
Philippe Sultan [Sun, 7 Oct 2007 16:15:39 +0000 (16:15 +0000)]
Presence packets from a client who's connected with our Jabber ID are
valid, therefore, those clients must be considered as buddies. The resource
string helps us make the distinction between clients.
Joshua Colp [Fri, 5 Oct 2007 18:55:36 +0000 (18:55 +0000)]
Update the remembered RTP peer information when putting an endpoint on hold or taking it off hold so that the RTP stack does not initiate a needless reinvite.
(closes issue #10868)
Reported by: mavince
Russell Bryant [Fri, 5 Oct 2007 16:44:21 +0000 (16:44 +0000)]
Do deadlock avoidance in a couple more places. You can't lock two channels
at the same time without doing extra work to make sure it succeeds.
(closes issue #10895, patch by me)
Steve Murphy [Wed, 3 Oct 2007 18:20:07 +0000 (18:20 +0000)]
closes issue #10870 ; where a CUT() function call in a switch expr doesn't execute correctly, because the commas in the function args are not converted to vertbars before the func is called. I modified just the switch code to convert the commas to vertbars if there, but if more of these sort of probs are found, I may have to resort to something a little more fundamental. We'll see, I guess.
Steve Murphy [Wed, 3 Oct 2007 14:23:00 +0000 (14:23 +0000)]
closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
Russell Bryant [Tue, 2 Oct 2007 20:06:07 +0000 (20:06 +0000)]
* Don't build the menuselect-tree for the tarball, as it requires running the
configure script first
* Change the Makefile to note that menuselect-tree depends on the configure
script.
Russell Bryant [Tue, 2 Oct 2007 14:12:35 +0000 (14:12 +0000)]
Use snprintf instead of sprintf in one place. There is no vulnerability here
due to various buffer sizes around the code, but I still didn't like seeing a
non length-limited copy of data coming off of the wire into a stack buffer, as
this would be a problem in the future if buffer sizes elsewhere got changed or
size limitations removed ...
Russell Bryant [Mon, 1 Oct 2007 21:07:06 +0000 (21:07 +0000)]
Fulfull a feature request from Qwell on the "core show locks" output. It will
now note the lock type for each lock that a thread holds.
(mutex, rdlock, or wrlock)
Steve Murphy [Mon, 1 Oct 2007 20:27:52 +0000 (20:27 +0000)]
closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree.
Russell Bryant [Mon, 1 Oct 2007 19:56:28 +0000 (19:56 +0000)]
Add another sanity check in the AGI read loop. We really don't care about
EAGAIN unless we didn't read an entire line. If there is a newline at the
end if the read buffer, break, because we got the whole thing.
(reported and patched by bmd)
Joshua Colp [Mon, 1 Oct 2007 13:57:42 +0000 (13:57 +0000)]
Fix randomness. save_pos was being set to 0 initially instead of -1, causing it to jump to position 0 when moh started.
(closes issue #10859)
Reported by: jamesgolovich
Patches:
asterisk-mohpos2.diff.txt uploaded by jamesgolovich (license 176)
Steve Murphy [Sat, 29 Sep 2007 21:47:53 +0000 (21:47 +0000)]
This issue sort of closes 10786; All config files support #include with globbing (you know, *,[chars],?,{list,list},etc), so I've updated the AEL system to support this also.
Russell Bryant [Wed, 26 Sep 2007 21:15:15 +0000 (21:15 +0000)]
Add a log message that was requested by the masses in the developer tutorial
session at Astricon. chan_sip did not output any message when a call was
rejected because the extension was not found. This adds a verbose message
(at verbose level 3) to note when this happens.