[asterisk-dev] [Code Review] Update to chan_unistim functionality
Matt Jordan
reviewboard at asterisk.org
Fri Mar 2 15:13:57 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1243/#review5728
-----------------------------------------------------------
/trunk/channels/chan_unistim.c
<https://reviewboard.asterisk.org/r/1243/#comment10482>
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.
- Matt
On Feb. 28, 2012, 11:02 a.m., IgorG wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1243/
> -----------------------------------------------------------
>
> (Updated Feb. 28, 2012, 11:02 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> New unistim.conf options:
> - Added "debug" global option in unistim.conf, that enable debug when module loaded
> - Added "sharpdial" 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 "language" 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
>
>
> This addresses bug 18229.
> https://issues.asterisk.org/jira/browse/18229
>
>
> Diffs
> -----
>
> /trunk/configs/unistim.conf.sample 357253
> /trunk/contrib/unistimLang/en.po PRE-CREATION
> /trunk/contrib/unistimLang/ru.po PRE-CREATION
> /trunk/contrib/unistimLang/ru.po.utf8 PRE-CREATION
> /trunk/channels/chan_unistim.c 357253
>
> Diff: https://reviewboard.asterisk.org/r/1243/diff
>
>
> Testing
> -------
>
> 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.
>
>
> Thanks,
>
> IgorG
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120302/40b15d15/attachment-0001.htm>
More information about the asterisk-dev
mailing list