Changeset 10538


Ignore:
Timestamp:
Apr 28, 2010, 4:57:21 AM (11 years ago)
Author:
charles
Message:

(trunk libT) #3078 "Transmission closes socket after SIGHUP" -- experimental fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r10535 r10538  
    628628
    629629static void turtleBootstrap( tr_session *, struct tr_turtle_info * );
     630static void setPeerPort( tr_session * session, tr_port port );
    630631
    631632static void
     
    736737    if( !tr_bencDictFindInt( settings, TR_PREFS_KEY_PEER_PORT, &i ) )
    737738        i = session->peerPort;
    738     tr_sessionSetPeerPort( session, boolVal ? getRandomPort( session ) : i );
     739    setPeerPort( session, boolVal ? getRandomPort( session ) : i );
    739740    if( tr_bencDictFindBool( settings, TR_PREFS_KEY_PORT_FORWARDING, &boolVal ) )
    740741        tr_sessionSetPortForwardingEnabled( session, boolVal );
     
    947948
    948949static void
    949 setPeerPort( void * session )
     950peerPortChanged( void * session )
    950951{
    951952    tr_torrent * tor = NULL;
     
    961962}
    962963
     964static void
     965setPeerPort( tr_session * session, tr_port port )
     966{
     967    session->peerPort = port;
     968
     969    tr_runInEventThread( session, peerPortChanged, session );
     970}
     971
    963972void
    964973tr_sessionSetPeerPort( tr_session * session, tr_port port )
     
    968977    if( session->peerPort != port )
    969978    {
    970         session->peerPort = port;
    971 
    972         tr_runInEventThread( session, setPeerPort, session );
     979        setPeerPort( session, port );
    973980    }
    974981}
Note: See TracChangeset for help on using the changeset viewer.