fix error reporting for session::add_torrent

This commit is contained in:
Arvid Norberg 2011-11-02 17:08:47 +00:00
parent 261648d60a
commit 3b1a332d6e
1 changed files with 2 additions and 2 deletions

View File

@ -590,7 +590,7 @@ namespace libtorrent
} }
error_code ec; error_code ec;
TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, ec); TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, boost::ref(ec));
if (ec) throw libtorrent_exception(ec); if (ec) throw libtorrent_exception(ec);
return r; return r;
} }
@ -606,7 +606,7 @@ namespace libtorrent
return add_magnet_uri(*this, params.url, p, ec); return add_magnet_uri(*this, params.url, p, ec);
} }
TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, ec); TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, boost::ref(ec));
return r; return r;
} }