Changeset 2317
- Timestamp:
- 11/25/07 23:59:19 (14 months ago)
- Files:
-
- 2 modified
-
tags/deluge-0.5.6.96/src/deluge_core.cpp (modified) (1 diff)
-
trunk/src/deluge_core.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/deluge-0.5.6.96/src/deluge_core.cpp
r2304 r2317 1788 1788 return NULL; 1789 1789 1790 if (M_torrents->at(index).handle.is_valid()){ 1791 std::vector<libtorrent::announce_entry> trackerlist; 1792 std::istringstream trackers(tracker); 1793 std::string line; 1794 while (std::getline(trackers, line)) { 1795 libtorrent::announce_entry a_entry(line); 1796 trackerlist.push_back(a_entry); 1790 try { 1791 if (M_torrents->at(index).handle.is_valid()){ 1792 std::vector<libtorrent::announce_entry> trackerlist; 1793 std::istringstream trackers(tracker); 1794 std::string line; 1795 while (std::getline(trackers, line)) { 1796 libtorrent::announce_entry a_entry(line); 1797 trackerlist.push_back(a_entry); 1798 } 1799 if (trackerlist.empty()){ 1800 std::vector<libtorrent::announce_entry> empty; 1801 M_torrents->at(index).handle.replace_trackers(empty); 1802 } 1803 else{ 1804 M_torrents->at(index).handle.replace_trackers(trackerlist); 1805 M_torrents->at(index).handle.force_reannounce(); 1806 } 1797 1807 } 1798 if (trackerlist.empty()){ 1799 std::vector<libtorrent::announce_entry> empty; 1800 M_torrents->at(index).handle.replace_trackers(empty); 1801 } 1802 else{ 1803 M_torrents->at(index).handle.replace_trackers(trackerlist); 1804 M_torrents->at(index).handle.force_reannounce(); 1805 } 1806 } 1808 } 1809 catch (libtorrent::invalid_handle&) {} 1807 1810 Py_INCREF(Py_None); return Py_None; 1808 1811 } -
trunk/src/deluge_core.cpp
r2296 r2317 1788 1788 return NULL; 1789 1789 1790 if (M_torrents->at(index).handle.is_valid()){ 1791 std::vector<libtorrent::announce_entry> trackerlist; 1792 std::istringstream trackers(tracker); 1793 std::string line; 1794 while (std::getline(trackers, line)) { 1795 libtorrent::announce_entry a_entry(line); 1796 trackerlist.push_back(a_entry); 1790 try { 1791 if (M_torrents->at(index).handle.is_valid()){ 1792 std::vector<libtorrent::announce_entry> trackerlist; 1793 std::istringstream trackers(tracker); 1794 std::string line; 1795 while (std::getline(trackers, line)) { 1796 libtorrent::announce_entry a_entry(line); 1797 trackerlist.push_back(a_entry); 1798 } 1799 if (trackerlist.empty()){ 1800 std::vector<libtorrent::announce_entry> empty; 1801 M_torrents->at(index).handle.replace_trackers(empty); 1802 } 1803 else{ 1804 M_torrents->at(index).handle.replace_trackers(trackerlist); 1805 M_torrents->at(index).handle.force_reannounce(); 1806 } 1797 1807 } 1798 if (trackerlist.empty()){ 1799 std::vector<libtorrent::announce_entry> empty; 1800 M_torrents->at(index).handle.replace_trackers(empty); 1801 } 1802 else{ 1803 M_torrents->at(index).handle.replace_trackers(trackerlist); 1804 M_torrents->at(index).handle.force_reannounce(); 1805 } 1806 } 1808 } 1809 catch (libtorrent::invalid_handle&) {} 1807 1810 Py_INCREF(Py_None); return Py_None; 1808 1811 }
