<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">So the only scary change is the now-not-mandatory unref call in the macro.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Note that this is still a lot less scary than it sounded.</p><p style="white-space: pre-wrap; word-wrap: break-word;">While writing the reply, I mistakenly started believing that the refcall<br>was always called -- even for schedules that weren't set. It is not.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Previously it did:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">    if (id > -1) \    <-- this if already existed<br>        refcall; \</pre><p style="white-space: pre-wrap; word-wrap: break-word;">Now it still does:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">    } else if (_id > -1) { \<br>        refcall; \</pre><p style="white-space: pre-wrap; word-wrap: break-word;">That means:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">* if ID was -1 => neither will call `refcall`<br>* if ID was not -1 AND sched_del succeeded => both will call `refcall`<br>* only if ID was not -1 AND sched_del failed 10 times => now there's a<br>  difference in behaviour</pre><p style="white-space: pre-wrap; word-wrap: break-word;">ast_sched_del should not fail 10 times. And every time it does fail,<br>we're in a "Uh oh this shouldn't happen" state anyway.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>>> Have you tried running the Asterisk testsuite against this change?</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">No. I thought the friendly-automation and its verified+1 did that.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Was my assumption wrong? Please confirm.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>> dialog->request_queue_sched_id does nothing at all: that's scary<br>> actually, does it clean up after someone elses ref?</p><p style="white-space: pre-wrap; word-wrap: break-word;">I take it back. It's not scary, because dialog->request_queue_sched_id<br>stays -1, so the unref is not called in either code.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/10991">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/10991">change 10991</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/10991"/><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-Change-Id: Ic26777fa0732725e6ca7010df17af77a012aa856 </div>
<div style="display:none"> Gerrit-Change-Number: 10991 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Walter Doekes <walter+asterisk@wjd.nu> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Walter Doekes <walter+asterisk@wjd.nu> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 09 Apr 2019 09:10:36 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>