something along these lines:
index 36c1166..92cde13 100644
--- a/examples/client_test.cpp
+++ b/examples/client_test.cpp
@@ -826,7 +826,17 @@ void add_torrent(libtorrent::session& ses
boost::intrusive_ptr<torrent_info> t;
error_code ec;
- t = new torrent_info(torrent.c_str(), ec);
+
+ std::vector<char> buf;
+ int ret = load_file(torrent, buf, ec);
+ if (ret < 0) throw invalid_torrent_file(ec);
+ lazy_entry e;
+ int pos;
+ if (buf.size() == 0 || lazy_bdecode(&buf[0], &buf[0] + buf.size(),
e, ec
+ , &pos, 1000, 100000000) != 0)
+ throw invalid_torrent_file(ec);
+
+ t = new torrent_info(e, ec);
if (ec)
{
fprintf(stderr, "%s: %s\n", torrent.c_str(),
ec.message().c_str());
Post by Jeong Woo SeoThen, what exactly should i raise in 'client_test'?
I am newer then newbie for programming, but i am digging it.
And i appreciate for your answer.
Thank you!
-----Original Message-----
*Cc:*
*Sent:* 2015-10-23 (금) 13:01:18
*Subject:* Re: [libtorrent] Can't seed very huge torrent with error
"bencoded item count limit exceeded"
You hit the default limit on the size of bencoded structures when parsing.
See: http://libtorrent.org/reference-Bencoding.html#lazy_bdecode()
You can raise that limit to something more appropriate for your application.
In some cases this default limit is implied by the API, for instance, when
constructing a torrent_info object from a filename, there's no way to
override the default. What you can do instead is to parse the torrent
(using lazy_bdecode()) and then construct the torrent_info from the decoded
structure.
I don't know why contens of mail were empty. anyway i am re-sending a
mail. I am sorry for that.
Hi all.
I'm trying to seed a game which is called 'World of warship'. Its size is
about 16GB and it has 166,027 files.
I made a torrent file of it with make_torrent. Size of the torrent file is about 16.5MB.
When i tried to open the torrent file with client_test, it showed error
bencoded item count limit exceeded".
What should i do to fix it?
https://drive.google.com/file/d/0B9RbxyXNort1dnM5b01NT0tveEE/view?usp=sharing
Thank you.
Seo
------------------------------------------------------------------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
--
Arvid Norberg
--
Arvid Norberg
------------------------------------------------------------------------------