A clone of btpd with my configuration changes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
443 B

  1. #include "btcli.h"
  2. void
  3. usage_start(void)
  4. {
  5. printf(
  6. "Start torrents.\n"
  7. "\n"
  8. "Usage: start torrent\n"
  9. "\n"
  10. );
  11. exit(1);
  12. }
  13. void
  14. cmd_start(int argc, char **argv)
  15. {
  16. struct ipc_torrent t;
  17. if (argc < 2)
  18. usage_start();
  19. btpd_connect();
  20. for (int i = 1; i < argc; i++)
  21. if (torrent_spec(argv[i], &t))
  22. handle_ipc_res(btpd_start(ipc, &t), "start", argv[i]);
  23. }