mirror of
https://github.com/transmission/transmission
synced 2025-03-09 21:54:09 +00:00
I will not commit without compiling first.
I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first. I will not commit without compiling first.
This commit is contained in:
parent
3ea2daa3bc
commit
794bd1a801
1 changed files with 6 additions and 6 deletions
|
@ -85,7 +85,7 @@ tr_handle_t * tr_init()
|
|||
**********************************************************************/
|
||||
void tr_setBindPort( tr_handle_t * h, int port )
|
||||
{
|
||||
int sock;
|
||||
int sock = -1;
|
||||
tr_torrent_t * tor;
|
||||
|
||||
if( h->bindPort == port )
|
||||
|
@ -252,6 +252,11 @@ tr_torrent_t * tr_torrentInit( tr_handle_t * h, const char * path,
|
|||
(h->torrentCount)++;
|
||||
tr_lockUnlock( &h->acceptLock );
|
||||
|
||||
if( 0 > h->bindPort )
|
||||
{
|
||||
tr_setBindPort( h, TR_DEFAULT_PORT );
|
||||
}
|
||||
|
||||
return tor;
|
||||
}
|
||||
|
||||
|
@ -289,11 +294,6 @@ void tr_torrentStart( tr_torrent_t * tor )
|
|||
tor->status = TR_STATUS_CHECK;
|
||||
tor->tracker = tr_trackerInit( tor );
|
||||
|
||||
if( 0 > h->bindPort )
|
||||
{
|
||||
tr_setBindPort( h, TR_DEFAULT_PORT );
|
||||
}
|
||||
|
||||
tor->date = tr_date();
|
||||
tor->die = 0;
|
||||
tr_threadCreate( &tor->thread, downloadLoop, tor );
|
||||
|
|
Loading…
Add table
Reference in a new issue