Changeset 8538


Ignore:
Timestamp:
May 26, 2009, 8:52:08 PM (12 years ago)
Author:
charles
Message:

(trunk libT) probable fix for #2111: session-set causes crash on second attempt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/port-forwarding.c

    r8454 r8538  
    7373    int newStatus;
    7474
     75    if( s->natpmp == NULL )
     76        s->natpmp = tr_natpmpInit( );
     77    if( s->upnp == NULL )
     78        s->upnp = tr_upnpInit( );
     79
    7580    oldStatus = tr_sharedTraversalStatus( s );
    7681    s->natpmpStatus = tr_natpmpPulse( s->natpmp, port, isEnabled );
     
    132137
    133138    s->session      = session;
    134     s->natpmp       = tr_natpmpInit( );
    135     s->upnp         = tr_upnpInit( );
    136139    s->isEnabled    = isEnabled;
    137140    s->upnpStatus   = TR_PORT_UNMAPPED;
     
    168171    natPulse( s, FALSE );
    169172    tr_natpmpClose( s->natpmp );
     173    s->natpmp = NULL;
    170174    tr_upnpClose( s->upnp );
     175    s->upnp = NULL;
    171176    stop_timer( s );
    172177}
Note: See TracChangeset for help on using the changeset viewer.