1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

a little work with rpc

This commit is contained in:
Mitchell Livingston 2008-05-25 17:34:02 +00:00
parent 59bcac8fe1
commit 5f9ec561e6

View file

@ -828,7 +828,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
if (add)
{
[torrent setOrderValue: [fTorrents count]-1]; //ensure that queue order is always sequential
[torrent setOrderValue: [fTorrents count]]; //ensure that queue order is always sequential
[torrent update];
[fTorrents addObject: torrent];
@ -4147,8 +4147,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) rpcCallback: (tr_rpc_callback_type) type forTorrentStruct: (struct tr_torrent *) torrentStruct
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
//get the torrent
if (torrentStruct != NULL)
if (torrentStruct != NULL && type != TR_RPC_TORRENT_ADDED)
{
NSEnumerator * enumerator = [fTorrents objectEnumerator];
Torrent * torrent;
@ -4178,6 +4180,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
case TR_RPC_SESSION_CHANGED:
break;
}
[pool release];
}
/*- (void) ipcQuit