Changeset 10568


Ignore:
Timestamp:
May 1, 2010, 3:48:39 AM (11 years ago)
Author:
charles
Message:

(1.9x libT) backport r10538 for #3078 "transmission closes socket after SIGHUP"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.9x/libtransmission/session.c

    r10564 r10568  
    625625
    626626static void turtleBootstrap( tr_session *, struct tr_turtle_info * );
     627static void setPeerPort( tr_session * session, tr_port port );
    627628
    628629static void
     
    728729    if( !tr_bencDictFindInt( settings, TR_PREFS_KEY_PEER_PORT, &i ) )
    729730        i = session->peerPort;
    730     tr_sessionSetPeerPort( session, boolVal ? getRandomPort( session ) : i );
     731    setPeerPort( session, boolVal ? getRandomPort( session ) : i );
    731732    if( tr_bencDictFindBool( settings, TR_PREFS_KEY_PORT_FORWARDING, &boolVal ) )
    732733        tr_sessionSetPortForwardingEnabled( session, boolVal );
     
    939940
    940941static void
    941 setPeerPort( void * session )
     942peerPortChanged( void * session )
    942943{
    943944    tr_torrent * tor = NULL;
     
    953954}
    954955
     956static void
     957setPeerPort( tr_session * session, tr_port port )
     958{
     959    session->peerPort = port;
     960
     961    tr_runInEventThread( session, peerPortChanged, session );
     962}
     963
    955964void
    956965tr_sessionSetPeerPort( tr_session * session, tr_port port )
     
    960969    if( session->peerPort != port )
    961970    {
    962         session->peerPort = port;
    963 
    964         tr_runInEventThread( session, setPeerPort, session );
     971        setPeerPort( session, port );
    965972    }
    966973}
Note: See TracChangeset for help on using the changeset viewer.