<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6757">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: Prevent "user=phone" being added multiple times to header<br><br>ast_sip_add_usereqphone adds "user=phone" to the header every time is is<br>called without checking whether the param already exists. Preventing<br>this by searching to string representation of header for "user=phone".<br><br>ASTERISK-26988 #close<br><br>Change-Id: Ib84383b07254de357dc6a98d91fc1d2c2c3719e6<br>---<br>M res/res_pjsip.c<br>1 file changed, 5 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/57/6757/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip.c b/res/res_pjsip.c<br>index a784e12..f81d34c 100644<br>--- a/res/res_pjsip.c<br>+++ b/res/res_pjsip.c<br>@@ -3095,6 +3095,11 @@<br> return;<br> }<br> <br>+ if (pjsip_param_find(&sip_uri->other_param, &STR_USER)) {<br>+ /* Don't add it if it's already there */<br>+ return;<br>+ }<br>+<br> param = PJ_POOL_ALLOC_T(pool, pjsip_param);<br> param->name = STR_USER;<br> param->value = STR_PHONE;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6757">change 6757</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/6757"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib84383b07254de357dc6a98d91fc1d2c2c3719e6 </div>
<div style="display:none"> Gerrit-Change-Number: 6757 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: dtryba <daniel@tryba.nl> </div>