|
From: Yoda-JM <yo...@us...> - 2012-09-14 23:12:46
|
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Sep 15 01:11:59 2012 +0200
fix: remove libtorrent deprecated warnings
---
game/downloader.cc | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/game/downloader.cc b/game/downloader.cc
index 30b8bc8..91f4658 100644
--- a/game/downloader.cc
+++ b/game/downloader.cc
@@ -30,7 +30,10 @@ struct Downloader::Impl {
add_torrent_params p;
p.save_path = (getDataDir() / "songs" / "dlc").string();
- add_magnet_uri(s, "magnet:?xt=urn:btih:7ea1b59cce1737437a66e29a2843b5ce3a0c8cd9", p);
+ error_code ec;
+ add_torrent_params params;
+ params.url = "magnet:?xt=urn:btih:7ea1b59cce1737437a66e29a2843b5ce3a0c8cd9";
+ s.add_torrent(params, ec);
pause(false);
} catch (std::exception& e) {
std::clog << "downloader/error: " << e.what() << std::endl;
@@ -43,7 +46,10 @@ struct Downloader::Impl {
s.stop_lsd();
s.stop_dht();
} else {
- if (!s.is_listening()) s.listen_on(std::make_pair(6881, 6889));
+ if (!s.is_listening()) {
+ error_code ec;
+ s.listen_on(std::make_pair(6881, 6889), ec);
+ }
s.start_dht();
s.start_lsd();
s.start_upnp();
|