[Asterisk-code-review] config transport: Fix objects returned by ast sip get trans... (asterisk[13])

George Joseph asteriskteam at digium.com
Fri Mar 4 01:49:22 CST 2016


George Joseph has posted comments on this change.

Change subject: config_transport:  Fix objects returned by ast_sip_get_transport_states
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/2346/1/res/res_pjsip/config_transport.c
File res/res_pjsip/config_transport.c:

Line 1299: static int populate_transport_states(void *obj, void *arg, int flags)
         : {
         : 	struct internal_state *state = obj;
         : 	struct ao2_container *container = arg;
         : 
         : 	ao2_link(container, state->state);
         : 
         : 	return CMP_MATCH;
         : }
         : 
         : struct ao2_container *ast_sip_get_transport_states(void)
         : {
         : 	struct ao2_container *states = ao2_container_alloc(DEFAULT_STATE_BUCKETS, transport_state_hash, transport_state_cmp);
         : 
         : 	if (!states) {
         : 		return NULL;
         : 	}
         : 
         : 	ao2_callback(transport_states, OBJ_NODATA | OBJ_MULTIPLE, populate_transport_states, states);
         : 	return states;
         : }
> This code is duplicating ao2_container_dup()
Nope.  transport_states contains internal_state objects.  The container to be returned needs to contain ast_sip_transport_state "state->state".


-- 
To view, visit https://gerrit.asterisk.org/2346
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1aee6a2fd46c42e8dd0af72498d17de459ac750e
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list