mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
(trunk libT) #3117 "Tracker queries to not honor bind-address-ipv4" -- fix a crash-on-shutdown reported by Waldorf in #3181. The crash was introduced by r10535 for #3117
This commit is contained in:
parent
24129b9bf5
commit
5eab3318ff
1 changed files with 7 additions and 3 deletions
|
@ -214,12 +214,16 @@ open_incoming_peer_port( tr_session * session )
|
||||||
const tr_address*
|
const tr_address*
|
||||||
tr_sessionGetPublicAddress( const tr_session * session, int tr_af_type )
|
tr_sessionGetPublicAddress( const tr_session * session, int tr_af_type )
|
||||||
{
|
{
|
||||||
|
const struct tr_bindinfo * bindinfo;
|
||||||
|
|
||||||
switch( tr_af_type )
|
switch( tr_af_type )
|
||||||
{
|
{
|
||||||
case TR_AF_INET: return &session->public_ipv4->addr;
|
case TR_AF_INET: bindinfo = session->public_ipv4; break;
|
||||||
case TR_AF_INET6: return &session->public_ipv6->addr; break;
|
case TR_AF_INET6: bindinfo = session->public_ipv6; break;
|
||||||
default: return NULL;
|
default: bindinfo = NULL; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return bindinfo ? &bindinfo->addr : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
Loading…
Reference in a new issue