[package] update libtorrent to revision 1094 (#5346)
authorFlorian Fainelli <florian@openwrt.org>
Wed, 17 Jun 2009 19:33:27 +0000 (19:33 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 17 Jun 2009 19:33:27 +0000 (19:33 +0000)
SVN-Revision: 16495

libs/libtorrent/Makefile
libs/libtorrent/patches/010-bencode_check_info_only.patch [deleted file]

index ce1b5948f3edaae77be0c0e1baae52bf7595cdbc..71946a83556987c82aab1a1a17e7b27281b9f233 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtorrent
 
-PKG_REV:=1093
+PKG_REV:=1094
 PKG_VERSION:=0.12.4_r$(PKG_REV)
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/libtorrent
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
diff --git a/libs/libtorrent/patches/010-bencode_check_info_only.patch b/libs/libtorrent/patches/010-bencode_check_info_only.patch
deleted file mode 100644 (file)
index 6378969..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# Limit the unordered bencode dictionary check to the info dictionary and all its elements.
-Index: libtorrent/src/torrent/object.h
-===================================================================
---- libtorrent/src/torrent/object.h    (revision 1093)
-+++ libtorrent/src/torrent/object.h    (working copy)
-@@ -75,6 +75,8 @@
-   static const uint32_t mask_internal = 0xffff;
-   static const uint32_t mask_public   = ~mask_internal;
-+  static const uint32_t flag_unordered = 0x100;    // bencode dictionary was not sorted
-+
-   enum type_type {
-     TYPE_NONE,
-     TYPE_VALUE,
-@@ -109,6 +111,9 @@
-   void                set_flags(uint32_t f)                   { m_flags |= f & mask_public; }
-   void                unset_flags(uint32_t f)                 { m_flags &= ~(f & mask_public); }
-+  void                set_internal_flags(uint32_t f)          { m_flags |= f & (mask_internal & ~mask_type); }
-+  void                unset_internal_flags(uint32_t f)        { m_flags &= ~(f & (mask_internal & ~mask_type)); }
-+
-   // Add functions for setting/clearing the public flags.
-   bool                is_value() const                        { return type() == TYPE_VALUE; }
-Index: libtorrent/src/torrent/object_stream.cc
-===================================================================
---- libtorrent/src/torrent/object_stream.cc    (revision 1093)
-+++ libtorrent/src/torrent/object_stream.cc    (working copy)
-@@ -96,6 +96,9 @@
-       Object::list_iterator itr = object->as_list().insert(object->as_list().end(), Object());
-       object_read_bencode(input, &*itr, depth);
-+
-+      if (itr->flags() & Object::flag_unordered)
-+        object->set_internal_flags(Object::flag_unordered);
-     }
-     break;
-@@ -107,7 +110,7 @@
-     if (++depth >= 1024)
-       break;
--    //    Object::string_type last;
-+    Object::string_type last;
-     while (input->good()) {
-       if (input->peek() == 'e') {
-@@ -120,12 +123,16 @@
-       if (!object_read_string(input, str))
-       break;
--      //      if (last >= str)
--      //        break;
-+      if (last >= str)
-+        object->set_internal_flags(Object::flag_unordered);
--      object_read_bencode(input, &object->as_map()[str], depth);
-+      Object* value = &object->as_map()[str];
-+      object_read_bencode(input, value, depth);
--      //      str.swap(last);
-+      if (value->flags() & Object::flag_unordered)
-+        object->set_internal_flags(Object::flag_unordered);
-+
-+      str.swap(last);
-     }
-     break;
-Index: libtorrent/src/download/download_constructor.cc
-===================================================================
---- libtorrent/src/download/download_constructor.cc    (revision 1093)
-+++ libtorrent/src/download/download_constructor.cc    (working copy)
-@@ -132,6 +132,9 @@
-   if (!fileList->empty())
-     throw internal_error("parse_info received an already initialized Content object.");
-+  if (b.flags() & Object::flag_unordered)
-+    throw input_error("Download has unordered info dictionary.");
-+
-   uint32_t chunkSize = b.get_key_value("piece length");
-   if (chunkSize <= (1 << 10) || chunkSize > (128 << 20))