Module: sip-router
Branch: master
Commit: 131139883c03f3851ad99e96c59dfe3c349ec011
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=131139883c03f3851ad99e96c59dfe3c349ec011

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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

---

 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))


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to