[sr-dev] git:master:23589c70: pv: use macro to get port based on proto

Daniel-Constantin Mierla miconda at gmail.com
Tue Jul 6 20:45:13 CEST 2021


Module: kamailio
Branch: master
Commit: 23589c70353af794e83d9a7a6070ba3cc1666811
URL: https://github.com/kamailio/kamailio/commit/23589c70353af794e83d9a7a6070ba3cc1666811

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-07-06T11:08:00+02:00

pv: use macro to get port based on proto

---

Modified: src/modules/pv/pv_branch.c

---

Diff:  https://github.com/kamailio/kamailio/commit/23589c70353af794e83d9a7a6070ba3cc1666811.diff
Patch: https://github.com/kamailio/kamailio/commit/23589c70353af794e83d9a7a6070ba3cc1666811.patch

---

diff --git a/src/modules/pv/pv_branch.c b/src/modules/pv/pv_branch.c
index 475b1cdc3e..ecce3156e7 100644
--- a/src/modules/pv/pv_branch.c
+++ b/src/modules/pv/pv_branch.c
@@ -704,7 +704,7 @@ int pv_get_nh_reply(struct sip_msg *msg, pv_param_t *param,
 		host = msg->via2->host;
 	}
 	if(port==0) {
-		port = (msg->via2->port)?msg->via2->port:SIP_PORT;
+		port = GET_SIP_PORT(msg->via2->port, msg->via2->proto);
 	}
 
 	switch(param->pvn.u.isname.name.n) {




More information about the sr-dev mailing list