tomorrow's tomorrow is the day after tomorrow, so who cares if you
recycle anyway?
If this confuses you, that's nothing compared to what this fixes. ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.
While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
about possible deadlocks. Instead just print the intended single message every
five seconds.
(closes issue 11537, reported and patched by dimas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
the mutex attribute object marked as static. This means that multiple threads
initializing locks at the same time could step on each other and end up with
improperly initialized locks.
(found when tracking down locking issues related to issue #11080)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
ironic as it gets in Asterisk programming land. Anyway, I spotted this bug while
trying to track down why systems are locking up and acting weird in issue #11080.
The mutex attribute object was marked as static in this function when it should
not have been.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
against older Asterisk 1.4 headers will now load properly with just a warning
indicating that they are old and may cause problems.
(patch by paravoid)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
It turns out that the problem was the Mac version of the ast_atomic_fetchadd_int()
function. The Mac atomic add function returns the _new_ value, while this function
is supposed to return the old value. So, the crashes happened on unreferencing
objects. If the reference count was decreased to 1, ao2_ref() thought that it
had been decreased to zero, and called the destructor. However, there was still
an outstanding reference around.
(closes issue #11176)
(closes issue #11289)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
compiler is being used, then a warning will show up for any modules still using
the old name "private" instead of "_private".
(patch suggested by paravoid)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop.
This is accomplished by creating a datastore on the calling channel which has a linked list of all devices
dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this
progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply
be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore
is detached from the channel and destroyed.
This change also introduces some side effects to the code which I shall enumerate here:
1. Datastore inheritance has been backported from trunk into 1.4
2. A large chunk of code has been removed from app_dial. This chunk is the section of code
which handles the call forward case after the channel has been requested but before it has
been called. This was removed because call-forwarding still works fine without it, it makes the
code less error-prone should it need changing, and it made this set of changes much less painful
to just have the forwarding handled in one place in each module.
3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore
which is attached to the channel may be created and attached in either app_dial or app_queue, so they
need a common place to find the datastore info. This approach was taken in case similar datastores are
needed in the future, there will be a common place to add them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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/branches/1.4@90348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The ast_set_callerid() function needed to lock the channel. Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
codec that we don't know, Asterisk did not remove that codec from the list.
With this patch, we remove the codec from audio and video rtp objects and
deny it ever existed. Thanks to lasse for testing.
(closes issue #11376)
Reported by: lasse
Patches:
bug11376.txt uploaded by oej (license 306)
Tested by: lasse
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
a backslash. Unfortunately, this does not universally work on all databases,
since on databases which natively use the backslash as a delimiter, the
backslash itself needs to be delimited, but on other databases that have no
delimiter, backslashing the backslash causes an error.
So the only solution that I can come up with is to create an option in res_odbc
that explicitly specifies whether or not backslash is a native delimiter. If
it is, we use it natively; if not, we use the ESCAPE clause to make it one.
Reported by: elguero
Patch by: tilghman
(Closes issue #11364)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
what build options were used. We agreed that we should remove this before
making a 1.4 release, and then we can put it back in. Then, we can take a
month or so to play around with it to get it how we want it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
versions of the lock routines. These are incorrect for a number of reasons:
- It breaks the build on mac.
- If there is a problem with locks not getting initialized, then the proper
fix is to find that place and fix the code so that it does get initialized.
- If additional debug code is needed to help find the problem areas, then this
type of things should _only_ be put in the DEBUG_THREADS wrappers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
ways that channel variables are handled. In general, they were not handled in
a thread-safe way. The channel _must_ be locked when reading or writing from/to
the channel variable list.
What I have done to improve this situation is to make pbx_builtin_setvar_helper()
and friends lock the channel when doing their thing. Asterisk API calls almost
all lock the channel for you as necessary, but this family of functions did not.
(closes issue #10923, reported by atis)
(closes issue #11159, reported by 850t)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Previously, the SRV record support in Asterisk was broken. There was no
guarantee on what record Asterisk would choose to actually use. This set of
changes improves the situation by ensuring that Asterisk will choose the
highest priority record.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
and ast_string_field_free_all to ast_string_field_reset_all
to avoid misuse (due to too similar names and an error in
documentation). Fix two related memory leaks in app_meetme.
No need to merge to trunk, different fix already applied there.
Not applicable to 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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.
(closes issue #11044)
Reported by: ys
Patches:
lock.h.diff uploaded by ys (license 281)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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.
(closes issue #10847)
Reported by: atis
Patches:
asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
CLI command at once for a remote console.
(closes issue #10888)
Reported by: jamesgolovich
Patches:
asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85316 65c4cc65-6c06-0410-ace0-fbb531ad65f3