[asterisk-bugs] [JIRA] (ASTERISK-21863) RTP Native Bridge Codec Change Handling - Appears to compare immediately after setting equal

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Tue Jun 4 11:11:03 CDT 2013


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

Richard Mudgett edited comment on ASTERISK-21863 at 6/4/13 11:09 AM:
---------------------------------------------------------------------

The key part of the loop is:

{code}
	for ( ; ; ) {
                         glue1->get_codec(c1, cap1);
			glue0->get_codec(c0, cap0);
		if (........||(!ast_format_cap_identical(cap1, oldcap1))) {
			glue0->update_peer(c0, .....,       cap1, 0) 
			ast_format_cap_copy(oldcap1, cap1);
		}
		if (.....|| (!ast_format_cap_identical(cap0, oldcap0))) { ....
                         glue1->update_peer(c1, ......, cap0, 0) 
			ast_format_cap_copy(oldcap0, cap0);
		}
Processing with delay
	        ast_format_cap_append(oldcap0, cap0);
	        ast_format_cap_append(oldcap1, cap1);
	}
{code}

I will attach a more complete extract and commentary.

This was detected on an old version, but analysed on the current branch 11 version (r381306).  On the asterisk-dev mailing list, Joshua Colp has indicated qualified agreement that there is a real problem, and suggests removing the late updates of the old capabilities and also noting that the code may need to review the joint capabilities.

I have set this to minor simply because it can't affect many people if it has been in the code so long!
                
      was (Author: davidw):
    The key part of the loop is:

	for ( ; ; ) {
                         glue1->get_codec(c1, cap1);
			glue0->get_codec(c0, cap0);
		if (........||(!ast_format_cap_identical(cap1, oldcap1))) {
			glue0->update_peer(c0, .....,       cap1, 0) 
			ast_format_cap_copy(oldcap1, cap1);
		}
		if (.....|| (!ast_format_cap_identical(cap0, oldcap0))) { ....
                         glue1->update_peer(c1, ......, cap0, 0) 
			ast_format_cap_copy(oldcap0, cap0);
		}
Processing with delay
	        ast_format_cap_append(oldcap0, cap0);
	        ast_format_cap_append(oldcap1, cap1);
	}

I will attach a more complete extract and commentary.

This was detected on an old version, but analysed on the current branch 11 version (r381306).  On the asterisk-dev mailing list, Joshua Colp has indicated qualified agreement that there is a real problem, and suggests removing the late updates of the old capabilities and also noting that the code may need to review the joint capabilities.

I have set this to minor simply because it can't affect many people if it has been in the code so long!
                  
> RTP Native Bridge Codec Change Handling - Appears to compare immediately after setting equal
> --------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-21863
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21863
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/RTP
>    Affects Versions: 11.4.0
>            Reporter: David Woolley
>            Severity: Minor
>         Attachments: more_complete_analysys_and_code_extract.txt
>
>
> ast_bridge_result remote_bridge_loop sets the old codec capabilities equal to the current ones immediately before testing whether they differ on the next iteration of the loop, thus meaning it will fail to act on many changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list