(trunk) modify tr_torrentParse() and tr_torrentNew() arguments s.t. they use the ctor's session instead of passing it in again. Allow a NULL session pointer for some cases of tr_torrentParse().

This commit is contained in:
Charles Kerr
2009-04-02 17:30:29 +00:00
parent e649e80fe5
commit c3b24bc471
15 changed files with 55 additions and 41 deletions

View File

@@ -355,7 +355,7 @@ main( int argc,
{
tr_info info;
if( !tr_torrentParse( h, ctor, &info ) )
if( !tr_torrentParse( ctor, &info ) )
{
int i;
const time_t start = time( NULL );
@@ -391,7 +391,7 @@ main( int argc,
{
tr_info info;
if( !tr_torrentParse( h, ctor, &info ) )
if( !tr_torrentParse( ctor, &info ) )
{
dumpInfo( stdout, &info );
tr_metainfoFree( &info );
@@ -401,7 +401,7 @@ main( int argc,
goto cleanup;
}
tor = tr_torrentNew( h, ctor, &error );
tor = tr_torrentNew( ctor, &error );
tr_ctorFree( ctor );
if( !tor )
{