mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
#1055 transmission-remote --list outputs an empty list
This commit is contained in:
parent
6450f36349
commit
707f5b81e1
1 changed files with 6 additions and 8 deletions
|
@ -329,17 +329,15 @@ processResponse( const char * host, int port,
|
||||||
for( i=0, n=tr_bencListSize( list ); i<n; ++i )
|
for( i=0, n=tr_bencListSize( list ); i<n; ++i )
|
||||||
{
|
{
|
||||||
int64_t id, eta, status, up, down, sizeWhenDone, leftUntilDone;
|
int64_t id, eta, status, up, down, sizeWhenDone, leftUntilDone;
|
||||||
const char *name, *ratiostr;
|
const char *name;
|
||||||
tr_benc * d = tr_bencListChild( list, i );
|
tr_benc * d = tr_bencListChild( list, i );
|
||||||
if( tr_bencDictFindInt( d, "id", &id )
|
if( tr_bencDictFindInt( d, "eta", &eta )
|
||||||
&& tr_bencDictFindStr( d, "name", &name )
|
&& tr_bencDictFindInt( d, "id", &id )
|
||||||
&& tr_bencDictFindInt( d, "eta", &eta )
|
|
||||||
&& tr_bencDictFindInt( d, "eta", &eta )
|
|
||||||
&& tr_bencDictFindInt( d, "leftUntilDone", &leftUntilDone )
|
&& tr_bencDictFindInt( d, "leftUntilDone", &leftUntilDone )
|
||||||
&& tr_bencDictFindInt( d, "sizeWhenDone", &sizeWhenDone )
|
&& tr_bencDictFindStr( d, "name", &name )
|
||||||
&& tr_bencDictFindInt( d, "rateDownload", &down )
|
&& tr_bencDictFindInt( d, "rateDownload", &down )
|
||||||
&& tr_bencDictFindInt( d, "rateUpload", &up )
|
&& tr_bencDictFindInt( d, "rateUpload", &up )
|
||||||
&& tr_bencDictFindStr( d, "ratio", &ratiostr )
|
&& tr_bencDictFindInt( d, "sizeWhenDone", &sizeWhenDone )
|
||||||
&& tr_bencDictFindInt( d, "status", &status ) )
|
&& tr_bencDictFindInt( d, "status", &status ) )
|
||||||
{
|
{
|
||||||
char etaStr[16];
|
char etaStr[16];
|
||||||
|
@ -353,7 +351,7 @@ processResponse( const char * host, int port,
|
||||||
etaStr,
|
etaStr,
|
||||||
up / 1024.0,
|
up / 1024.0,
|
||||||
down / 1024.0,
|
down / 1024.0,
|
||||||
strtod( ratiostr, NULL ),
|
(double)(sizeWhenDone-leftUntilDone)/sizeWhenDone,
|
||||||
torrentStatusToString( status ),
|
torrentStatusToString( status ),
|
||||||
name );
|
name );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue