[asterisk-bugs] [JIRA] Commented: (ASTERISK-20109) get_ast_cmd doesn't differentiate between failure and empty list return

Jonathan Rose (JIRA) noreply at issues.asterisk.org
Tue Sep 18 13:23:27 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197252#comment-197252 ] 

Jonathan Rose commented on ASTERISK-20109:
------------------------------------------

Jeremiah:

Hey, I have an update to this patch that I would like you to evaluate for me. Could you give it a quick test run?

https://reviewboard.asterisk.org/r/2117/diff/raw/

The patch is against trunk and required a minor change to account for the channel opacification patches in 11 and above, so you will either need to use 11 or trunk to test the patch or you'll have to modify the patch to remove the ast_channel_name function and replace it with chan->name.

> get_ast_cmd doesn't differentiate between failure and empty list return
> -----------------------------------------------------------------------
>
>                 Key: ASTERISK-20109
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20109
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_agi
>    Affects Versions: 10.5.1
>         Environment: openSuSE 11.4 64bit on Dell M610 blade
>            Reporter: Jeremiah Gowdy
>            Assignee: Rusty Newton
>            Severity: Minor
>         Attachments: jgowdy-7-9-2012.diff
>
>
> In res_agi, the get_ast_cmd method returns NULL in the case of "Async AGI datastore disappeared" and in the fairly normal case of empty work list.  In the current code, when the datastore disappears (which I've yet to determine why), the at least one of the channels in the associated bridge tend to survive for approximately 30 seconds with repeated broken pipe errors.
> By changing the return value to int and taking the struct pointer by pointer, we are able to properly convey the different conditions to the caller, and thus fail much more quickly.  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list