Module: kamailio
Branch: 5.1
Commit: 8a21170c3a5283b84e0ff3cbc6db8c72413dec05
URL:
https://github.com/kamailio/kamailio/commit/8a21170c3a5283b84e0ff3cbc6db8c7…
Author: Federico Cabiddu <fcabiddu(a)libon.com>
Committer: Federico Cabiddu <fcabiddu(a)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/8a21170c3a5283b84e0ff3cbc6db8c7…
Patch:
https://github.com/kamailio/kamailio/commit/8a21170c3a5283b84e0ff3cbc6db8c7…
---
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));