[asterisk-commits] file: branch 1.4 r83074 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 19 08:47:59 CDT 2007


Author: file
Date: Wed Sep 19 08:47:59 2007
New Revision: 83074

URL: http://svn.digium.com/view/asterisk?view=rev&rev=83074
Log:
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)

Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=83074&r1=83073&r2=83074
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Wed Sep 19 08:47:59 2007
@@ -2724,8 +2724,12 @@
 						
 					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");




More information about the asterisk-commits mailing list