Add tr_stat_t.downloadedValid hook to IPC for Gimp_

This commit is contained in:
Charles Kerr
2007-06-26 17:52:45 +00:00
parent c2cd3a89be
commit 21cf51e3f7
2 changed files with 25 additions and 20 deletions
+5 -1
View File
@@ -195,6 +195,7 @@ static struct inf gl_stat[] =
{ "completed", IPC_ST_COMPLETED, RB_ENTRY_INITIALIZER() },
{ "download-speed", IPC_ST_DOWNSPEED, RB_ENTRY_INITIALIZER() },
{ "download-total", IPC_ST_DOWNTOTAL, RB_ENTRY_INITIALIZER() },
{ "download-valid", IPC_ST_DOWNVALID, RB_ENTRY_INITIALIZER() },
{ "error", IPC_ST_ERROR, RB_ENTRY_INITIALIZER() },
{ "error-message", IPC_ST_ERRMSG, RB_ENTRY_INITIALIZER() },
{ "eta", IPC_ST_ETA, RB_ENTRY_INITIALIZER() },
@@ -706,7 +707,7 @@ ipc_addinfo( benc_val_t * list, int tor, tr_info_t * inf, int types )
int
ipc_addstat( benc_val_t * list, int tor,
tr_stat_t * st, int types )
const tr_stat_t * st, int types )
{
benc_val_t * dict, * item;
int ii, used;
@@ -754,6 +755,9 @@ ipc_addstat( benc_val_t * list, int tor,
case IPC_ST_DOWNTOTAL:
tr_bencInitInt( item, st->downloaded );
break;
case IPC_ST_DOWNVALID:
tr_bencInitInt( item, st->downloadedValid );
break;
case IPC_ST_ERROR:
error = st->error;
if( TR_OK == error )