[packages/libtorrent] - rel 3; show why decoding bencoded data failed

arekm arekm at pld-linux.org
Sun Jun 29 22:24:33 CEST 2014


commit 42275ee10baa32a546e602b81a599d8ba3866548
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jun 29 22:24:30 2014 +0200

    - rel 3; show why decoding bencoded data failed

 libtorrent-bencoded-error.patch | 18 ++++++++++++++++++
 libtorrent.spec                 |  4 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/libtorrent.spec b/libtorrent.spec
index e907475..fdbfb0f 100644
--- a/libtorrent.spec
+++ b/libtorrent.spec
@@ -8,7 +8,7 @@ Summary(pl.UTF-8):	LibTorrent - biblioteka BitTorrenta napisana w C++ dla Uniksa
 Name:		libtorrent
 # keep stable line, see URL below
 Version:	0.13.4
-Release:	2
+Release:	3
 Epoch:		1
 License:	GPL v2+
 Group:		Libraries
@@ -16,6 +16,7 @@ Source0:	http://libtorrent.rakshasa.no/downloads/%{name}-%{version}.tar.gz
 # Source0-md5:	e82f380a9d4b55b379e0e73339c73895
 Patch0:		%{name}-client_list.patch
 Patch1:		%{name}-build.patch
+Patch2:		libtorrent-bencoded-error.patch
 URL:		https://github.com/rakshasa/rtorrent/wiki
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -77,6 +78,7 @@ fi
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # force refresh
 %{__rm} scripts/{libtool,lt*}.m4
diff --git a/libtorrent-bencoded-error.patch b/libtorrent-bencoded-error.patch
new file mode 100644
index 0000000..10e1a16
--- /dev/null
+++ b/libtorrent-bencoded-error.patch
@@ -0,0 +1,18 @@
+diff --git a/src/tracker/tracker_http.cc b/src/tracker/tracker_http.cc
+index 6dbd0f5..48ab5a5 100644
+--- a/src/tracker/tracker_http.cc
++++ b/src/tracker/tracker_http.cc
+@@ -276,8 +276,11 @@ TrackerHttp::receive_done() {
+   Object b;
+   *m_data >> b;
+ 
+-  if (m_data->fail())
+-    return receive_failed("Could not parse bencoded data");
++  if (m_data->fail()) {
++    std::stringstream dump;
++    dump << "Could not parse bencoded data: " << m_data->str();
++    return receive_failed(dump.str().c_str());
++  }
+ 
+   if (!b.is_map())
+     return receive_failed("Root not a bencoded map");
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libtorrent.git/commitdiff/42275ee10baa32a546e602b81a599d8ba3866548



More information about the pld-cvs-commit mailing list