]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pjsip_distributor.c: Use correct rdata info access method (Part 2). 24/2924/1
authorRichard Mudgett <rmudgett@digium.com>
Tue, 31 May 2016 18:02:15 +0000 (13:02 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 31 May 2016 18:34:26 +0000 (13:34 -0500)
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

res/res_pjsip/pjsip_distributor.c

index 0d3df06f071ee135d39f1b5426e5cd385e7a9e41..3867eaea0c8c838df76c590e7760b1c88ffa2e87 100644 (file)
@@ -297,13 +297,13 @@ static pj_bool_t distributor(pjsip_rx_data *rdata)
 
        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 @@ static pj_bool_t distributor(pjsip_rx_data *rdata)
                /* 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)) {