<p>George Joseph <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5802">View Change</a></p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p style="white-space: pre-wrap; word-wrap: break-word;">Cherry pick to 14 and master?</p><p>(3 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5802/1/res/res_pjsip_mwi.c">File res/res_pjsip_mwi.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5802/1/res/res_pjsip_mwi.c@1245">Patch Set #1, Line 1245:</a> <code style="font-family:monospace,monospace"> endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", contact->endpoint_name);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Shouldn't contact->endpoint already be a pointer to the endpoint object?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5802/1/res/res_pjsip_mwi.c@1251">Patch Set #1, Line 1251:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> ao2_lock(unsolicited_mwi);<br> mwi_subs = ao2_find(unsolicited_mwi, contact->endpoint_name,<br> OBJ_SEARCH_KEY | OBJ_MULTIPLE | OBJ_NOLOCK | OBJ_UNLINK);<br> if (mwi_subs) {<br> for (; (mwi_sub = ao2_iterator_next(mwi_subs)); ao2_cleanup(mwi_sub)) {<br> unsubscribe(mwi_sub, NULL, 0);<br> }<br> ao2_iterator_destroy(mwi_subs);<br> }<br> ao2_unlock(unsolicited_mwi);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The same logic is in mwi_contact_added. Can you re-use it?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5802/1/res/res_pjsip_mwi.c@1267">Patch Set #1, Line 1267:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> ao2_lock(unsolicited_mwi);<br> create_mwi_subscriptions_for_endpoint(endpoint, NULL, 0);<br> ao2_unlock(unsolicited_mwi);<br>}<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't understand why you are re-creating the subscriptions again.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5802">change 5802</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/5802"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I33e174e0b9dba0998927d16d6d100fda5c7254e0 </div>
<div style="display:none"> Gerrit-Change-Number: 5802 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 13 Jun 2017 12:11:08 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>