<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2260/">https://reviewboard.asterisk.org/r/2260/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is one of those reviews where clicking the "Ship it!" is incredibly scary. You've modified large portions of the most volatile channel driver in Asterisk, but I can't pinpoint anything wrong with what you've done. Pair that with the fact I know you've been testing this a lot lately, and I'm inclined to go ahead and click it.</pre>
<br />
<p>- Mark</p>
<br />
<p>On January 3rd, 2013, 4:39 p.m., rmudgett wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By rmudgett.</div>
<p style="color: grey;"><i>Updated Jan. 3, 2013, 4:39 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Multiple channels logging in as the same agent can result in dead channels waiting for a condition signal that will never come because another channel thread stole it. The symptom is chan_sip repeatedly generating warning messages about rescheduling autodestruction of dialogs with an agent channel owner.
* Made only login_exec() (the app AgentLogin) clear the agent_pvt->chan pointer to prevent multiple channels from logging in as the same agent. agent_read(), agent_call(), and agent_set_base_channel() no longer disconnect the agent channel from the agent_pvt. This also eliminates the need to keep checking for agent_pvt->chan being NULL.
* Made agent_hangup() not wake up the AgentLogin agent thread until it is done.
* Made agent_request() not able to get the agent until he has logged in and any wrapup time has expired.
* Made agent_request() use ast_hangup() instead of agent_hangup() to correctly dispose of a channel.
* Removed agent_set_base_channel(). Nobody calls it and it is a bad thing in general.
* Made only agent_devicestate() determine the current device state of an agent. Note: Agent group device states have never been supported.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Overnight stress testing no longer has these dead channels.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/channels/chan_agent.c <span style="color: grey">(378488)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2260/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>