From: Joshua Colp Date: Wed, 19 Sep 2007 13:47:59 +0000 (+0000) Subject: Protect the CDR record from modification by pbx_exec so that the application data... X-Git-Tag: 1.4.12~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2187f79e54448dc147e69613ce4dbd1ddbb59635;p=thirdparty%2Fasterisk.git Protect the CDR record from modification by pbx_exec so that the application data contains the Queue data. (closes issue #10761) Reported by: snar Patches: app-queue-mixmonitor.patch uploaded by snar (license 245) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83074 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index a5fe870eae..eb5aa8fd29 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2724,8 +2724,12 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce if (option_debug) ast_log(LOG_DEBUG, "Arguments being passed to MixMonitor: %s\n", mixmonargs); - + /* We purposely lock the CDR so that pbx_exec does not update the application data */ + if (qe->chan->cdr) + ast_set_flag(qe->chan->cdr, AST_CDR_FLAG_LOCKED); ret = pbx_exec(qe->chan, mixmonapp, mixmonargs); + if (qe->chan->cdr) + ast_clear_flag(qe->chan->cdr, AST_CDR_FLAG_LOCKED); } else ast_log(LOG_WARNING, "Asked to run MixMonitor on this call, but cannot find the MixMonitor app!\n");