summary refs log tree commit diff
path: root/misc/btpd_if.c
diff options
context:
space:
mode:
authorRichard Nyberg <rnyberg@murmeldjur.se>2006-10-06 15:02:35 +0000
committerRichard Nyberg <rnyberg@murmeldjur.se>2006-10-06 15:02:35 +0000
commitba9ae40fe714e7a4afa382aca08ee16336a8c50d (patch)
treef408db98c1694a00ff35d450680db0c2a9fd525b /misc/btpd_if.c
parent30601882e51026220c160a706929bcbdd223c246 (diff)
downloadbtpd-ba9ae40fe714e7a4afa382aca08ee16336a8c50d.tar.gz
btpd-ba9ae40fe714e7a4afa382aca08ee16336a8c50d.zip
Add command to stop all active torrents. The command is sent by
'btcli stop -a'.

Diffstat (limited to 'misc/btpd_if.c')
-rw-r--r--misc/btpd_if.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/btpd_if.c b/misc/btpd_if.c
index 13b216c..6705963 100644
--- a/misc/btpd_if.c
+++ b/misc/btpd_if.c
@@ -311,3 +311,11 @@ btpd_stop(struct ipc *ipc, struct ipc_torrent *tp)
 {
     return simple_treq(ipc, "stop", tp);
 }
+
+enum ipc_err
+btpd_stop_all(struct ipc *ipc)
+{
+    struct io_buffer iob = buf_init(16);
+    buf_swrite(&iob, "l8:stop-alle");
+    return ipc_buf_req_code(ipc, &iob);
+}