new fix for selecting random port when system starts up

This commit is contained in:
tungnian lee 2012-09-15 15:28:58 -07:00 committed by sledgehammer999
commit 9913484f68
3 changed files with 16 additions and 18 deletions

View file

@ -1532,7 +1532,7 @@ void QBtSession::loadSessionState() {
// bdecode
lazy_entry e;
#if LIBTORRENT_VERSION_NUM >= 001600
error_code ec;
libtorrent::error_code ec;
lazy_bdecode(&in[0], &in[0] + in.size(), e, ec);
if (!ec) {
#else
@ -1916,7 +1916,7 @@ void QBtSession::setListeningPort(int port) {
Preferences pref;
std::pair<int,int> ports(port, port);
#if LIBTORRENT_VERSION_NUM >= 001600
error_code ec;
libtorrent::error_code ec;
#endif
const QString iface_name = pref.getNetworkInterface();
if (iface_name.isEmpty()) {