summaryrefslogtreecommitdiffstats
path: root/src/core.c
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-27 11:27:30 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:49:21 +0200
commit6010fe62fda49ffb6a3fa7038b0c2feb61767263 (patch)
tree6551b45191468e49585d4efdb8b623bf9748db19 /src/core.c
parent6a81079dc1a9d4deea7d8faa787baed2ffe80556 (diff)
download checksum file directly from server
Remove assumption on small file to shortcircuit the redirect logic.
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 113eb1e..45853d9 100644
--- a/src/core.c
+++ b/src/core.c
@@ -49,7 +49,7 @@ static void tip_client_release(struct ev_loop *loop, struct tip_client *cli)
free((void *)cli->path);
if (cli->method == TIP_METHOD_GET) {
- if (tip_client_large_file(cli)) {
+ if (!tip_client_checksum_file(cli)) {
num_clients--;
if (!cli->redirect)
tip_client_activate_pending(false);
@@ -192,7 +192,7 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
}
return;
shutdown:
- if (cli->size > FILE_SIZE_THRESHOLD)
+ if (!tip_client_checksum_file(cli))
tip_client_redirect_create(cli);
close:
tip_client_release(loop, cli);