<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8082">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>(14 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1//COMMIT_MSG@10">Patch Set #1, Line 10:</a> <code style="font-family:monospace,monospace">were pruned on Asterisk restart since the TCP connection would have</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The earlier option is called prune_on_boot not prune_on_restart. Since we are doing the same thing to subscription contacts as we had to do to registration contacts don't you think we should use the same name?</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/CHANGES">File CHANGES:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/CHANGES@54">Patch Set #1, Line 54:</a> <code style="font-family:monospace,monospace"> were pruned on Asterisk restart since the TCP connection would have</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The earlier option is called prune_on_boot not prune_on_restart.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/CHANGES@56">Patch Set #1, Line 56:</a> <code style="font-family:monospace,monospace"> process is now also applied to inbound subscriptions. Sicne this</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">s/Sicne/Since/</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/CHANGES@59">Patch Set #1, Line 59:</a> <code style="font-family:monospace,monospace"> need to run the "alembic upgrade head" process to add teh column to</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">s/teh/the/</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/CHANGES@60">Patch Set #1, Line 60:</a> <code style="font-family:monospace,monospace"> the schema. </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">red blob</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/UPGRADE.txt">File UPGRADE.txt:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/UPGRADE.txt@51">Patch Set #1, Line 51:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">stray blank line</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/contrib/ast-db-manage/config/versions/d3e4284f8707_add_prune_on_restart_to_ps_subscription_.py">File contrib/ast-db-manage/config/versions/d3e4284f8707_add_prune_on_restart_to_ps_subscription_.py:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/contrib/ast-db-manage/config/versions/d3e4284f8707_add_prune_on_restart_to_ps_subscription_.py@28">Patch Set #1, Line 28:</a> <code style="font-family:monospace,monospace"> op.add_column('ps_subscription_persistence', sa.Column('prune_on_restart', yesno_values))</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The earlier option is called prune_on_boot not prune_on_restart.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/include/asterisk/res_pjsip.h">File include/asterisk/res_pjsip.h:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/include/asterisk/res_pjsip.h@3101">Patch Set #1, Line 3101:</a> <code style="font-family:monospace,monospace">void ast_sip_transport_monitor_unregister_all( enum ast_transport_monitor_id id,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">A stray tab somehow got into this line.<br>s/ enum/enum/</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip/pjsip_transport_events.c">File res/res_pjsip/pjsip_transport_events.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip/pjsip_transport_events.c@44">Patch Set #1, Line 44:</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;"> /*! An opaque ID for matching unregisters. */<br> enum ast_transport_monitor_id id;<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You don't need to add id when you can use the callback address to do the job of the id.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Adding the id needlessly increases module coupling. You now have to change res_pjsip code simply to add a new module that needs to monitor a transport. Eventually we'll have to add outbound subscriptions.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Another reason to use the callback address instead of an arbitrary enum is that a matching monitor callback is likely tightly bound to the monitor callback's data. The monitor callback has to know what the arbitrary data passed to it means just like a custom matching function has to know.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_pubsub.c">File res/res_pjsip_pubsub.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_pubsub.c@654">Patch Set #1, Line 654:</a> <code style="font-family:monospace,monospace"> // N.B. ast_sip_transport_monitor_register holds a reference to the sub_tree</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">C++ comment<br>What is N.B.?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_pubsub.c@5546">Patch Set #1, Line 5546:</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;"> ast_sorcery_object_field_register(sorcery, "subscription_persistence", "prune_on_restart", "0", OPT_UINT_T, 0,<br> FLDSET(struct subscription_persistence, prune_on_restart));<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The earlier option is called prune_on_boot not prune_on_restart.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_registrar.c">File res/res_pjsip_registrar.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_registrar.c@590">Patch Set #1, Line 590:</a> <code style="font-family:monospace,monospace"> int prune_on_boot = 0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Initialization is no longer needed as we now always set the value below.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_registrar_expire.c">File res/res_pjsip_registrar_expire.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_registrar_expire.c@35">Patch Set #1, Line 35:</a> <code style="font-family:monospace,monospace">// These are common with res_pjsip_registrar!</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">C++ comment</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8082/1/res/res_pjsip_registrar_expire.c@90">Patch Set #1, Line 90:</a> <code style="font-family:monospace,monospace"> // We don't have a pointer to transport here so we remove from all transports.</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">C++ comment</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8082">change 8082</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/8082"/><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: Iee87cf4eb9b7b2b93d5739a72af52d6ca8fbbe36 </div>
<div style="display:none"> Gerrit-Change-Number: 8082 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 29 Jan 2018 18:39:42 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>