Changeset 10554


Ignore:
Timestamp:
Apr 30, 2010, 5:38:40 PM (11 years ago)
Author:
charles
Message:

(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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r10550 r10554  
    215215tr_sessionGetPublicAddress( const tr_session * session, int tr_af_type )
    216216{
     217    const struct tr_bindinfo * bindinfo;
     218
    217219    switch( tr_af_type )
    218220    {
    219         case TR_AF_INET: return &session->public_ipv4->addr;
    220         case TR_AF_INET6: return &session->public_ipv6->addr; break;
    221         default: return NULL;
    222     }
     221        case TR_AF_INET:  bindinfo = session->public_ipv4; break;
     222        case TR_AF_INET6: bindinfo = session->public_ipv6; break;
     223        default:          bindinfo = NULL;                 break;
     224    }
     225
     226    return bindinfo ? &bindinfo->addr : NULL;
    223227}
    224228
Note: See TracChangeset for help on using the changeset viewer.