A huge thanks go to lvl- for patiently providing the necessary valgrind output
that was necessary to finding this problem of memory corruption.
Reported by: lvl-
Patch by: tilghman
Closes issue #11174
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
interesting (read nasty) situations. This patch clears up the issue by making
only dynamic queue members removable via dynamic methods.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
from being reallocated every time the queue is accessed.
I also removed a debug message I had accidentally left in on a previous commit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes in the realtime engine.
(issue #10424, reported by irroot, patch by me)
This patch creates a new function called update_realtime_member_field, which is a generic
function which will allow any one field of a realtime queue member to be updated. This patch
only uses this function to update the paused status of a queue member, but it lays the foundation
for persisting the state of a realtime member the same way that static members' state is maintained
when using the persistentmembers setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
(closes issue 10541, reported by Alric, patched by me)
The REALLY nice things about this patch is that queue members now have a "realtime" field
which will be true if the member is a realtime member. This means we can check this value
prior to certain processing if it should ONLY be done for realtime members.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
locked, and then each individual queue is locked. Under the right circumstances, this could deadlock. As such, I have unlocked
the individual queue before locking the queue list, and then locked the queue back after the queue list is unlocked.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
thinking the 'n' option was in use.
(closes issue #10320, reported by jfitzgibbon, patched by me, tested by blitzrage and me)
Thank you blitzrage for all the testing you've done lately with queues! It's much appreciated!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This fixes an issue where if a caller calls into a queue where no one is logged in, they would wait forever even if a member
logged in at some point.
(closes issue #10346, reported by and tested by blitzrage, patched by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This makes it so that the 'n' option for Queue() can act properly depending on which strategy is used. If the strategy is
roundrobin, rrmemory, or ringall, we want to ring each phone once before moving on in the dialplan. However, if any other strategy is
used, we will only ring one phone since it cannot be guaranteed that a different phone will ring on subsequent attempts to ring a phone.
As a side effect of this, the QUEUE_MEMBER_COUNT dialplan function now just reads the membercount variable instead of traversing through
the member list to figure out how many members there are.
Special thanks to blitzrage for helping to test this out.
(closes issue #10127, reported by bcnit, patched by me, tested by blitzrage)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
but now includes all of the following changes:
1. Simplifying the code to handle positive return values from ast API calls.
2. Removing the background_file function.
3. The fix for issue #10008
(closes issue #10008, reported and patched by dimas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r74427 | qwell | 2007-07-10 14:57:20 -0500 (Tue, 10 Jul 2007) | 6 lines
Fix an issue where it was possible to have a service level of over 100%
Between the time recalc_holdtime and update_queue was called, it was possible that the call could have been hungup.
Move both additions to the same place, so this won't happen.
Issue 10158, initial patch by makoto, modified by me.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
queue show and then press tab, you can continue pressing tab and it will keep auto-completing
queue names even though only 1 queue can be used as an argument.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@73400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
unregister its device state monitoring callback in unload_module(). So, this
would make Asterisk crash on the first device state change after you
unload the module.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@64868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Post a warning to the console that things might possibly be misconfigured when queue member's states are still 'Not in Use' when we're about to bridge them with a caller from queue. Also, put some documentation quoted from oej's queues.txt efforts started in /trunk today.
This commit puts #7433 into feedback state for 1.4, and pending no further negative feedback, it will finally be closed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r43897 | bweschke | 2006-09-28 12:37:15 -0400 (Thu, 28 Sep 2006) | 3 lines
app_queue is comparing the device names incorrectly while checking their statuses. It's internal list of interfaces includes the dial string, while the argument passed to this function does not have the dial string (/n for a local channel). This causes it to ignore the device state changes because it thinks it belongs to none of its members. (#8040 reported and patch by tim_ringenbach)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Add option to the various methods of adding a queue member, to add the "member name".
Member name is used in (most) queue log records, in place of the interface name.
This makes it consistent, so that you can log in from any device, and still be logged as "member name"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it
had a non static function when it should.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3