[Asterisk-code-review] pjsip distributor.c: Use correct rdata info access method (P... (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Tue May 31 13:37:29 CDT 2016


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/2925

Change subject: pjsip_distributor.c: Use correct rdata info access method (Part 2).
......................................................................

pjsip_distributor.c: Use correct rdata info access method (Part 2).

The pjproject doxygen for rdata->msg_info.info says to call
pjsip_rx_data_get_info() instead of accessing the struct member directly.
You need to call the function mostly because the function will generate
the struct member value if it is not already setup.

Change-Id: I4d519385a577f3e9d9193a88125e493cf17fa799
---
M res/res_pjsip/pjsip_distributor.c
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/2925/1

diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index 0d3df06..3867eae 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -297,13 +297,13 @@
 
 	if (dlg) {
 		ast_debug(3, "Searching for serializer on dialog %s for %s\n",
-				dlg->obj_name, rdata->msg_info.info);
+			dlg->obj_name, pjsip_rx_data_get_info(rdata));
 		dist = pjsip_dlg_get_mod_data(dlg, distributor_mod.id);
 		if (dist) {
 			serializer = ao2_bump(dist->serializer);
 			if (serializer) {
 				ast_debug(3, "Found serializer %s on dialog %s\n",
-						ast_taskprocessor_name(serializer), dlg->obj_name);
+					ast_taskprocessor_name(serializer), dlg->obj_name);
 			}
 		}
 		pjsip_dlg_dec_lock(dlg);
@@ -313,7 +313,7 @@
 		/* We have a serializer so we know where to send the message. */
 	} else if (rdata->msg_info.msg->type == PJSIP_RESPONSE_MSG) {
 		ast_debug(3, "No dialog serializer for response %s. Using request transaction as basis\n",
-				rdata->msg_info.info);
+			pjsip_rx_data_get_info(rdata));
 		serializer = find_request_serializer(rdata);
 	} else if (!pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, &pjsip_cancel_method)
 		|| !pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, &pjsip_bye_method)) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d519385a577f3e9d9193a88125e493cf17fa799
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list