[sr-dev] git:5.1:8a21170c: siptrace: don't calculate message source socket if already set

Federico Cabiddu fcabiddu at libon.com
Thu Jan 17 09:44:07 CET 2019


Module: kamailio
Branch: 5.1
Commit: 8a21170c3a5283b84e0ff3cbc6db8c72413dec05
URL: https://github.com/kamailio/kamailio/commit/8a21170c3a5283b84e0ff3cbc6db8c72413dec05

Author: Federico Cabiddu <fcabiddu at libon.com>
Committer: Federico Cabiddu <fcabiddu at libon.com>
Date: 2019-01-17T09:43:47+01:00

siptrace: don't calculate message source socket if already set

(cherry picked from commit 929a24f08aeef6b72999ac9b188ffeded40759a9)

---

Modified: src/modules/siptrace/siptrace.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8a21170c3a5283b84e0ff3cbc6db8c72413dec05.diff
Patch: https://github.com/kamailio/kamailio/commit/8a21170c3a5283b84e0ff3cbc6db8c72413dec05.patch

---

diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 035ace455b..1e26bc2131 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1520,7 +1520,10 @@ int siptrace_net_data_send(sr_event_param_t *evp)
 		return -1;
 
 	new_dst = *nd->dst;
-	new_dst.send_sock = get_send_socket(0, &nd->dst->to, nd->dst->proto);
+
+	if(new_dst.send_sock == 0) {
+		new_dst.send_sock = get_send_socket(0, &nd->dst->to, nd->dst->proto);
+	}
 
 	memset(&sto, 0, sizeof(siptrace_data_t));
 




More information about the sr-dev mailing list