<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][15865] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=15865">15865</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2009-12-09 19:29:02 -0600 (Wed, 09 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>add priority queue for events so important broadcasts like hold music can take precedenced over event-lock</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeprivateswitch_core_pvth">freeswitch/trunk/src/include/private/switch_core_pvt.h</a></li>
<li><a href="#freeswitchtrunksrcincludeswitch_coreh">freeswitch/trunk/src/include/switch_core.h</a></li>
<li><a href="#freeswitchtrunksrcincludeswitch_typesh">freeswitch/trunk/src/include/switch_types.h</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiasofia_gluec">freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c</a></li>
<li><a href="#freeswitchtrunksrcmodevent_handlersmod_event_socketmod_event_socketc">freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_core_sessionc">freeswitch/trunk/src/switch_core_session.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivrc">freeswitch/trunk/src/switch_ivr.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_asyncc">freeswitch/trunk/src/switch_ivr_async.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_bridgec">freeswitch/trunk/src/switch_ivr_bridge.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcincludeprivateswitch_core_pvth"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/private/switch_core_pvt.h (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/private/switch_core_pvt.h        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/include/private/switch_core_pvt.h        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -134,6 +134,7 @@
</span><span class="cx">         switch_queue_t *event_queue;
</span><span class="cx">         switch_queue_t *message_queue;
</span><span class="cx">         switch_queue_t *private_event_queue;
</span><ins>+        switch_queue_t *private_event_queue_pri;
</ins><span class="cx">         switch_thread_rwlock_t *bug_rwlock;
</span><span class="cx">         switch_media_bug_t *bugs;
</span><span class="cx">         switch_app_log_t *app_log;
</span></span></pre></div>
<a id="freeswitchtrunksrcincludeswitch_coreh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_core.h (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_core.h        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/include/switch_core.h        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -986,9 +986,10 @@
</span><span class="cx"> \brief Queue a private event on a given session
</span><span class="cx"> \param session the session to queue the message on
</span><span class="cx"> \param event the event to queue
</span><ins>+ \param priority event has high priority
</ins><span class="cx"> \return the status returned by the message handler
</span><span class="cx"> */
</span><del>-SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(_In_ switch_core_session_t *session, _Inout_ switch_event_t **event);
</del><ins>+SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(_In_ switch_core_session_t *session, _Inout_ switch_event_t **event, switch_bool_t priority);
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /*!
</span></span></pre></div>
<a id="freeswitchtrunksrcincludeswitch_typesh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_types.h (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_types.h        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/include/switch_types.h        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -326,7 +326,8 @@
</span><span class="cx">         SMF_LOOP = (1 << 4),
</span><span class="cx">         SMF_HOLD_BLEG = (1 << 5),
</span><span class="cx">         SMF_IMMEDIATE = (1 << 6),
</span><del>-        SMF_EXEC_INLINE = (1 << 7)
</del><ins>+        SMF_EXEC_INLINE = (1 << 7),
+        SMF_PRIORITY = (1 << 8)
</ins><span class="cx"> } switch_media_flag_enum_t;
</span><span class="cx"> typedef uint32_t switch_media_flag_t;
</span><span class="cx">
</span><span class="lines">@@ -919,6 +920,7 @@
</span><span class="cx">         CF_UNICAST,
</span><span class="cx">         CF_VIDEO,
</span><span class="cx">         CF_EVENT_LOCK,
</span><ins>+        CF_EVENT_LOCK_PRI,
</ins><span class="cx">         CF_RESET,
</span><span class="cx">         CF_ORIGINATING,
</span><span class="cx">         CF_STOP_BROADCAST,
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofia_gluec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -2938,7 +2938,8 @@
</span><span class="cx">                                         switch_channel_set_flag(tech_pvt->channel, CF_HOLD);
</span><span class="cx">                                         switch_ivr_hold_uuid(switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE), NULL, 0);
</span><span class="cx">                                 } else {
</span><del>-                                        switch_ivr_broadcast(switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE), stream, SMF_ECHO_ALEG | SMF_LOOP);
</del><ins>+                                        switch_ivr_broadcast(switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE), stream,
+                                                                                 SMF_ECHO_ALEG | SMF_LOOP | SMF_PRIORITY);
</ins><span class="cx">                                         switch_yield(250000);
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodevent_handlersmod_event_socketmod_event_socketc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -1655,7 +1655,7 @@
</span><span class="cx">
</span><span class="cx">                 if (zstr(uuid) && listener->session) {
</span><span class="cx">                         if (async) {
</span><del>-                                if ((status = switch_core_session_queue_private_event(listener->session, event)) == SWITCH_STATUS_SUCCESS) {
</del><ins>+                                if ((status = switch_core_session_queue_private_event(listener->session, event, SWITCH_FALSE)) == SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                         switch_snprintf(reply, reply_len, "+OK");
</span><span class="cx">                                 } else {
</span><span class="cx">                                         switch_snprintf(reply, reply_len, "-ERR memory error");
</span><span class="lines">@@ -1666,7 +1666,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         if (!zstr(uuid) && (session = switch_core_session_locate(uuid))) {
</span><del>-                                if ((status = switch_core_session_queue_private_event(session, event)) == SWITCH_STATUS_SUCCESS) {
</del><ins>+                                if ((status = switch_core_session_queue_private_event(session, event, SWITCH_FALSE)) == SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                         switch_snprintf(reply, reply_len, "+OK");
</span><span class="cx">                                 } else {
</span><span class="cx">                                         switch_snprintf(reply, reply_len, "-ERR memory error");
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_core_sessionc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_core_session.c (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_core_session.c        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/switch_core_session.c        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -847,15 +847,18 @@
</span><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(switch_core_session_t *session, switch_event_t **event)
</del><ins>+SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(switch_core_session_t *session, switch_event_t **event, switch_bool_t priority)
</ins><span class="cx"> {
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_FALSE;
</span><ins>+        switch_queue_t *queue;
</ins><span class="cx">
</span><span class="cx">         switch_assert(session != NULL);
</span><span class="cx">
</span><span class="cx">         if (session->private_event_queue) {
</span><ins>+                queue = priority ? session->private_event_queue_pri : session->private_event_queue;
+                
</ins><span class="cx">                 (*event)->event_id = SWITCH_EVENT_PRIVATE_COMMAND;
</span><del>-                if (switch_queue_trypush(session->private_event_queue, *event) == SWITCH_STATUS_SUCCESS) {
</del><ins>+                if (switch_queue_trypush(queue, *event) == SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                         *event = NULL;
</span><span class="cx">                         switch_core_session_kill_channel(session, SWITCH_SIG_BREAK);
</span><span class="cx">                         status = SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -878,8 +881,16 @@
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><span class="cx">         uint32_t count = 0;
</span><span class="cx">         
</span><del>-        if (!switch_channel_test_flag(channel, CF_EVENT_LOCK) && session->private_event_queue) {
-                count = switch_queue_size(session->private_event_queue);
</del><ins>+        if (session->private_event_queue) {
+
+                if (!switch_channel_test_flag(channel, CF_EVENT_LOCK)) {
+                        count = switch_queue_size(session->private_event_queue);
+                }
+
+                if (!switch_channel_test_flag(channel, CF_EVENT_LOCK_PRI)) {
+                        count += switch_queue_size(session->private_event_queue_pri);
+                }
+
</ins><span class="cx">                 if (count == 0) {
</span><span class="cx">                         check_media(session);
</span><span class="cx">                 }
</span><span class="lines">@@ -893,13 +904,24 @@
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_FALSE;
</span><span class="cx">         void *pop;
</span><span class="cx">         switch_channel_t *channel = switch_core_session_get_channel(session);
</span><ins>+        switch_queue_t *queue;
+        
+        if (session->private_event_queue) {
+                if (switch_queue_size(session->private_event_queue_pri)) {
+                        queue = session->private_event_queue_pri;
</ins><span class="cx">
</span><del>-        if (switch_channel_test_flag(channel, CF_EVENT_LOCK)) {
-                return status;
-        }
</del><ins>+                        if (switch_channel_test_flag(channel, CF_EVENT_LOCK_PRI)) {
+                                return SWITCH_STATUS_FALSE;
+                        }
+                } else {
+                        queue = session->private_event_queue;
+                        
+                        if (switch_channel_test_flag(channel, CF_EVENT_LOCK)) {
+                                return SWITCH_STATUS_FALSE;
+                        }
+                }
</ins><span class="cx">
</span><del>-        if (session->private_event_queue) {
-                if ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
</del><ins>+                if ((status = (switch_status_t) switch_queue_trypop(queue, &pop)) == SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                         *event = (switch_event_t *) pop;
</span><span class="cx">                 } else {
</span><span class="cx">                         check_media(session);
</span><span class="lines">@@ -916,6 +938,9 @@
</span><span class="cx">         void *pop;
</span><span class="cx">
</span><span class="cx">         if (session->private_event_queue) {
</span><ins>+                while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue_pri, &pop)) == SWITCH_STATUS_SUCCESS) {
+                        x++;
+                }
</ins><span class="cx">                 while ((status = (switch_status_t) switch_queue_trypop(session->private_event_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         x++;
</span><span class="cx">                 }
</span><span class="lines">@@ -1327,6 +1352,7 @@
</span><span class="cx">         switch_queue_create(&session->message_queue, SWITCH_MESSAGE_QUEUE_LEN, session->pool);
</span><span class="cx">         switch_queue_create(&session->event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
</span><span class="cx">         switch_queue_create(&session->private_event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
</span><ins>+        switch_queue_create(&session->private_event_queue_pri, SWITCH_EVENT_QUEUE_LEN, session->pool);
</ins><span class="cx">
</span><span class="cx">         switch_mutex_lock(runtime.session_hash_mutex);
</span><span class="cx">         switch_core_hash_insert(session_manager.session_table, session->uuid_str, session);
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivrc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr.c (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr.c        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/switch_ivr.c        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -461,6 +461,7 @@
</span><span class="cx">         unsigned long CMD_UNICAST = switch_hashfunc_default("unicast", &hlen);
</span><span class="cx">         char *lead_frames = switch_event_get_header(event, "lead-frames");
</span><span class="cx">         char *event_lock = switch_event_get_header(event, "event-lock");
</span><ins>+        char *event_lock_pri = switch_event_get_header(event, "event-lock-pri");
</ins><span class="cx">         switch_status_t status = SWITCH_STATUS_FALSE;
</span><span class="cx">
</span><span class="cx">         if (zstr(cmd)) {
</span><span class="lines">@@ -476,6 +477,10 @@
</span><span class="cx">                 switch_channel_set_flag_recursive(channel, CF_EVENT_LOCK);
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        if (switch_true(event_lock_pri)) {
+                switch_channel_set_flag_recursive(channel, CF_EVENT_LOCK_PRI);
+        }
+
</ins><span class="cx">         if (lead_frames) {
</span><span class="cx">                 switch_frame_t *read_frame;
</span><span class="cx">                 int frame_count = atoi(lead_frames);
</span><span class="lines">@@ -606,6 +611,7 @@
</span><span class="cx"> done:
</span><span class="cx">         switch_channel_clear_flag_recursive(channel, CF_EVENT_PARSE);
</span><span class="cx">         switch_channel_clear_flag_recursive(channel, CF_EVENT_LOCK);
</span><ins>+        switch_channel_clear_flag_recursive(channel, CF_EVENT_LOCK_PRI);
</ins><span class="cx">
</span><span class="cx">         return status;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_asyncc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_async.c (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_async.c        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/switch_ivr_async.c        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -1740,7 +1740,7 @@
</span><span class="cx">                                                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", cont->list[i].app);
</span><span class="cx">                                                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", cont->list[i].data);
</span><span class="cx">                                                                 switch_event_add_header(event, SWITCH_STACK_BOTTOM, "lead-frames", "%d", 5);
</span><del>-                                                                switch_core_session_queue_private_event(cont->session, &event);
</del><ins>+                                                                switch_core_session_queue_private_event(cont->session, &event, SWITCH_FALSE);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx">
</span><span class="lines">@@ -2713,8 +2713,10 @@
</span><span class="cx">                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
</span><span class="cx">                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", app);
</span><span class="cx">                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", path);
</span><ins>+                                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, (flags & SMF_PRIORITY) ? "event-lock-pri" : "event-lock", "true");
+
</ins><span class="cx">                                 switch_event_add_header(event, SWITCH_STACK_BOTTOM, "lead-frames", "%d", 5);
</span><del>-                                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event-lock", "true");
</del><ins>+                                
</ins><span class="cx">                                 if ((flags & SMF_LOOP)) {
</span><span class="cx">                                         switch_event_add_header(event, SWITCH_STACK_BOTTOM, "loops", "%d", -1);
</span><span class="cx">                                 }
</span><span class="lines">@@ -2723,7 +2725,7 @@
</span><span class="cx">                                         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hold-bleg", "true");
</span><span class="cx">                                 }
</span><span class="cx">                                 
</span><del>-                                switch_core_session_queue_private_event(other_session, &event);
</del><ins>+                                switch_core_session_queue_private_event(other_session, &event, (flags & SMF_PRIORITY));
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 
</span><span class="lines">@@ -2745,15 +2747,18 @@
</span><span class="cx">                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
</span><span class="cx">                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", app);
</span><span class="cx">                                 switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", path);
</span><ins>+                                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, (flags & SMF_PRIORITY) ? "event-lock-pri" : "event-lock", "true");
</ins><span class="cx">                                 switch_event_add_header(event, SWITCH_STACK_BOTTOM, "lead-frames", "%d", 5);
</span><del>-                                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event-lock", "true");
</del><ins>+                                
</ins><span class="cx">                                 if ((flags & SMF_LOOP)) {
</span><span class="cx">                                         switch_event_add_header(event, SWITCH_STACK_BOTTOM, "loops", "%d", -1);
</span><span class="cx">                                 }
</span><span class="cx">                                 if ((flags & SMF_HOLD_BLEG)) {
</span><span class="cx">                                         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hold-bleg", "true");
</span><span class="cx">                                 }
</span><del>-                                switch_core_session_queue_private_event(session, &event);
</del><ins>+
+                                switch_core_session_queue_private_event(session, &event, (flags & SMF_PRIORITY));
+
</ins><span class="cx">                                 if (nomedia) switch_channel_set_flag(channel, CF_BROADCAST_DROP_MEDIA);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -2765,8 +2770,8 @@
</span><span class="cx">                         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
</span><span class="cx">                         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", "hangup");
</span><span class="cx">                         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", cause);
</span><del>-                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event-lock", "true");
-                        switch_core_session_queue_private_event(session, &event);
</del><ins>+                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, (flags & SMF_PRIORITY) ? "event-lock-pri" : "event-lock", "true");
+                        switch_core_session_queue_private_event(session, &event, (flags & SMF_PRIORITY));
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_bridgec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_bridge.c (15864 => 15865)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_bridge.c        2009-12-10 01:17:41 UTC (rev 15864)
+++ freeswitch/trunk/src/switch_ivr_bridge.c        2009-12-10 01:29:02 UTC (rev 15865)
</span><span class="lines">@@ -1059,7 +1059,7 @@
</span><span class="cx">                                         switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", data);
</span><span class="cx">                                         switch_event_add_header(execute_event, SWITCH_STACK_BOTTOM, "lead-frames", "%d", 5);
</span><span class="cx">                                         switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true");
</span><del>-                                        switch_core_session_queue_private_event(session, &execute_event);
</del><ins>+                                        switch_core_session_queue_private_event(session, &execute_event, SWITCH_FALSE);
</ins><span class="cx">                                         a_leg->skip_frames = DEFAULT_LEAD_FRAMES;
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="lines">@@ -1074,7 +1074,7 @@
</span><span class="cx">                                         switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", data);
</span><span class="cx">                                         switch_event_add_header(execute_event, SWITCH_STACK_BOTTOM, "lead-frames", "%d", 5);
</span><span class="cx">                                         switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true");
</span><del>-                                        switch_core_session_queue_private_event(peer_session, &execute_event);
</del><ins>+                                        switch_core_session_queue_private_event(peer_session, &execute_event, SWITCH_FALSE);
</ins><span class="cx">                                         b_leg->skip_frames = DEFAULT_LEAD_FRAMES;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>