sip: get local TCP address in establish handler (#146)
After calling tcp_connect(), the address returned by tcp_conn_local_get() is 0.0.0.0 on some platforms (Windows). The local address of the TCP-connection is not available until the TCP connection is fully established, so fetch the address again in the established handler. Reference: https://github.com/alfredh/baresip/issues/431
This commit is contained in:
parent
055195d2ea
commit
4ded6cbcc9
1 changed files with 4 additions and 0 deletions
|
@ -459,6 +459,10 @@ static void tcp_estab_handler(void *arg)
|
|||
struct le *le;
|
||||
int err;
|
||||
|
||||
#ifdef WIN32
|
||||
tcp_conn_local_get(conn->tc, &conn->laddr);
|
||||
#endif
|
||||
|
||||
conn->established = true;
|
||||
|
||||
le = list_head(&conn->ql);
|
||||
|
|
Loading…
Add table
Reference in a new issue