1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 19:03:04 +00:00

Remove tr_handle_t argument from tr_torrentClose().

This commit is contained in:
Josh Elsasser 2007-05-23 04:45:20 +00:00
parent d24a638e07
commit 81a6d96d6e
9 changed files with 14 additions and 13 deletions

View file

@ -311,7 +311,7 @@ void TRWindow::MessageReceived(BMessage *msg) {
// Remove the file from the filesystem.
TRTransfer *item = (TRTransfer*)transfers->RemoveItem(index);
tr_torrentClose(engine, item->GetTorrent());
tr_torrentClose(item->GetTorrent());
BEntry *entry = new BEntry(item->GetCachedPath(), true);
entry->Remove();
delete entry;

View file

@ -283,7 +283,7 @@ int main( int argc, char ** argv )
}
cleanup:
tr_torrentClose( h, tor );
tr_torrentClose( tor );
tr_close( h );
return EXIT_SUCCESS;

View file

@ -642,7 +642,7 @@ timerfunc( int fd UNUSED, short event UNUSED, void * arg UNUSED )
st = tr_torrentStat( tor->tor );
if( TR_STATUS_PAUSE & st->status )
{
tr_torrentClose( gl_handle, tor->tor );
tr_torrentClose( tor->tor );
RB_REMOVE( tortree, &gl_tree, tor );
RB_REMOVE( hashtree, &gl_hashes, tor );
free( tor );
@ -673,7 +673,7 @@ timerfunc( int fd UNUSED, short event UNUSED, void * arg UNUSED )
for( tor = RB_MIN( tortree, &gl_tree ); NULL != tor; tor = next )
{
next = RB_NEXT( tortree, &gl_tree, tor );
tr_torrentClose( gl_handle, tor->tor );
tr_torrentClose( tor->tor );
RB_REMOVE( tortree, &gl_tree, tor );
RB_REMOVE( hashtree, &gl_hashes, tor );
free( tor );

View file

@ -238,7 +238,7 @@ tr_torrent_dispose(GObject *obj) {
if(NULL != self->handle) {
if(!tr_torrent_paused(self))
tr_torrentStop(self->handle);
tr_torrentClose( tr_core_handle( TR_CORE( self->core) ) , self->handle );
tr_torrentClose( self->handle );
self->handle = NULL;
}

View file

@ -663,8 +663,9 @@ void tr_torrentRemoveFastResume( tr_torrent_t * tor )
***********************************************************************
* Frees memory allocated by tr_torrentInit.
**********************************************************************/
void tr_torrentClose( tr_handle_t * h, tr_torrent_t * tor )
void tr_torrentClose( tr_torrent_t * tor )
{
tr_handle_t * h = tor->handle;
tr_info_t * inf = &tor->info;
if( tor->status & ( TR_STATUS_STOPPING | TR_STATUS_STOPPED ) )

View file

@ -367,7 +367,7 @@ void tr_torrentRemoveFastResume( tr_torrent_t * tor );
* Frees memory allocated by tr_torrentInit. If the torrent was running,
* you must call tr_torrentStop() before closing it.
**********************************************************************/
void tr_torrentClose( tr_handle_t *, tr_torrent_t * );
void tr_torrentClose( tr_torrent_t * );
/***********************************************************************
* tr_info_s

View file

@ -782,7 +782,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
files, @"Files", [NSNumber numberWithBool: delete], @"Delete", nil];
[torrentPath release];
tr_torrentClose(fLib, tempTor);
tr_torrentClose(tempTor);
[panel beginSheetForDirectory: nil file: nil types: nil modalForWindow: fWindow modalDelegate: self
didEndSelector: @selector(folderChoiceClosed:returnCode:contextInfo:) contextInfo: dictionary];
}
@ -1971,7 +1971,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
tr_torrent_t * tempTor = tr_torrentInit(fLib, [file UTF8String], NULL, 0, &error);
if (tempTor)
tr_torrentClose(fLib, tempTor);
tr_torrentClose(tempTor);
else if (error != TR_EUNSUPPORTED && error != TR_EDUPLICATE)
[fAutoImportedNames removeObject: [file lastPathComponent]]; //can try to import later
else;
@ -2101,7 +2101,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
int error;
if ((tempTor = tr_torrentInit(fLib, [file UTF8String], NULL, 0, &error)))
{
tr_torrentClose(fLib, tempTor);
tr_torrentClose(tempTor);
[fOverlayWindow setFiles: files];
@ -2142,7 +2142,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
int error;
if ((tempTor = tr_torrentInit(fLib, [file UTF8String], NULL, 0, &error)))
{
tr_torrentClose(fLib, tempTor);
tr_torrentClose(tempTor);
[filesToOpen addObject: file];
}
}

View file

@ -98,7 +98,7 @@
folder = info->multifile;
}
tr_torrentClose(fLib, tempTor);
tr_torrentClose(tempTor);
}
}

View file

@ -183,7 +183,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
{
if (fHandle)
{
tr_torrentClose(fLib, fHandle);
tr_torrentClose(fHandle);
if (fDownloadFolder)
[fDownloadFolder release];