Restore the maximum piece size of 2^30 introduced in r435987.

PR:		221717
Reported by:	Anton Sayetsky
This commit is contained in:
Christian Weisgerber 2017-09-07 15:19:51 +00:00
parent b5ccfd5510
commit 172605d1b0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449403
2 changed files with 16 additions and 0 deletions

View File

@ -4,6 +4,7 @@
PORTNAME= mktorrent
PORTVERSION= 1.1
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= net-p2p
MAINTAINER= ports@FreeBSD.org

View File

@ -0,0 +1,15 @@
--- init.c.orig 2017-09-07 14:49:58 UTC
+++ init.c
@@ -512,10 +512,10 @@ EXPORT void init(metafile_t *m, int argc
/* set the correct piece length.
default is 2^18 = 256kb. */
- if (m->piece_length < 15 || m->piece_length > 28) {
+ if (m->piece_length < 15 || m->piece_length > 30) {
fprintf(stderr,
"The piece length must be a number between "
- "15 and 28.\n");
+ "15 and 30.\n");
exit(EXIT_FAILURE);
}
m->piece_length = 1 << m->piece_length;