[asterisk-commits] pjsip distributor.c: Update some debug messages to get trans... (asterisk[certified/13.13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 21 22:38:55 CST 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5039 )

Change subject: pjsip_distributor.c: Update some debug messages to get transaction name.
......................................................................


pjsip_distributor.c: Update some debug messages to get transaction name.

* Removed overloaded unmatched response ignore.  We obviously sent the
request so we shouldn't ignore it because it isn't new work.

ASTERISK-26669
ASTERISK-26738

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

Approvals:
  Kevin Harwell: Looks good to me, approved
  Joshua Colp: Looks good to me, but someone else must approve; Verified



diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index dbf53db..98bb455 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -110,12 +110,12 @@
 
 	tsx = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_TRUE);
 	if (!tsx) {
-		ast_debug(1, "Could not find %.*s transaction for %d response.\n",
-			(int) pj_strlen(&rdata->msg_info.cseq->method.name),
-			pj_strbuf(&rdata->msg_info.cseq->method.name),
-			rdata->msg_info.msg->line.status.code);
+		ast_debug(1, "Could not find transaction for %s.\n",
+			pjsip_rx_data_get_info(rdata));
 		return NULL;
 	}
+	ast_debug(3, "Found transaction %s for %s.\n",
+		tsx->obj_name, pjsip_rx_data_get_info(rdata));
 
 	if (tsx->last_tx) {
 		const char *serializer_name;
@@ -392,21 +392,14 @@
 	if (serializer) {
 		/* 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",
+		ast_debug(3, "No dialog serializer for %s.  Using request transaction as basis.\n",
 			pjsip_rx_data_get_info(rdata));
 		serializer = find_request_serializer(rdata);
 		if (!serializer) {
-			if (ast_taskprocessor_alert_get()) {
-				/* We're overloaded, ignore the unmatched response. */
-				ast_debug(3, "Taskprocessor overload alert: Ignoring unmatched '%s'.\n",
-					pjsip_rx_data_get_info(rdata));
-				return PJ_TRUE;
-			}
-
 			/*
-			 * Pick a serializer for the unmatched response.  Maybe
-			 * the stack can figure out what it is for, or we really
-			 * should just toss it regardless.
+			 * Pick a serializer for the unmatched response.
+			 * We couldn't determine what serializer originally
+			 * sent the request or the serializer is gone.
 			 */
 			serializer = ast_sip_get_distributor_serializer(rdata);
 		}
@@ -750,7 +743,7 @@
 		.start_mod = &distributor_mod,
 		.idx_after_start = 1,
 	};
-	pj_bool_t handled;
+	pj_bool_t handled = PJ_FALSE;
 	pjsip_rx_data *rdata = data;
 	int is_request = rdata->msg_info.msg->type == PJSIP_REQUEST_MSG;
 	int is_ack = is_request ? rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD : 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55fb5cadc83a8e6699b347c6dc7fa32c5a617d37
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list