Tilghman Lesher [Wed, 23 Jan 2008 04:31:51 +0000 (04:31 +0000)]
When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take
effect).
(closes issue #11809)
Reported by: davetroy
Patches:
fix_externpass.diff uploaded by davetroy (license 384)
Olle Johansson [Tue, 22 Jan 2008 20:56:09 +0000 (20:56 +0000)]
Thanks to Russell's education I realize that BUFSIZ has changed since I learned the C language
over 20 years ago... Resetting chan_sip to the size of BUFSIZ that I expected in my old
head to avoid to heavy memory allocations on some systems.
Tilghman Lesher [Tue, 22 Jan 2008 16:54:06 +0000 (16:54 +0000)]
Ensure that we can get an address even when we don't have a default route.
(closes issue #9225)
Reported by: junky
Patches:
20080122__bug9225.diff.txt uploaded by Corydon76 (license 14)
Tested by: oej, loloski, sergee
Mark Michelson [Mon, 21 Jan 2008 23:55:26 +0000 (23:55 +0000)]
Fixing an issue wherein monitoring local channels was not possible. During a channel
masquerade, the monitors on the two channels involved are swapped. In 99% of the cases
this results in the desired effect. However, if monitoring a local channel, this caused
the monitor which was on the local channel to get moved onto a channel which is immediately
hung up after the masquerade has completed. By swapping the monitors prior to the masquerade,
we avoid the problem by tricking the masquerade into placing the monitor back onto the channel
where we want it.
During the investigation of the issue, the channel's monitor was the only thing that was swapped
in such a manner which did not make sense to have done. All other variable swapping made sense.
Tilghman Lesher [Mon, 21 Jan 2008 18:11:07 +0000 (18:11 +0000)]
Permit the user to specify number of seconds that a connection may remain idle,
which fixes a crash on reconnect with the MyODBC driver.
(closes issue #11798)
Reported by: Corydon76
Patches:
20080119__res_odbc__idlecheck.diff.txt uploaded by Corydon76 (license 14)
Tested by: mvanbaak
Russell Bryant [Sat, 19 Jan 2008 10:05:27 +0000 (10:05 +0000)]
Fix a couple of memory leaks with frame handling. Specifically,
ast_frame_free() needed to be called on the frame that came from the translator
to signed linear.
Russell Bryant [Fri, 18 Jan 2008 21:37:21 +0000 (21:37 +0000)]
Revert adding the packed attribute, as it really doesn't make sense why that
would do any good. Fix the real bug, which is to do the check to see if the
frame came from a translator at the beginning of ast_frame_free(), instead of
at the end. This ensures that it always gets checked, even if none of the
parts of the frame are malloc'd, and also ensures that we aren't looking at
free'd memory in the case that it is a malloc'd frame.
(closes issue #11792, reported by explidous, patched by me)
Russell Bryant [Fri, 18 Jan 2008 21:22:21 +0000 (21:22 +0000)]
Since we're relying on the offset between the frame and the beginning of the translator
pvt struct, set the packed attribute to make sure we get to the right place.
(potential fix for issue #11792)
Terry Wilson [Fri, 18 Jan 2008 17:13:00 +0000 (17:13 +0000)]
This should at least temporarily fix a problem where the 't' Dial
option is incorrectly passed to the transferee when built-in
attended transfers are used. There is still a problem with 'T',
but better to fix some problems than no problems while we work
on it.
Russell Bryant [Thu, 17 Jan 2008 22:37:22 +0000 (22:37 +0000)]
Have IAX2 optimize the codec translation path just like chan_sip does it. If
the caller's codec is in our codec list, move it to the top to avoid transcoding.
Kevin P. Fleming [Thu, 17 Jan 2008 21:31:56 +0000 (21:31 +0000)]
we should only send the Set-Cookie header to the browser on the first response after creating a manager session, not on every response (doing so causes the browser to clear any local cookies it may have associated with the session)
Russell Bryant [Wed, 16 Jan 2008 22:36:24 +0000 (22:36 +0000)]
Add an unused pointer to the ast_channel struct. This makes the ast_channel structure
retain the same size as it had in previous 1.4 releases. Also, all of the offsets for
members in the structure are still the same (except for the two pointers that got replaced
for the new spy/whisper architecture.)
Mark Michelson [Wed, 16 Jan 2008 17:20:11 +0000 (17:20 +0000)]
Fix a deadlock in chan_local in local_hangup. There was contention because
the local_pvt was held and it was attempting to lock a channel, which is the
incorrect locking order.
Joshua Colp [Wed, 16 Jan 2008 15:08:24 +0000 (15:08 +0000)]
Introduce a lock into the dialing API that protects it when destroying the structure.
(closes issue #11687)
Reported by: callguy
Patches:
11687.diff uploaded by file (license 11)
Joshua Colp [Wed, 16 Jan 2008 03:07:24 +0000 (03:07 +0000)]
Don't drop the old record route information when dealing with packets related to a reinvite.
(closes issue #11545)
Reported by: kebl0155
Patches:
reinvite-patch.txt uploaded by kebl0155 (license 356)
Joshua Colp [Wed, 16 Jan 2008 01:13:27 +0000 (01:13 +0000)]
Add autoconf logic for speexdsp. Later versions use a separate library for some things so we need to use it if present in codec_speex.
(closes issue #11693)
Reported by: yzg
Russell Bryant [Tue, 15 Jan 2008 23:50:10 +0000 (23:50 +0000)]
Change a buffer in check_auth() to be a thread local dynamically allocated
buffer, instead of a massive buffer on the stack. This fixes a crash reported
by Qwell due to running out of stack space when building with LOW_MEMORY defined.
On a very related note, the usage of BUFSIZ in various places in chan_sip is
arbitrary and careless. BUFSIZ is a system specific define. On my machine,
it is 8192, but by definition (according to google) could be as small as 256.
So, this buffer in check_auth was 16 kB. We don't even support SIP messages
larger than 4 kB! Further usage of this define should be avoided, unless it
is used in the proper context.
Russell Bryant [Tue, 15 Jan 2008 23:26:52 +0000 (23:26 +0000)]
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 ...
Mark Michelson [Mon, 14 Jan 2008 16:21:28 +0000 (16:21 +0000)]
Adding explicit defaults for missing options to init_queue. This is necessary because
if a user either removes or comments one of these options and reloads their queues, the
option will not reset to its default, instead maintaining the value from prior to the
reload.
Thanks to John Bigelow for pointing this error out to me.
Tilghman Lesher [Sat, 12 Jan 2008 00:05:08 +0000 (00:05 +0000)]
Add a connection timeout attribute, as that was what was intended with the
login timeout, but ODBC divides it up into 2 different timeouts.
(Closes issue #11745)
Joshua Colp [Fri, 11 Jan 2008 19:51:10 +0000 (19:51 +0000)]
If the incoming RTP stream changes codec force the bridge to break if the other side does not support it.
(closes issue #11729)
Reported by: tsearle
Patches:
new_codec_patch_udiff.patch uploaded by tsearle (license 373)
Joshua Colp [Fri, 11 Jan 2008 19:28:30 +0000 (19:28 +0000)]
If the channel is hungup during RECORD FILE send a result code of -1 to be uniform with everything else.
(closes issue #11743)
Reported by: davevg
Patches:
res_agi.diff uploaded by davevg (license 209)
Russell Bryant [Fri, 11 Jan 2008 18:25:30 +0000 (18:25 +0000)]
Backport the ability to set the ToS bits on Linux when not running as root.
Normally, we would not backport features into 1.4, but, I was convinced by the
justification supplied by the supplier of this patch. He pointed out that this
patch removes a requirement for running as root, thus reducing the potential
impacts of security issues.
Joshua Colp [Fri, 11 Jan 2008 17:22:53 +0000 (17:22 +0000)]
Ensure the return value of ast_bridge_call is passed back up as the application return value. This is needed for transfers to function so the PBX core knows to continue execution.
(closes issue #10327)
Reported by: kkiely
Tilghman Lesher [Thu, 10 Jan 2008 23:08:36 +0000 (23:08 +0000)]
1) When we get a translated frame out, clone it, because if the
translator pvt is freed before we use the frame, bad things happen.
2) Getting a failure from ast_sched_delete means that the schedule
ID is currently running. Don't just ignore it.
(Closes issue #11698)
Steve Murphy [Thu, 10 Jan 2008 21:37:10 +0000 (21:37 +0000)]
Applied the same fixes for ael.flex as was done in 97849 for ast_expr2.fl; overrode the normally generate yyfree func with our own version that checks the pointer for non-null before passing to free(). Also takes care of a little problem with 2.5.33 and the use of the __STDC_VERSION__ macro.
Steve Murphy [Thu, 10 Jan 2008 20:21:27 +0000 (20:21 +0000)]
This is a fix for 2 things: a problem Terry was having in OSX with null pointers, which was my fault, as I probably forgot to run the sed script last time I made mods. So, I moved the fix into the flex input itself. Then, I found when I used flex 2.5.33, that it was using __STDC_VERSION__, and that's not real good; so I added back in a DIFFERENT sed script to fix that little mess. Tested everything, a couple different ways. Hope I did no harm, at the least.
Joshua Colp [Thu, 10 Jan 2008 15:07:12 +0000 (15:07 +0000)]
Don't try to copy the category from the group if no category exists.
(closes issue #11724)
Reported by: IgorG
Patches:
group_count.v1.patch uploaded by IgorG (license 20)
Philippe Sultan [Wed, 9 Jan 2008 16:44:24 +0000 (16:44 +0000)]
Set the caller id within the gtalk_alloc function.
As underlined in issue #10437 by Josh, we need to prevent a possible
memory leak. We only set the name part of the caller id, the number
part is not relevant when dealing with JIDs.
Joshua Colp [Wed, 9 Jan 2008 16:11:17 +0000 (16:11 +0000)]
Don't do conferencing totally in Zaptel if Monitor is running on the channel.
(closes issue #11709)
Reported by: BigJimmy
Patches:
patch-meetmerec uploaded by BigJimmy (license 371)
Tilghman Lesher [Wed, 9 Jan 2008 00:44:14 +0000 (00:44 +0000)]
Allow filename completion on zero-length modules, remove a memory leak, remove
a file descriptor leak, and make filename completion thread-safe.
Patched and tested by tilghman.
(Closes issue #11681)
Mark Michelson [Tue, 8 Jan 2008 23:49:11 +0000 (23:49 +0000)]
Part 1 of N of adding doxygen comments to app_queue. I picked some of the most common functions
used (which also happen to be some the biggest/ugliest functions too) to document first. I'm pretty
new to doxygen so criticism is welcome.
Mark Michelson [Tue, 8 Jan 2008 20:42:07 +0000 (20:42 +0000)]
Making some changes designed to not allow for a corrupted mailstream for a vm_state.
1. Add locking to the vm_state retrieval functions so that no linked list corruption occurs.
2. Make sure to always grab the persistent vm_state when mailstream access is necessary.
3. Correct an incorrect return value in the init_mailstream function.
Joshua Colp [Tue, 8 Jan 2008 19:53:52 +0000 (19:53 +0000)]
If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue #11077)
Reported by: m4him
Tilghman Lesher [Fri, 4 Jan 2008 23:03:40 +0000 (23:03 +0000)]
Fix the problem of notification of a device state change to a device with a '-'
in the name. Could probably do with a better fix in trunk, but this bug has
been open way too long without a better solution.
Reported by: stevedavies
Patch by: tilghman
(Closes issue #9668)
Mark Michelson [Wed, 2 Jan 2008 23:46:02 +0000 (23:46 +0000)]
We need to reset the membername to NULL on each iteration of this loop, otherwise the result is that
multiple members can have the same name, since the variable was not reset on each iteration of the loop.