Module: sip-router
Branch: 4.1
Commit: 88031fe50236f9eb1fc28309fd466e86d8c6b81b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=88031fe…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sun Sep 28 12:49:27 2014 +0200
tm: use advertised addr/port if set for socket in rm rpc uac commands
- reported by Juha Heinanen
(cherry picked from commit 131139883c03f3851ad99e96c59dfe3c349ec011)
---
modules/tm/rpc_uac.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/modules/tm/rpc_uac.c b/modules/tm/rpc_uac.c
index a305b63..507f4ae 100644
--- a/modules/tm/rpc_uac.c
+++ b/modules/tm/rpc_uac.c
@@ -156,12 +156,10 @@ static char *get_hfblock(str *uri, struct hdr_field *hf, int proto,
total_len = 0;
last = &sl;
last->next = 0;
+ sock_name = 0;
+ portname = 0;
if (ssock){
- sock_name = &ssock->address_str;
- portname = &ssock->port_no_str;
- }else{
- sock_name = 0;
- portname = 0;
+ si_get_signaling_data(ssock, &sock_name, &portname);
}
for (; hf; hf = hf->next) {
@@ -197,8 +195,7 @@ static char *get_hfblock(str *uri, struct hdr_field *hf, int proto,
" failed\n");
goto error;
}
- sock_name = &di.send_sock->address_str;
- portname = &di.send_sock->port_no_str;
+ si_get_signaling_data(di.send_sock, &sock_name, &portname);
}
if (!append_str_list(sock_name->s, sock_name->len, &last,
&total_len))