<p>Richard Mudgett has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9193">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">channel: Fix some more unprotected channel flag setting.<br><br>Change-Id: I34c3b1201b1de539945bcfdcb264fff30332d48c<br>---<br>M channels/chan_dahdi.c<br>M channels/sig_analog.c<br>M main/channel.c<br>3 files changed, 10 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/93/9193/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c<br>index 36f5deb..77c6906 100644<br>--- a/channels/chan_dahdi.c<br>+++ b/channels/chan_dahdi.c<br>@@ -10035,7 +10035,9 @@<br>                                  * emulation.  The DTMF digits can come so fast that emulation<br>                                 * can drop some of them.<br>                              */<br>+                          ast_channel_lock(chan);<br>                               ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);<br>+                               ast_channel_unlock(chan);<br>                             off_ms = 4000;/* This is a typical OFF time between rings. */<br>                                 for (;;) {<br>                                    struct ast_frame *f;<br>@@ -10068,7 +10070,9 @@<br>                                                 ast_channel_state(chan) == AST_STATE_RINGING)<br>                                                 break; /* Got ring */<br>                                 }<br>+                            ast_channel_lock(chan);<br>                               ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);<br>+                             ast_channel_unlock(chan);<br>                             dtmfbuf[k] = '\0';<br>                            dahdi_setlinear(p->subs[idx].dfd, p->subs[idx].linear);<br>                                 /* Got cid and ring. */<br>diff --git a/channels/sig_analog.c b/channels/sig_analog.c<br>index 110942c..7f78daa 100644<br>--- a/channels/sig_analog.c<br>+++ b/channels/sig_analog.c<br>@@ -2402,7 +2402,9 @@<br>                            * emulation.  The DTMF digits can come so fast that emulation<br>                                 * can drop some of them.<br>                              */<br>+                          ast_channel_lock(chan);<br>                               ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);<br>+                               ast_channel_unlock(chan);<br>                             timeout_ms = 4000;/* This is a typical OFF time between rings. */<br>                             for (;;) {<br>                                    struct ast_frame *f;<br>@@ -2437,7 +2439,9 @@<br>                                           break; /* Got ring */<br>                                         }<br>                             }<br>+                            ast_channel_lock(chan);<br>                               ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);<br>+                             ast_channel_unlock(chan);<br>                             dtmfbuf[k] = '\0';<br> <br>                                 analog_set_linear_mode(p, idx, oldlinearity);<br>diff --git a/main/channel.c b/main/channel.c<br>index 92ec444..f056435 100644<br>--- a/main/channel.c<br>+++ b/main/channel.c<br>@@ -5922,7 +5922,9 @@<br>          */<br>   ast_set_callerid(chan, cid_num, cid_name, cid_num);<br> <br>+       ast_channel_lock(chan);<br>       ast_set_flag(ast_channel_flags(chan), AST_FLAG_ORIGINATED);<br>+  ast_channel_unlock(chan);<br>     ast_party_connected_line_set_init(&connected, ast_channel_connected(chan));<br>       if (cid_num) {<br>                connected.id.number.valid = 1;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9193">change 9193</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9193"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I34c3b1201b1de539945bcfdcb264fff30332d48c </div>
<div style="display:none"> Gerrit-Change-Number: 9193 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>