<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/1243/">https://reviewboard.asterisk.org/r/1243/</a>
     </td>
    </tr>
   </table>
   <br />









<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/1243/diff/6/?file=25088#file25088line897" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/channels/chan_unistim.c</a>
    <span style="font-weight: normal;">

     (Diff revision 6)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static void display_last_error(const char *sz_msg)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">820</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">lang_entry</span> <span class="o">=</span> <span class="n">ao2_find</span><span class="p">(</span><span class="n">lang</span><span class="o">-&gt;</span><span class="n">trans</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">le_search</span><span class="p">,</span> <span class="n">OBJ_POINTER</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">821</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">if</span> <span class="p">(</span><span class="n">lang_entry</span><span class="p">)</span> <span class="p">{</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When you call ao2_find and it returns a non-NULL object, the reference count on the object has been increased by 1.  This keeps the object from being automatically disposed of if, somewhere else in the code, someone decreased the reference count.  In the code above, assume that the ao2_object has a ref count of 1 the first time ao2_find is called and that object matches.  When ao2_find returns, the ref count is 2.  The next time through: 3.

When the container is disposed of, it does not destroy the objects - it merely unlinks them and decrements the ref count by 1.  So if we called that method twice (having a ref count of 3), and then the container was destroyed, the ao2_object would have a ref count of 2 - and the destructor would never get called.

The safest thing to do would be to copy the string contained in the object into a buffer that is given to this method.  You can then deref lang_entry and return.</pre>
</div>
<br />



<p>- Matt</p>


<br />
<p>On February 28th, 2012, 11:02 a.m., IgorG 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 IgorG.</div>


<p style="color: grey;"><i>Updated Feb. 28, 2012, 11:02 a.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;">New unistim.conf options:
- Added &quot;debug&quot; global option in unistim.conf, that enable debug when module loaded
- Added &quot;sharpdial&quot; option, enable sending call whet # key pressed

New features:
- ability for changing display language (tested on Russian language). Use .po files in encoding, able to display
  ISO 8859-1, ISO 8859-2, ISO 8859-4, ISO 8859-5, ISO 2022-JP. For selecting language can be used option &quot;language&quot; in
  unistim.conf or screen menu.
- Support for multilines
- Support for holding multiple lines
- More fixes for display on i2002 phone
- Configurable keys for sending and received history
- Menu for selecting codec, contrast (not yet completed) or display language
- Show clock at first line of idle phone
- Add ability for pick up call
- Pick up call by using on-screen soft key
- Change displaying list of received or send calls (callerid, time and caller name on different screens, listed by lef-right keys)

Changes:
- Changed entering on screen phone number, so any number of digits can be entered
- rtp_port now used start rtp port
- list of dial tone frequecies now loaded from indications.conf and not hardcoded
- Key with globe icon how calls menu and not directly codec selection

Fixes:
- 0017406 Correct updating LED when switching between speekerphone and handset or hanging up
- 0017327 Multiple crashes when using phone
- 0016867 Fixed playing dialtone in some scenarious when conversation already started
- Fixed dispalying on-screen information when using Redial softkey (DN number and timer displayed).
- Not sending short ring in case of call forward enabled on phone</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;">Testing done by issue tracker users: ibercom, scsiborg, idarwin, TeknoJuce, c0rnoTa. 
Tested on production system by Jonn Taylor (jonnt) using phone models: Nortel i2004, 1120E and 1140E.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/18229">18229</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/configs/unistim.conf.sample <span style="color: grey">(357253)</span></li>

 <li>/trunk/contrib/unistimLang/en.po <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/contrib/unistimLang/ru.po <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/contrib/unistimLang/ru.po.utf8 <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/channels/chan_unistim.c <span style="color: grey">(357253)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/1243/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>