Mark Michelson [Tue, 18 Sep 2007 20:09:02 +0000 (20:09 +0000)]
Moving the logic for handling an empty membername to the create_member function so that there is a common place
where this occurs instead of being spread out to several different places.
Russell Bryant [Tue, 18 Sep 2007 16:31:01 +0000 (16:31 +0000)]
When copying the contents from the wildcard peer, do a deep copy instead of
shallow copy so that it doesn't crash when beging destroyed.
(closes issue #10546, patch by me)
Russell Bryant [Mon, 17 Sep 2007 20:16:25 +0000 (20:16 +0000)]
Put a memset in ast_localtime() instead of a couple places in app_voicemail
to prevent the problem everywhere instead of just a couple of places.
(related to issue #10746)
Russell Bryant [Mon, 17 Sep 2007 20:00:32 +0000 (20:00 +0000)]
Initialize some memory to fix crashes when leaving voicemail. This problem
was fixed by running Asterisk under valgrind.
(closes issue #10746, reported by arcivanov, patched by me)
*** IMPORTANT NOTE: We need to check to see if this same bug exists elsewhere.
Russell Bryant [Mon, 17 Sep 2007 16:46:59 +0000 (16:46 +0000)]
Handle the case where there are multiple dynamic features with the same digit
mapping, but won't always match the activated on/by access controls. In that
case, the code needs to keep trying features for a match.
(reported by Atis on the asterisk-dev list, patched by me)
Steve Murphy [Fri, 14 Sep 2007 21:19:27 +0000 (21:19 +0000)]
closes issue #10668; thanks to arkadia for his patch; had to leave out the bit about ending the previous cdr in the fork; it would destroy current implementations.
Russell Bryant [Fri, 14 Sep 2007 15:42:42 +0000 (15:42 +0000)]
Remove chan_usbradio from the main 1.4 branch. It can't live here because we
have a strict policy to not include new features in release branches. However,
I'm going to merge it into trunk, and I also have a special 1.4 based branch that
includes this module.
svn co http://svn.digium.com/svn/asterisk/team/jdixon/chan_usbradio-1.4
Jason Parker [Thu, 13 Sep 2007 20:11:40 +0000 (20:11 +0000)]
Fix a crash that could occur in cdr_csv when mutliple threads tried to close the same file.
Do we actually need the locking here? What happens if you open the same file twice, and
two threads try to write to it at the same time? Is fputs() going to write out the entire
line at once? I suspect that it could be possible for the second fopen to run during the
first fputs, so the position could be in the middle of the previously written line...
Issue 10347, initial patch by explidous (but I removed all of the paranoia stuff..)
Russell Bryant [Thu, 13 Sep 2007 18:45:59 +0000 (18:45 +0000)]
Only compile in tracking astobj2 statistics if dev-mode is enabled. Also, when
dev mode is enabled, register the CLI command that can be used to run the astobj2
test and print out statistics.
Mark Michelson [Thu, 13 Sep 2007 16:25:59 +0000 (16:25 +0000)]
Added logic to handle the unlikely case that someone has two queues with the same name.
Asterisk will log a warning message letting the user know that one was already defined with that
name and is it skipping all further instances. This also will work for realtime queues but in order
for that to happen, the user would have to trigger a perfectly timed reload as a realtime queue is being
looked up, which is highly unlikely (but taken care of nonetheless).
Working on issue #10531 exposed a rather nasty 64-bit issue on ast_mktime, so we
updated the localtime.c file from source. Next we'll have to write ast_strptime
to match.
Mark Michelson [Wed, 12 Sep 2007 14:24:53 +0000 (14:24 +0000)]
We should only initialize a realtime queue when it is allocated, not every time we access it. This prevents the members ao2_container
from being reallocated every time the queue is accessed.
I also removed a debug message I had accidentally left in on a previous commit.
Russell Bryant [Tue, 11 Sep 2007 20:49:34 +0000 (20:49 +0000)]
Fix another missing unref of member objects. This one was pointed out by Marta.
When building the outgoing list in try_calling(), a member reference is stored
in each outgoing entry. However, when this list got destroyed, the reference
was not released.
Steve Murphy [Tue, 11 Sep 2007 20:36:15 +0000 (20:36 +0000)]
this change should fix issue # 10659 -- what I worry about is how many other bug reports it may generate. Hopefully, we can please the/a majority. Hopefully. We shall see. Calls not marked ANSWERED and with only one channel name will not be posted. This should eliminate the double CDR's.
Mark Michelson [Tue, 11 Sep 2007 16:05:56 +0000 (16:05 +0000)]
All instances of ao2_iterators which were just named 'i' have been renamed
to 'mem_iter' so that when refcounted queues are merged into trunk, there will be
little confusion regarding iterator names, especially when a queue and member iterator
are used in the same function.
Russell Bryant [Tue, 11 Sep 2007 16:03:42 +0000 (16:03 +0000)]
The sample dundi.conf claims support for a wildcard peer entry - [*], but the
code did not support it. This patch makes it work.
(closes issue #10546, patch by dds, with some changes by me)
Russell Bryant [Sat, 8 Sep 2007 13:42:26 +0000 (13:42 +0000)]
(closes issue #10672)
Bump the cleancount so that a "make clean" will be forced. This is needed
because my fix in revision 81599 made a change to a data structure in file.h,
and since file dependency tracking is only on with dev-mode enabled, file
format modules that don't get rebuilt may crash, as is the case with this issue.
This makes me wonder - how much faster does the code build without the file
dependency tracking enabled? If it doesn't make much of a difference, then it
may be worth just keeping it on all of the time, or perhaps just not in release
tarballs, so that this type of issue is avoided.
Russell Bryant [Thu, 6 Sep 2007 22:28:57 +0000 (22:28 +0000)]
(closes issue #9724, closes issue #10374)
Reported by: kenw
Patches:
9724.txt uploaded by russell (license 2)
Tested by: kenw, russell
Resolve a deadlock that occurs when doing a SIP transfer to parking.
I come across this type of deadlock fairly often it seems. It is very important
to mind the boundary between the channel driver and the core in respect to the
channel lock and the channel-pvt lock. Channel drivers lock to lock the
pvt and then the channel once it calls into the core, while the core will do
it in the opposite order. The way this is avoided is by having channel drivers
either release their pvt lock while calling into the core, or such as in this
case, unlocking the pvt just long enough to acquire the channel lock.
(closes issue #10122)
Reported by: stevefeinstein
Patches:
meetme-unmute-manager.diff uploaded by qwell (license 4)
Tested by: stevefeinstein
After looking over the code I agree with Qwell. Setting the file descriptor to conference each time just causes a fight back and forth.
Russell Bryant [Wed, 5 Sep 2007 20:53:41 +0000 (20:53 +0000)]
Fix an issue that can occur when you do an attended transfer to parking. If
you complete the transfer before the announcement of the parking spot finishes,
then the channel being parked will hear the remainder of the announcement.
These changes make it so that will not happen anymore.
Basically, res_features sets a flag on the channel is playing the announcement
to so that the file streaming core knows that it needs to watch out for a
channel masquerade, and if it occurs, to abort the announcement.
Russell Bryant [Tue, 4 Sep 2007 18:37:44 +0000 (18:37 +0000)]
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.
there is no point in sending 401 Unauthorized to a UAS that sent us a properly-formatted Authentication header with the expected username and nonce but an incorrect response (which indicates the shared secret does not match)... instead, let's send 403 Forbidden so that the UAS doesn't retry with the same authentication credentials repeatedly
(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.
(closes issue #10610)
Reported by: john
Patches:
dns.c.patch uploaded by john (license 218)
Tested by: mvanbaak
Don't return a match if no SRV record actually exists.
Russell Bryant [Mon, 3 Sep 2007 18:57:53 +0000 (18:57 +0000)]
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)
Mark Michelson [Fri, 31 Aug 2007 19:48:55 +0000 (19:48 +0000)]
Fixed broken behavior of a reload on realtime queues. Prior to this patch, if a reload was issued and
a realtime queue had callers waiting in it, then the queue would be removed from the queue list, but it would
not actually be freed (in fact, a debug message warning about a memory leak would come up). With this patch,
reloads do not touch realtime queues at all.
Joshua Colp [Thu, 30 Aug 2007 23:53:41 +0000 (23:53 +0000)]
(closes issue #10009)
Reported by: dimas
Don't output a bridge failed warning message if it failed because one of the channels was part of the masquerade process. That is perfectly normal.
Mark Michelson [Thu, 30 Aug 2007 22:05:56 +0000 (22:05 +0000)]
Removing an extraneous (and possibly misleading) log message. Firstly, if the announce file isn't found, the
streaming functions will report it. Secondly, not all non-zero returns from play_file mean that the announce file
wasn't found. Positive return values simply mean that a digit was pressed (most likely to skip through the announcement).
(closes issue #10612, reported and patched by dimas)
Joshua Colp [Thu, 30 Aug 2007 21:23:50 +0000 (21:23 +0000)]
(closes issue #10514)
Reported by: casper
Patches:
chan_sip.c.80129.diff uploaded by casper (license 55)
Remove needless check for AUTH_UNKNOWN_DOMAIN. It was impossible for it to ever be that value.
Steve Murphy [Thu, 30 Aug 2007 21:11:48 +0000 (21:11 +0000)]
via issue 10599, where 'CDR already initialized' messages are being generated. Since all channels will have an init'd CDR attached at creation time, this message is now particularly useless. Removed.
Joshua Colp [Thu, 30 Aug 2007 14:53:43 +0000 (14:53 +0000)]
(closes issue #10603)
Reported by: jmls
Patches:
pbx.diff uploaded by jmls (license 141)
Backport changes from 81372. Add REASON dialplan variable for when an originated call fails and the failed extension is executed.
Fixed a severe issue where a misdn_read would lock the channel, but read would
not return because it blocks. later chan_misdn would try to queue a frame like
a AST_CONTROL_ANSWER which could result in a deadlock situation. misdn_read
will now not block forever anymore, and we don't queue the ANSWER frame at all
when we already was called with misdn_answer -> answer would be called twice.
Also we don't explicitly send a RELEASE_COMPLETE on receiption of a RELEASE
anymore, because mISDN does that for us, this resulted in a problem on some
switches, which would block our port after some calls for a short while.