mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
Remove tr_handle_t argument from tr_torrentClose().
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -283,7 +283,7 @@ int main( int argc, char ** argv )
|
||||
}
|
||||
|
||||
cleanup:
|
||||
tr_torrentClose( h, tor );
|
||||
tr_torrentClose( tor );
|
||||
tr_close( h );
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ) )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
folder = info->multifile;
|
||||
}
|
||||
|
||||
tr_torrentClose(fLib, tempTor);
|
||||
tr_torrentClose(tempTor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user