diff options
author | Liong Sauw Ming <ming@teluu.com> | 2013-07-12 05:01:38 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2013-07-12 05:01:38 +0000 |
commit | cf7a3c65d8ccfb3e50cc4a6811055ba2dcd6b075 (patch) | |
tree | c53a7b20d11e8cd1614fa74c820e820f95c5c577 /pjsip/src | |
parent | cd3db394c32bd2383d65482566071c9885eaebcc (diff) |
Fixed #1689: The bound address is not updated when UDP transport is restarted
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4559 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsip/sip_transport_udp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_transport_udp.c b/pjsip/src/pjsip/sip_transport_udp.c index 0f964a7d..bdd04161 100644 --- a/pjsip/src/pjsip/sip_transport_udp.c +++ b/pjsip/src/pjsip/sip_transport_udp.c @@ -1058,6 +1058,12 @@ PJ_DEF(pj_status_t) pjsip_udp_transport_restart(pjsip_transport *transport, a_name = &bound_name; } + /* Init local address. */ + status = pj_sock_getsockname(sock, &tp->base.local_addr, + &tp->base.addr_len); + if (status != PJ_SUCCESS) + return status; + /* Assign the socket and published address to transport. */ udp_set_socket(tp, sock, a_name); |