[asterisk-bugs] [JIRA] (ASTERISK-23059) The users of ao2_iterator_cleanup() are violating the ao2_iterator opacity.

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri Dec 20 18:11:06 CST 2013


Rusty Newton created ASTERISK-23059:
---------------------------------------

             Summary: The users of ao2_iterator_cleanup() are violating the ao2_iterator opacity.
                 Key: ASTERISK-23059
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23059
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_pjsip_session
    Affects Versions: 12.0.0-beta2
            Reporter: Richard Mudgett


You are not supposed to access any members of struct ao2_iterator directly as documented where the struct is defined in astobj2.h:
{noformat}
/*!
 * \brief The astobj2 iterator
 *
 * \note You are not supposed to know the internals of an iterator!
 * We would like the iterator to be opaque, unfortunately
 * its size needs to be known if we want to store it around
 * without too much trouble.
 * Anyways...
 * The iterator has a pointer to the container, and a flags
 * field specifying various things e.g. whether the container
 * should be locked or not while navigating on it.
 * The iterator "points" to the current container node.
 *
 * Details are in the implementation of ao2_iterator_next()
 */
struct ao2_iterator
{noformat}

The violators are these functions:
handle_negotiated_sdp()
create_local_sdp()

--
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