1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 06:02:57 +00:00

Fix cli so that it can exit.

This commit is contained in:
Josh Elsasser 2007-07-18 17:31:00 +00:00
parent 65ff7e43c2
commit c3de527978

View file

@ -247,6 +247,7 @@ int main( int argc, char ** argv )
{ {
gotsig = 0; gotsig = 0;
tr_torrentStop( tor ); tr_torrentStop( tor );
tr_natTraversalEnable( h, 0 );
} }
s = tr_torrentStat( tor ); s = tr_torrentStat( tor );
@ -282,6 +283,10 @@ int main( int argc, char ** argv )
{ {
chars = snprintf( string, sizeof string, "Stopping..." ); chars = snprintf( string, sizeof string, "Stopping..." );
} }
else if( s->status & TR_STATUS_INACTIVE )
{
break;
}
if( ( signed )sizeof string > chars ) if( ( signed )sizeof string > chars )
{ {
memset( &string[chars], ' ', sizeof string - 1 - chars ); memset( &string[chars], ' ', sizeof string - 1 - chars );