[asterisk-commits] irroot: branch irroot/patches r336153 - /team/irroot/patches/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 15 12:00:28 CDT 2011
Author: irroot
Date: Thu Sep 15 12:00:26 2011
New Revision: 336153
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=336153
Log:
Review board 1402 app_queue deadlock is commited
there is a segfault in chan_agent added to 1.8.7
Modified:
team/irroot/patches/distrotech-1.8.7.patch
team/irroot/patches/distrotech-1.8.patch
team/irroot/patches/distrotech-10.patch
team/irroot/patches/distrotech-trunk.patch
Modified: team/irroot/patches/distrotech-1.8.7.patch
URL: http://svnview.digium.com/svn/asterisk/team/irroot/patches/distrotech-1.8.7.patch?view=diff&rev=336153&r1=336152&r2=336153
==============================================================================
--- team/irroot/patches/distrotech-1.8.7.patch (original)
+++ team/irroot/patches/distrotech-1.8.7.patch Thu Sep 15 12:00:26 2011
@@ -407,6 +407,35 @@
return FALSE;
}
+Index: channels/chan_agent.c
+===================================================================
+--- channels/chan_agent.c (revision 335128)
++++ channels/chan_agent.c (working copy)
+@@ -1506,6 +1506,7 @@
+ char *talkingto = NULL;
+ char *talkingtoChan = NULL;
+ char *status = NULL;
++ struct ast_channel *bridge;
+
+ if (!ast_strlen_zero(id))
+ snprintf(idText, sizeof(idText) ,"ActionID: %s\r\n", id);
+@@ -1530,10 +1531,13 @@
+ if (p->owner && p->owner->_bridge) {
+ talkingto = S_COR(p->chan->caller.id.number.valid,
+ p->chan->caller.id.number.str, "n/a");
+- if (ast_bridged_channel(p->owner))
+- talkingtoChan = ast_strdupa(ast_bridged_channel(p->owner)->name);
+- else
++ ast_channel_lock(p->owner);
++ if ((bridge = ast_bridged_channel(p->owner))) {
++ talkingtoChan = ast_strdupa(bridge->name);
++ } else {
+ talkingtoChan = "n/a";
++ }
++ ast_channel_unlock(p->owner);
+ status = "AGENT_ONCALL";
+ } else {
+ talkingto = "n/a";
Index: channels/chan_misdn.c
===================================================================
--- channels/chan_misdn.c (revision 335128)
@@ -1182,6 +1211,15 @@
tmp->stillgoing = 0;
ao2_lock(qe->parent);
+@@ -3301,7 +3366,7 @@
+ return 0;
+ }
+
+-/*! \brief Playback announcement to queued members if peroid has elapsed */
++/*! \brief Playback announcement to queued members if period has elapsed */
+ static int say_periodic_announcement(struct queue_ent *qe, int ringing)
+ {
+ int res = 0;
@@ -3406,6 +3471,18 @@
}
ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
@@ -1727,21 +1765,17 @@
}
/*! \brief reload information pertaining to a single member
-@@ -6808,9 +6996,6 @@
- return -1;
- }
-
-- /* We've made it here, so it looks like we're doing operations on all queues. */
-- ao2_lock(queues);
+@@ -6810,7 +6998,7 @@
+
+ /* We've made it here, so it looks like we're doing operations on all queues. */
+ ao2_lock(queues);
-
++
/* Mark all queues as dead for the moment if we're reloading queues.
* For clarity, we could just be reloading members, in which case we don't want to mess
* with the other queue parameters at all*/
-@@ -6834,10 +7019,9 @@
- if (queue_reload) {
- ao2_callback(queues, OBJ_NODATA | OBJ_MULTIPLE | OBJ_UNLINK, kill_dead_queues, (char *) queuename);
- }
-- ao2_unlock(queues);
+@@ -6837,12 +7025,12 @@
+ ao2_unlock(queues);
return 0;
}
-
@@ -1749,7 +1783,13 @@
/*! \brief Facilitates resetting statistics for a queue
*
* This function actually does not reset any statistics, but
-@@ -6992,7 +7176,11 @@
+ * rather finds a call_queue struct which corresponds to the
+- * passed-in queue name and passes that structure to the
++ * passed-in queue name and passes that structure to the
+ * clear_queue function. If no queuename is passed in, then
+ * all queues will have their statistics reset.
+ *
+@@ -6992,7 +7180,11 @@
while ((mem = ao2_iterator_next(&mem_iter))) {
ast_str_set(&out, 0, " %s", mem->membername);
if (strcasecmp(mem->membername, mem->interface)) {
@@ -1762,16 +1802,7 @@
}
if (mem->penalty)
ast_str_append(&out, 0, " with penalty %d", mem->penalty);
-@@ -7030,7 +7218,7 @@
- queue_t_unref(q, "Done with iterator"); /* Unref the iterator's reference */
- }
- ao2_iterator_destroy(&queue_iter);
-- ao2_unlock(queues);
-+ ao2_lock(queues);
- if (!found) {
- if (argc == 3)
- ast_str_set(&out, 0, "No such queue: %s.", argv[2]);
-@@ -7260,6 +7448,7 @@
+@@ -7260,6 +7452,7 @@
"Queue: %s\r\n"
"Name: %s\r\n"
"Location: %s\r\n"
@@ -1779,7 +1810,7 @@
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
-@@ -7268,7 +7457,7 @@
+@@ -7268,7 +7461,7 @@
"Paused: %d\r\n"
"%s"
"\r\n",
@@ -1788,7 +1819,7 @@
mem->penalty, mem->calls, (int)mem->lastcall, mem->status, mem->paused, idText);
}
ao2_ref(mem, -1);
-@@ -7344,7 +7533,11 @@
+@@ -7344,7 +7537,11 @@
switch (add_to_queue(queuename, interface, membername, penalty, paused, queue_persistent_members, state_interface)) {
case RES_OKAY:
@@ -1801,7 +1832,7 @@
astman_send_ack(s, m, "Added interface to queue");
break;
case RES_EXISTS:
-@@ -7364,6 +7557,7 @@
+@@ -7364,6 +7561,7 @@
static int manager_remove_queue_member(struct mansession *s, const struct message *m)
{
const char *queuename, *interface;
@@ -1809,7 +1840,7 @@
queuename = astman_get_header(m, "Queue");
interface = astman_get_header(m, "Interface");
-@@ -7373,9 +7567,17 @@
+@@ -7373,9 +7571,17 @@
return 0;
}
@@ -1828,7 +1859,7 @@
astman_send_ack(s, m, "Removed interface from queue");
break;
case RES_EXISTS:
-@@ -7597,7 +7799,11 @@
+@@ -7597,7 +7803,11 @@
switch (add_to_queue(queuename, interface, membername, penalty, 0, queue_persistent_members, state_interface)) {
case RES_OKAY:
@@ -1841,7 +1872,7 @@
ast_cli(a->fd, "Added interface '%s' to queue '%s'\n", interface, queuename);
return CLI_SUCCESS;
case RES_EXISTS:
-@@ -7665,11 +7871,12 @@
+@@ -7665,11 +7875,12 @@
static char *handle_queue_remove_member(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
const char *queuename, *interface;
@@ -1855,7 +1886,7 @@
"Usage: queue remove member <channel> from <queue>\n"
" Remove a specific channel from a queue.\n";
return NULL;
-@@ -7686,10 +7893,18 @@
+@@ -7686,10 +7897,18 @@
queuename = a->argv[5];
interface = a->argv[3];
@@ -1876,7 +1907,7 @@
return CLI_SUCCESS;
case RES_EXISTS:
ast_cli(a->fd, "Unable to remove interface '%s' from queue '%s': Not there\n", interface, queuename);
-@@ -8412,6 +8627,26 @@
+@@ -8412,6 +8631,26 @@
return 0;
}
Modified: team/irroot/patches/distrotech-1.8.patch
URL: http://svnview.digium.com/svn/asterisk/team/irroot/patches/distrotech-1.8.patch?view=diff&rev=336153&r1=336152&r2=336153
==============================================================================
--- team/irroot/patches/distrotech-1.8.patch (original)
+++ team/irroot/patches/distrotech-1.8.patch Thu Sep 15 12:00:26 2011
@@ -1,7 +1,7 @@
Index: channels/chan_sip.c
===================================================================
---- channels/chan_sip.c (.../branches/1.8) (revision 335789)
-+++ channels/chan_sip.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/chan_sip.c (.../branches/1.8) (revision 336096)
++++ channels/chan_sip.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -4316,6 +4316,9 @@
case T38_ENABLED:
state = T38_STATE_NEGOTIATED;
@@ -405,8 +405,8 @@
Index: channels/chan_misdn.c
===================================================================
---- channels/chan_misdn.c (.../branches/1.8) (revision 335789)
-+++ channels/chan_misdn.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/chan_misdn.c (.../branches/1.8) (revision 336096)
++++ channels/chan_misdn.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -7884,64 +7884,63 @@
}
@@ -520,8 +520,8 @@
port = misdn_cfg_get_next_port(port)) {
Index: channels/sip/include/sip.h
===================================================================
---- channels/sip/include/sip.h (.../branches/1.8) (revision 335789)
-+++ channels/sip/include/sip.h (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/sip/include/sip.h (.../branches/1.8) (revision 336096)
++++ channels/sip/include/sip.h (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -352,9 +352,11 @@
@@ -555,8 +555,8 @@
Index: channels/sip/include/sdp_crypto.h
===================================================================
---- channels/sip/include/sdp_crypto.h (.../branches/1.8) (revision 335789)
-+++ channels/sip/include/sdp_crypto.h (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/sip/include/sdp_crypto.h (.../branches/1.8) (revision 336096)
++++ channels/sip/include/sdp_crypto.h (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -31,6 +31,7 @@
#include <asterisk/rtp_engine.h>
@@ -590,8 +590,8 @@
/*! \brief Return the a_crypto value of the sdp_crypto struct
Index: channels/sip/include/srtp.h
===================================================================
---- channels/sip/include/srtp.h (.../branches/1.8) (revision 335789)
-+++ channels/sip/include/srtp.h (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/sip/include/srtp.h (.../branches/1.8) (revision 336096)
++++ channels/sip/include/srtp.h (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -34,6 +34,8 @@
#define SRTP_ENCR_OPTIONAL (1 << 1) /* SRTP encryption optional */
#define SRTP_CRYPTO_ENABLE (1 << 2)
@@ -603,8 +603,8 @@
struct sip_srtp {
Index: channels/sip/sdp_crypto.c
===================================================================
---- channels/sip/sdp_crypto.c (.../branches/1.8) (revision 335789)
-+++ channels/sip/sdp_crypto.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/sip/sdp_crypto.c (.../branches/1.8) (revision 336096)
++++ channels/sip/sdp_crypto.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -32,6 +32,7 @@
#include "asterisk/options.h"
#include "asterisk/utils.h"
@@ -655,8 +655,8 @@
Index: channels/chan_local.c
===================================================================
---- channels/chan_local.c (.../branches/1.8) (revision 335789)
-+++ channels/chan_local.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- channels/chan_local.c (.../branches/1.8) (revision 336096)
++++ channels/chan_local.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -588,6 +588,7 @@
static int local_write(struct ast_channel *ast, struct ast_frame *f)
{
@@ -688,9 +688,9 @@
if (!ast_test_flag(p, LOCAL_ALREADY_MASQED)) {
Index: configure.ac
===================================================================
---- configure.ac (.../branches/1.8) (revision 335789)
-+++ configure.ac (.../team/irroot/distrotech-customers-1.8) (revision 335789)
-@@ -1718,7 +1718,7 @@
+--- configure.ac (.../branches/1.8) (revision 336096)
++++ configure.ac (.../team/irroot/distrotech-customers-1.8) (revision 336096)
+@@ -1698,7 +1698,7 @@
AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
AST_C_DEFINE_CHECK([MISDN_FAC_ERROR], [Fac_ERROR], [mISDNuser/suppserv.h])
@@ -701,8 +701,8 @@
Index: apps/app_queue.c
===================================================================
---- apps/app_queue.c (.../branches/1.8) (revision 335789)
-+++ apps/app_queue.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- apps/app_queue.c (.../branches/1.8) (revision 336096)
++++ apps/app_queue.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -522,11 +522,25 @@
<enum name="count">
<para>Returns the total number of members for the specified queue.</para>
@@ -956,44 +956,7 @@
ao2_unlink(q->members, m);
q->membercount--;
}
-@@ -2366,13 +2418,11 @@
- queue_t_unref(q, "Need to find realtime queue");
- }
-
-- ao2_lock(queues);
--
- q = find_queue_by_name_rt(queuename, queue_vars, member_config);
- ast_config_destroy(member_config);
- ast_variables_destroy(queue_vars);
-
-- /* update the use_weight value if the queue's has gained or lost a weight */
-+ /* update the use_weight value if the queue's has gained or lost a weight */
- if (q) {
- if (!q->weight && prev_weight) {
- ast_atomic_fetchadd_int(&use_weight, -1);
-@@ -2382,8 +2432,6 @@
- }
- }
- /* Other cases will end up with the proper value for use_weight */
-- ao2_unlock(queues);
--
- } else {
- update_realtime_members(q);
- }
-@@ -2417,10 +2465,9 @@
- return;
- }
-
-- ao2_lock(queues);
- ao2_lock(q);
--
-- /* Temporarily set realtime members dead so we can detect deleted ones.*/
-+
-+ /* Temporarily set realtime members dead so we can detect deleted ones.*/
- mem_iter = ao2_iterator_init(q->members, 0);
- while ((m = ao2_iterator_next(&mem_iter))) {
- if (m->realtime)
-@@ -2430,19 +2477,18 @@
+@@ -2425,19 +2477,18 @@
ao2_iterator_destroy(&mem_iter);
while ((interface = ast_category_browse(member_config, interface))) {
@@ -1019,39 +982,7 @@
ao2_unlink(q->members, m);
q->membercount--;
}
-@@ -2450,7 +2496,6 @@
- }
- ao2_iterator_destroy(&mem_iter);
- ao2_unlock(q);
-- ao2_unlock(queues);
- ast_config_destroy(member_config);
- }
-
-@@ -2465,7 +2510,6 @@
- if (!(q = load_realtime_queue(queuename)))
- return res;
-
-- ao2_lock(queues);
- ao2_lock(q);
-
- /* This is our one */
-@@ -2474,7 +2518,6 @@
- if ((status = get_member_status(q, qe->max_penalty, qe->min_penalty, q->joinempty))) {
- *reason = QUEUE_JOINEMPTY;
- ao2_unlock(q);
-- ao2_unlock(queues);
- queue_t_unref(q, "Done with realtime queue");
- return res;
- }
-@@ -2538,7 +2581,6 @@
- ast_debug(1, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
- }
- ao2_unlock(q);
-- ao2_unlock(queues);
- queue_t_unref(q, "Done with realtime queue");
-
- return res;
-@@ -2883,16 +2925,24 @@
+@@ -2874,16 +2925,24 @@
mem_iter = ao2_iterator_init(q->members, 0);
while ((mem = ao2_iterator_next(&mem_iter))) {
switch (mem->status) {
@@ -1085,18 +1016,7 @@
}
ao2_ref(mem, -1);
-@@ -2923,9 +2973,7 @@
- struct member *mem;
- int found = 0;
- struct ao2_iterator queue_iter;
--
-- /* q's lock and rq's lock already set by try_calling()
-- * to solve deadlock */
-+
- queue_iter = ao2_iterator_init(queues, 0);
- while ((q = ao2_t_iterator_next(&queue_iter, "Iterate through queues"))) {
- if (q == rq) { /* don't check myself, could deadlock */
-@@ -3020,38 +3068,54 @@
+@@ -3009,38 +3068,54 @@
char tech[256];
char *location;
const char *macrocontext, *macroexten;
@@ -1167,7 +1087,7 @@
tmp->stillgoing = 0;
(*busies)++;
return 0;
-@@ -3066,8 +3130,9 @@
+@@ -3055,8 +3130,9 @@
/* Request the peer */
tmp->chan = ast_request(tech, qe->chan->nativeformats, qe->chan, location, &status);
if (!tmp->chan) { /* If we can't, just go on to the next call */
@@ -1178,7 +1098,7 @@
tmp->stillgoing = 0;
ao2_lock(qe->parent);
-@@ -3406,6 +3471,18 @@
+@@ -3395,6 +3471,18 @@
}
ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
if (qe->parent->autopause != QUEUE_AUTOPAUSE_OFF && pause) {
@@ -1197,70 +1117,7 @@
if (qe->parent->autopause == QUEUE_AUTOPAUSE_ON) {
if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {
ast_verb(3, "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n",
-@@ -4360,7 +4437,6 @@
- struct ao2_iterator memi;
- struct ast_datastore *datastore, *transfer_ds;
- struct queue_end_bridge *queue_end_bridge = NULL;
-- const int need_weight = use_weight;
-
- ast_channel_lock(qe->chan);
- datastore = ast_channel_datastore_find(qe->chan, &dialed_interface_info, NULL);
-@@ -4443,9 +4519,6 @@
- qe->cancel_answered_elsewhere = 1;
- }
-
-- /* Hold the lock while we setup the outgoing calls */
-- if (need_weight)
-- ao2_lock(queues);
- ao2_lock(qe->parent);
- ast_debug(1, "%s is trying to call a queue member.\n",
- qe->chan->name);
-@@ -4464,8 +4537,6 @@
- ao2_ref(cur, -1);
- ao2_unlock(qe->parent);
- ao2_iterator_destroy(&memi);
-- if (need_weight)
-- ao2_unlock(queues);
- goto out;
- }
- if (!datastore) {
-@@ -4473,8 +4544,6 @@
- ao2_ref(cur, -1);
- ao2_unlock(qe->parent);
- ao2_iterator_destroy(&memi);
-- if (need_weight)
-- ao2_unlock(queues);
- callattempt_free(tmp);
- goto out;
- }
-@@ -4483,8 +4552,6 @@
- ao2_ref(cur, -1);
- ao2_unlock(&qe->parent);
- ao2_iterator_destroy(&memi);
-- if (need_weight)
-- ao2_unlock(queues);
- callattempt_free(tmp);
- goto out;
- }
-@@ -4521,8 +4588,6 @@
- ao2_ref(cur, -1);
- ao2_unlock(qe->parent);
- ao2_iterator_destroy(&memi);
-- if (need_weight)
-- ao2_unlock(queues);
- callattempt_free(tmp);
- goto out;
- }
-@@ -4585,8 +4650,6 @@
- ++qe->pending;
- ao2_unlock(qe->parent);
- ring_one(qe, outgoing, &numbusies);
-- if (need_weight)
-- ao2_unlock(queues);
- lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed, update_connectedline);
- /* The ast_channel_datastore_remove() function could fail here if the
- * datastore was moved to another channel during a masquerade. If this is
-@@ -4717,8 +4780,9 @@
+@@ -4692,8 +4780,9 @@
else
ast_moh_stop(qe->chan);
/* If appropriate, log that we have a destination channel */
@@ -1271,7 +1128,7 @@
/* Make sure channels are compatible */
res = ast_channel_make_compatible(qe->chan, peer);
if (res < 0) {
-@@ -4798,10 +4862,11 @@
+@@ -4773,10 +4862,11 @@
if (mixmonapp) {
ast_debug(1, "Starting MixMonitor as requested.\n");
if (!monitorfilename) {
@@ -1285,7 +1142,7 @@
} else {
const char *m = monitorfilename;
for (p = tmpid2; p < tmpid2 + sizeof(tmpid2) - 1; p++, m++) {
-@@ -4868,12 +4933,13 @@
+@@ -4843,12 +4933,13 @@
ast_debug(1, "Arguments being passed to MixMonitor: %s\n", mixmonargs);
/* We purposely lock the CDR so that pbx_exec does not update the application data */
@@ -1302,7 +1159,7 @@
} else {
ast_log(LOG_WARNING, "Asked to run MixMonitor on this call, but cannot find the MixMonitor app!\n");
}
-@@ -5009,8 +5075,26 @@
+@@ -4984,8 +5075,26 @@
qe->handled++;
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
(long)(orig - to > 0 ? (orig - to) / 1000 : 0));
@@ -1331,11 +1188,7 @@
if (qe->parent->eventwhencalled)
manager_event(EVENT_FLAG_AGENT, "AgentConnect",
"Queue: %s\r\n"
-@@ -5188,15 +5272,16 @@
-
- ast_copy_string(tmpmem.interface, interface, sizeof(tmpmem.interface));
- if ((q = ao2_t_find(queues, &tmpq, OBJ_POINTER, "Temporary reference for interface removal"))) {
-- ao2_lock(queues);
+@@ -5166,7 +5275,10 @@
ao2_lock(q);
if ((mem = ao2_find(q->members, &tmpmem, OBJ_POINTER))) {
/* XXX future changes should beware of this assumption!! */
@@ -1347,28 +1200,7 @@
ao2_ref(mem, -1);
ao2_unlock(q);
queue_t_unref(q, "Interface wasn't dynamic, expiring temporary reference");
-- ao2_unlock(queues);
- return RES_NOT_DYNAMIC;
- }
- q->membercount--;
-@@ -5216,7 +5301,6 @@
- res = RES_EXISTS;
- }
- ao2_unlock(q);
-- ao2_unlock(queues);
- queue_t_unref(q, "Expiring temporary reference");
- }
-
-@@ -5241,8 +5325,6 @@
- if (!(q = load_realtime_queue(queuename)))
- return res;
-
-- ao2_lock(queues);
--
- ao2_lock(q);
- if ((old_member = interface_exists(q, interface)) == NULL) {
- if ((new_member = create_queue_member(interface, membername, penalty, paused, state_interface))) {
-@@ -5253,13 +5335,14 @@
+@@ -5223,13 +5335,14 @@
"Queue: %s\r\n"
"Location: %s\r\n"
"MemberName: %s\r\n"
@@ -1384,15 +1216,7 @@
"dynamic",
new_member->penalty, new_member->calls, (int) new_member->lastcall,
new_member->status, new_member->paused);
-@@ -5279,7 +5362,6 @@
- res = RES_EXISTS;
- }
- ao2_unlock(q);
-- ao2_unlock(queues);
- queue_t_unref(q, "Expiring temporary reference");
-
- return res;
-@@ -5367,35 +5449,34 @@
+@@ -5336,35 +5449,34 @@
int foundinterface = 0, foundqueue = 0;
struct call_queue *q;
struct member *mem;
@@ -1445,24 +1269,7 @@
if (foundinterface) {
return RESULT_SUCCESS;
-@@ -5460,8 +5541,6 @@
- struct call_queue *cur_queue;
- char queue_data[PM_MAX_LEN];
-
-- ao2_lock(queues);
--
- /* Each key in 'pm_family' is the name of a queue */
- db_tree = ast_db_gettree(pm_family, NULL);
- for (entry = db_tree; entry; entry = entry->next) {
-@@ -5532,7 +5611,6 @@
- queue_t_unref(cur_queue, "Expire reload reference");
- }
-
-- ao2_unlock(queues);
- if (db_tree) {
- ast_log(LOG_NOTICE, "Queue members successfully reloaded from database.\n");
- ast_db_freetree(db_tree);
-@@ -5616,6 +5694,8 @@
+@@ -5582,6 +5694,8 @@
{
int res=-1;
char *parse, *temppos = NULL;
@@ -1471,7 +1278,7 @@
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(queuename);
AST_APP_ARG(interface);
-@@ -5641,9 +5721,17 @@
+@@ -5607,9 +5721,17 @@
ast_debug(1, "queue: %s, member: %s\n", args.queuename, args.interface);
@@ -1490,7 +1297,7 @@
ast_log(LOG_NOTICE, "Removed interface '%s' from queue '%s'\n", args.interface, args.queuename);
pbx_builtin_setvar_helper(chan, "RQMSTATUS", "REMOVED");
res = 0;
-@@ -5708,7 +5796,11 @@
+@@ -5674,7 +5796,11 @@
switch (add_to_queue(args.queuename, args.interface, args.membername, penalty, 0, queue_persistent_members, args.state_interface)) {
case RES_OKAY:
@@ -1503,7 +1310,7 @@
ast_log(LOG_NOTICE, "Added interface '%s' to queue '%s'\n", args.interface, args.queuename);
pbx_builtin_setvar_helper(chan, "AQMSTATUS", "ADDED");
res = 0;
-@@ -5724,7 +5816,7 @@
+@@ -5690,7 +5816,7 @@
res = 0;
break;
case RES_OUTOFMEMORY:
@@ -1512,7 +1319,7 @@
break;
}
-@@ -6168,31 +6260,37 @@
+@@ -6134,31 +6260,37 @@
return 0;
}
@@ -1560,7 +1367,7 @@
mem_iter = ao2_iterator_init(q->members, 0);
while ((m = ao2_iterator_next(&mem_iter))) {
/* Count the agents who are logged in and presently answering calls */
-@@ -6202,7 +6300,7 @@
+@@ -6168,7 +6300,7 @@
ao2_ref(m, -1);
}
ao2_iterator_destroy(&mem_iter);
@@ -1569,7 +1376,7 @@
mem_iter = ao2_iterator_init(q->members, 0);
while ((m = ao2_iterator_next(&mem_iter))) {
/* Count the agents who are logged in and presently answering calls */
-@@ -6212,7 +6310,7 @@
+@@ -6178,7 +6310,7 @@
ao2_ref(m, -1);
}
ao2_iterator_destroy(&mem_iter);
@@ -1578,7 +1385,7 @@
time_t now;
time(&now);
mem_iter = ao2_iterator_init(q->members, 0);
-@@ -6225,22 +6323,104 @@
+@@ -6191,22 +6323,104 @@
ao2_ref(m, -1);
}
ao2_iterator_destroy(&mem_iter);
@@ -1689,7 +1496,7 @@
*/
static int queue_function_qac_dep(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
-@@ -6446,7 +6626,8 @@
+@@ -6412,7 +6626,8 @@
static struct ast_custom_function queuemembercount_function = {
.name = "QUEUE_MEMBER",
@@ -1699,7 +1506,7 @@
};
static struct ast_custom_function queuemembercount_dep = {
-@@ -6529,8 +6710,9 @@
+@@ -6495,8 +6710,9 @@
{
const char *general_val = NULL;
queue_persistent_members = 0;
@@ -1710,7 +1517,7 @@
autofill_default = 0;
if ((general_val = ast_variable_retrieve(cfg, "general", "autofill")))
autofill_default = ast_true(general_val);
-@@ -6545,6 +6727,12 @@
+@@ -6511,6 +6727,12 @@
shared_lastcall = 0;
if ((general_val = ast_variable_retrieve(cfg, "general", "shared_lastcall")))
shared_lastcall = ast_true(general_val);
@@ -1723,43 +1530,7 @@
}
/*! \brief reload information pertaining to a single member
-@@ -6810,12 +6998,12 @@
-
- /* We've made it here, so it looks like we're doing operations on all queues. */
- ao2_lock(queues);
--
-+
- /* Mark all queues as dead for the moment if we're reloading queues.
- * For clarity, we could just be reloading members, in which case we don't want to mess
- * with the other queue parameters at all*/
- if (queue_reload) {
-- ao2_callback(queues, OBJ_NODATA, mark_dead_and_unfound, (char *) queuename);
-+ ao2_callback(queues, OBJ_NODATA | OBJ_NOLOCK, mark_dead_and_unfound, (char *) queuename);
- }
-
- /* Chug through config file */
-@@ -6832,17 +7020,17 @@
- ast_config_destroy(cfg);
- /* Unref all the dead queues if we were reloading queues */
- if (queue_reload) {
-- ao2_callback(queues, OBJ_NODATA | OBJ_MULTIPLE | OBJ_UNLINK, kill_dead_queues, (char *) queuename);
-+ ao2_callback(queues, OBJ_NODATA | OBJ_MULTIPLE | OBJ_UNLINK | OBJ_NOLOCK, kill_dead_queues, (char *) queuename);
- }
- ao2_unlock(queues);
- return 0;
- }
--
-+
- /*! \brief Facilitates resetting statistics for a queue
- *
- * This function actually does not reset any statistics, but
- * rather finds a call_queue struct which corresponds to the
-- * passed-in queue name and passes that structure to the
-+ * passed-in queue name and passes that structure to the
- * clear_queue function. If no queuename is passed in, then
- * all queues will have their statistics reset.
- *
-@@ -6992,7 +7180,11 @@
+@@ -6958,7 +7180,11 @@
while ((mem = ao2_iterator_next(&mem_iter))) {
ast_str_set(&out, 0, " %s", mem->membername);
if (strcasecmp(mem->membername, mem->interface)) {
@@ -1772,16 +1543,7 @@
}
if (mem->penalty)
ast_str_append(&out, 0, " with penalty %d", mem->penalty);
-@@ -7030,7 +7222,7 @@
- queue_t_unref(q, "Done with iterator"); /* Unref the iterator's reference */
- }
- ao2_iterator_destroy(&queue_iter);
-- ao2_unlock(queues);
-+ ao2_lock(queues);
- if (!found) {
- if (argc == 3)
- ast_str_set(&out, 0, "No such queue: %s.", argv[2]);
-@@ -7260,6 +7452,7 @@
+@@ -7226,6 +7452,7 @@
"Queue: %s\r\n"
"Name: %s\r\n"
"Location: %s\r\n"
@@ -1789,7 +1551,7 @@
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
-@@ -7268,7 +7461,7 @@
+@@ -7234,7 +7461,7 @@
"Paused: %d\r\n"
"%s"
"\r\n",
@@ -1798,7 +1560,7 @@
mem->penalty, mem->calls, (int)mem->lastcall, mem->status, mem->paused, idText);
}
ao2_ref(mem, -1);
-@@ -7344,7 +7537,11 @@
+@@ -7310,7 +7537,11 @@
switch (add_to_queue(queuename, interface, membername, penalty, paused, queue_persistent_members, state_interface)) {
case RES_OKAY:
@@ -1811,7 +1573,7 @@
astman_send_ack(s, m, "Added interface to queue");
break;
case RES_EXISTS:
-@@ -7364,6 +7561,7 @@
+@@ -7330,6 +7561,7 @@
static int manager_remove_queue_member(struct mansession *s, const struct message *m)
{
const char *queuename, *interface;
@@ -1819,7 +1581,7 @@
queuename = astman_get_header(m, "Queue");
interface = astman_get_header(m, "Interface");
-@@ -7373,9 +7571,17 @@
+@@ -7339,9 +7571,17 @@
return 0;
}
@@ -1838,7 +1600,7 @@
astman_send_ack(s, m, "Removed interface from queue");
break;
case RES_EXISTS:
-@@ -7597,7 +7803,11 @@
+@@ -7563,7 +7803,11 @@
switch (add_to_queue(queuename, interface, membername, penalty, 0, queue_persistent_members, state_interface)) {
case RES_OKAY:
@@ -1851,7 +1613,7 @@
ast_cli(a->fd, "Added interface '%s' to queue '%s'\n", interface, queuename);
return CLI_SUCCESS;
case RES_EXISTS:
-@@ -7665,11 +7875,12 @@
+@@ -7631,11 +7875,12 @@
static char *handle_queue_remove_member(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
const char *queuename, *interface;
@@ -1865,7 +1627,7 @@
"Usage: queue remove member <channel> from <queue>\n"
" Remove a specific channel from a queue.\n";
return NULL;
-@@ -7686,10 +7897,18 @@
+@@ -7652,10 +7897,18 @@
queuename = a->argv[5];
interface = a->argv[3];
@@ -1886,7 +1648,7 @@
return CLI_SUCCESS;
case RES_EXISTS:
ast_cli(a->fd, "Unable to remove interface '%s' from queue '%s': Not there\n", interface, queuename);
-@@ -8412,6 +8631,26 @@
+@@ -8378,6 +8631,26 @@
return 0;
}
@@ -1915,8 +1677,8 @@
.unload = unload_module,
Index: addons/chan_ooh323.c
===================================================================
---- addons/chan_ooh323.c (.../branches/1.8) (revision 335789)
-+++ addons/chan_ooh323.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- addons/chan_ooh323.c (.../branches/1.8) (revision 336096)
++++ addons/chan_ooh323.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -25,6 +25,42 @@
#include "chan_ooh323.h"
#include <math.h>
@@ -3040,8 +2802,8 @@
Index: Makefile
===================================================================
---- Makefile (.../branches/1.8) (revision 335789)
-+++ Makefile (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- Makefile (.../branches/1.8) (revision 336096)
++++ Makefile (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -127,7 +127,7 @@
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
# when starting Asterisk
@@ -3053,8 +2815,8 @@
# If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
Index: funcs/func_channel.c
===================================================================
---- funcs/func_channel.c (.../branches/1.8) (revision 335789)
-+++ funcs/func_channel.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- funcs/func_channel.c (.../branches/1.8) (revision 336096)
++++ funcs/func_channel.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -89,6 +89,9 @@
<enum name="callgroup">
<para>R/W call groups for call pickup.</para>
@@ -3091,8 +2853,8 @@
} else if (!strcasecmp(data, "rxgain")) {
Index: include/asterisk/res_fax.h
===================================================================
---- include/asterisk/res_fax.h (.../branches/1.8) (revision 335789)
-+++ include/asterisk/res_fax.h (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- include/asterisk/res_fax.h (.../branches/1.8) (revision 336096)
++++ include/asterisk/res_fax.h (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -42,6 +42,8 @@
AST_FAX_TECH_T38 = (1 << 3),
/*! sending mulitple documents supported */
@@ -3125,8 +2887,8 @@
/*! the type of fax session supported with this ast_fax_tech structure */
Index: include/asterisk/dsp.h
===================================================================
---- include/asterisk/dsp.h (.../branches/1.8) (revision 335789)
-+++ include/asterisk/dsp.h (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- include/asterisk/dsp.h (.../branches/1.8) (revision 336096)
++++ include/asterisk/dsp.h (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -43,9 +43,11 @@
#define DSP_FEATURE_CALL_PROGRESS (DSP_PROGRESS_TALK | DSP_PROGRESS_RINGING | DSP_PROGRESS_BUSY | DSP_PROGRESS_CONGESTION)
#define DSP_FEATURE_WAITDIALTONE (1 << 20) /*!< Enable dial tone detection */
@@ -3144,8 +2906,8 @@
#define DSP_TONE_STATE_RINGING 1
Index: main/channel.c
===================================================================
---- main/channel.c (.../branches/1.8) (revision 335789)
-+++ main/channel.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- main/channel.c (.../branches/1.8) (revision 336096)
++++ main/channel.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -4891,6 +4891,10 @@
apply_plc(chan, fr);
}
@@ -3186,8 +2948,8 @@
int to;
Index: main/dsp.c
===================================================================
---- main/dsp.c (.../branches/1.8) (revision 335789)
-+++ main/dsp.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- main/dsp.c (.../branches/1.8) (revision 336096)
++++ main/dsp.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -254,6 +254,20 @@
typedef struct
@@ -3391,8 +3153,8 @@
Index: main/frame.c
===================================================================
---- main/frame.c (.../branches/1.8) (revision 335789)
-+++ main/frame.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- main/frame.c (.../branches/1.8) (revision 336096)
++++ main/frame.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -413,7 +413,7 @@
out->samples = fr->samples;
out->offset = fr->offset;
@@ -3413,8 +3175,8 @@
out->seqno = f->seqno;
Index: configs/chan_ooh323.conf.sample
===================================================================
---- configs/chan_ooh323.conf.sample (.../branches/1.8) (revision 335789)
-+++ configs/chan_ooh323.conf.sample (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- configs/chan_ooh323.conf.sample (.../branches/1.8) (revision 336096)
++++ configs/chan_ooh323.conf.sample (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -122,6 +122,18 @@
;
;roundtrip=x,y
@@ -3436,8 +3198,8 @@
; ------------------ -------------------
Index: configs/queues.conf.sample
===================================================================
---- configs/queues.conf.sample (.../branches/1.8) (revision 335789)
-+++ configs/queues.conf.sample (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- configs/queues.conf.sample (.../branches/1.8) (revision 336096)
++++ configs/queues.conf.sample (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -61,6 +61,16 @@
;
;shared_lastcall=no
@@ -3478,8 +3240,8 @@
; If you wish to have a delay before the member is connected to the caller (or
Index: res/res_fax.c
===================================================================
---- res/res_fax.c (.../branches/1.8) (revision 335789)
-+++ res/res_fax.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- res/res_fax.c (.../branches/1.8) (revision 336096)
++++ res/res_fax.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -5,7 +5,24 @@
*
* Dwayne M. Hubbard <dhubbard at digium.com>
@@ -4969,8 +4731,8 @@
return res;
Index: res/res_fax_spandsp.c
===================================================================
---- res/res_fax_spandsp.c (.../branches/1.8) (revision 335789)
-+++ res/res_fax_spandsp.c (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- res/res_fax_spandsp.c (.../branches/1.8) (revision 336096)
++++ res/res_fax_spandsp.c (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -5,6 +5,22 @@
*
* Matthew Nicholson <mnicholson at digium.com>
@@ -5438,8 +5200,8 @@
ast_cli(fd, "\n\n");
Index: contrib/scripts/safe_asterisk
===================================================================
---- contrib/scripts/safe_asterisk (.../branches/1.8) (revision 335789)
-+++ contrib/scripts/safe_asterisk (.../team/irroot/distrotech-customers-1.8) (revision 335789)
+--- contrib/scripts/safe_asterisk (.../branches/1.8) (revision 336096)
++++ contrib/scripts/safe_asterisk (.../team/irroot/distrotech-customers-1.8) (revision 336096)
@@ -2,14 +2,14 @@
# vim:textwidth=80:tabstop=4:shiftwidth=4:smartindent:autoindent
@@ -5479,10 +5241,8 @@
Property changes on: .
___________________________________________________________________
-Added: automerge
- + *
Added: svnmerge-integrated
- + /branches/1.8:1-335734
+ + /branches/1.8:1-336094
Added: automerge-email
+ gregory at distrotech.co.za
Modified: team/irroot/patches/distrotech-10.patch
URL: http://svnview.digium.com/svn/asterisk/team/irroot/patches/distrotech-10.patch?view=diff&rev=336153&r1=336152&r2=336153
==============================================================================
--- team/irroot/patches/distrotech-10.patch (original)
+++ team/irroot/patches/distrotech-10.patch Thu Sep 15 12:00:26 2011
@@ -1,7 +1,7 @@
Index: channels/chan_sip.c
===================================================================
---- channels/chan_sip.c (.../branches/10) (revision 335789)
-+++ channels/chan_sip.c (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/chan_sip.c (.../branches/10) (revision 336097)
++++ channels/chan_sip.c (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -5489,17 +5489,23 @@
if (p->rtp && !p->srtp && setup_srtp(&p->srtp) < 0) {
@@ -193,8 +193,8 @@
Index: channels/chan_misdn.c
===================================================================
---- channels/chan_misdn.c (.../branches/10) (revision 335789)
-+++ channels/chan_misdn.c (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/chan_misdn.c (.../branches/10) (revision 336097)
++++ channels/chan_misdn.c (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -7886,64 +7886,63 @@
}
@@ -308,8 +308,8 @@
port = misdn_cfg_get_next_port(port)) {
Index: channels/sip/include/sip.h
===================================================================
---- channels/sip/include/sip.h (.../branches/10) (revision 335789)
-+++ channels/sip/include/sip.h (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/sip/include/sip.h (.../branches/10) (revision 336097)
++++ channels/sip/include/sip.h (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -353,9 +353,11 @@
@@ -325,8 +325,8 @@
Index: channels/sip/include/sdp_crypto.h
===================================================================
---- channels/sip/include/sdp_crypto.h (.../branches/10) (revision 335789)
-+++ channels/sip/include/sdp_crypto.h (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/sip/include/sdp_crypto.h (.../branches/10) (revision 336097)
++++ channels/sip/include/sdp_crypto.h (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -31,6 +31,7 @@
#include <asterisk/rtp_engine.h>
@@ -360,8 +360,8 @@
/*! \brief Return the a_crypto value of the sdp_crypto struct
Index: channels/sip/include/srtp.h
===================================================================
---- channels/sip/include/srtp.h (.../branches/10) (revision 335789)
-+++ channels/sip/include/srtp.h (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/sip/include/srtp.h (.../branches/10) (revision 336097)
++++ channels/sip/include/srtp.h (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -34,6 +34,8 @@
#define SRTP_ENCR_OPTIONAL (1 << 1) /* SRTP encryption optional */
#define SRTP_CRYPTO_ENABLE (1 << 2)
@@ -373,8 +373,8 @@
struct sip_srtp {
Index: channels/sip/sdp_crypto.c
===================================================================
---- channels/sip/sdp_crypto.c (.../branches/10) (revision 335789)
-+++ channels/sip/sdp_crypto.c (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/sip/sdp_crypto.c (.../branches/10) (revision 336097)
++++ channels/sip/sdp_crypto.c (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -32,6 +32,7 @@
#include "asterisk/options.h"
#include "asterisk/utils.h"
@@ -425,8 +425,8 @@
Index: channels/chan_local.c
===================================================================
---- channels/chan_local.c (.../branches/10) (revision 335789)
-+++ channels/chan_local.c (.../team/irroot/distrotech-customers-10) (revision 335789)
+--- channels/chan_local.c (.../branches/10) (revision 336097)
++++ channels/chan_local.c (.../team/irroot/distrotech-customers-10) (revision 336097)
@@ -587,6 +587,7 @@
[... 952 lines stripped ...]
More information about the asterisk-commits
mailing list