diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2006-02-10 15:41:55 +0000 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2006-02-10 15:41:55 +0000 |
| commit | b43809ba555622797d2acaf0a6a58628983b8946 (patch) | |
| tree | 54f616810388a821d8ef7b68e5438d6523088d7f /cli/btpd_if.c | |
| parent | bf75d6af1c573fea1043c81cdeb2c634dedb240c (diff) | |
| download | btpd-b43809ba555622797d2acaf0a6a58628983b8946.tar.gz btpd-b43809ba555622797d2acaf0a6a58628983b8946.zip | |
Mostly name changes. Add a missing include. Changed the torrent status
characters displayed by btcli.
Diffstat (limited to 'cli/btpd_if.c')
| -rw-r--r-- | cli/btpd_if.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/cli/btpd_if.c b/cli/btpd_if.c index f33851f..c15ce08 100644 --- a/cli/btpd_if.c +++ b/cli/btpd_if.c @@ -154,19 +154,20 @@ parse_btstat(const uint8_t *res, struct btstat **out) int i = 0; for (const char *tp = benc_first(tlst); tp != NULL; tp = benc_next(tp)) { struct tpstat *ts = &st->torrents[i]; - ts->hash = benc_dget_mema(tp, "hash", NULL); - ts->name = benc_dget_str(tp, "path", NULL); + ts->hash = benc_dget_mema(tp, "info hash", NULL); + ts->name = benc_dget_str(tp, "name", NULL); ts->state = benc_dget_int(tp, "state"); - ts->errors = benc_dget_int(tp, "errors"); - ts->npieces = benc_dget_int(tp, "npieces"); - ts->nseen = benc_dget_int(tp, "seen npieces"); - ts->npeers = benc_dget_int(tp, "npeers"); - ts->downloaded = benc_dget_int(tp, "down"); - ts->uploaded = benc_dget_int(tp, "up"); - ts->rate_down = benc_dget_int(tp, "rd"); - ts->rate_up = benc_dget_int(tp, "ru"); - ts->have = benc_dget_int(tp, "have"); - ts->total = benc_dget_int(tp, "total"); + ts->peers = benc_dget_int(tp, "peers"); + ts->tr_errors = benc_dget_int(tp, "tracker errors"); + ts->content_got = benc_dget_int(tp, "content got"); + ts->content_size = benc_dget_int(tp, "content size"); + ts->pieces_got = benc_dget_int(tp, "pieces got"); + ts->pieces_seen = benc_dget_int(tp, "pieces seen"); + ts->torrent_pieces = benc_dget_int(tp, "torrent pieces"); + ts->downloaded = benc_dget_int(tp, "downloaded"); + ts->uploaded = benc_dget_int(tp, "uploaded"); + ts->rate_down = benc_dget_int(tp, "rate down"); + ts->rate_up = benc_dget_int(tp, "rate up"); i++; } *out = st; |