X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fui.c;h=87818bba7ab3b1155d4e108f61dbe9fe2df0d30f;hb=796283c6df4713edcac9c199bf4fd26dff42c2fd;hp=94241e7fbde0d294ea0e28f9a779689ca08cfd57;hpb=d5aa6bdc7d405d21dcf5171b04f505e1c6f245e6;p=doldaconnect.git diff --git a/daemon/ui.c b/daemon/ui.c index 94241e7..87818bb 100644 --- a/daemon/ui.c +++ b/daemon/ui.c @@ -1204,6 +1204,18 @@ static void cmd_hashstatus(struct socket *sk, struct uidata *data, int argc, wch sq(sk, 0, L"200", L"%%i", total, L"tth", L"%%i", hashed, NULL); } +static void cmd_transstatus(struct socket *sk, struct uidata *data, int argc, wchar_t **argv) +{ + wchar_t *buf1, *buf2; + + havepriv(PERM_TRANS); + buf1 = swprintf2(L"%lli", bytesdownload); + buf2 = swprintf2(L"%lli", bytesupload); + sq(sk, 0, L"200", L"%%ls", buf1, L"%%ls", buf2, NULL); + free(buf1); + free(buf2); +} + #undef haveargs #undef havepriv @@ -1239,6 +1251,7 @@ static struct command commands[] = {L"filtercmd", cmd_filtercmd}, {L"lstrarg", cmd_lstrarg}, {L"hashstatus", cmd_hashstatus}, + {L"transstatus", cmd_transstatus}, {NULL, NULL} };