Changeset 5543


Ignore:
Timestamp:
Apr 6, 2008, 4:50:41 PM (14 years ago)
Author:
charles
Message:

#846: transmissioncli attempts to bind to port even when not needed

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/transmissioncli.c

    r5517 r5543  
    140140    }
    141141
     142    /* don't bind the port if we're just running the CLI
     143     * to get metainfo or to create a torrent */
     144    if( showInfo || ( sourceFile != NULL ) )
     145        bindPort = -1;
     146
    142147    /* Initialize libtransmission */
    143148    h = tr_initFull( tr_getDefaultConfigDir(),
  • trunk/libtransmission/shared.c

    r5486 r5543  
    111111    }
    112112
    113     if( s->bindPort != s->publicPort )
     113    if( ( s->publicPort > 0 ) && ( s->bindPort != s->publicPort ) )
    114114    {
    115115        int socket;
    116116        errno = 0;
    117117        socket = tr_netBindTCP( s->publicPort );
     118fprintf( stderr, "opening socket on %d to listen\n", s->publicPort );
    118119        if( socket >= 0 ) {
    119120            tr_ninf( getKey(), _( "Opened port %d to listen for incoming peer connections" ), s->publicPort );
Note: See TracChangeset for help on using the changeset viewer.