diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 37434a459..17f44367f 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -361,8 +361,8 @@ namespace libtorrent char const* country_for_ip(address const& a); #if TORRENT_USE_WSTRING - void load_asnum_db(std::wstring file); - void load_country_db(std::wstring file); + void load_asnum_dbw(std::wstring file); + void load_country_dbw(std::wstring file); #endif // TORRENT_USE_WSTRING #endif // TORRENT_DISABLE_GEO_IP diff --git a/src/session.cpp b/src/session.cpp index dbd9acadd..2d383d1dd 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -442,12 +442,12 @@ namespace libtorrent #if TORRENT_USE_WSTRING void session::load_asnum_db(wchar_t const* file) { - TORRENT_ASYNC_CALL1(load_asnum_db, std::wstring(file)); + TORRENT_ASYNC_CALL1(load_asnum_dbw, std::wstring(file)); } void session::load_country_db(wchar_t const* file) { - TORRENT_ASYNC_CALL1(load_country_db, std::wstring(file)); + TORRENT_ASYNC_CALL1(load_country_dbw, std::wstring(file)); } #endif // TORRENT_USE_WSTRING #endif // TORRENT_DISABLE_GEO_IP diff --git a/src/session_impl.cpp b/src/session_impl.cpp index fe0a0892c..d6ae67fbe 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -932,38 +932,38 @@ namespace aux { return &(*i); } - bool session_impl::load_asnum_db(char const* file) + void session_impl::load_asnum_db(std::string file) { if (m_asnum_db) GeoIP_delete(m_asnum_db); - m_asnum_db = GeoIP_open(file, GEOIP_STANDARD); - return m_asnum_db; + m_asnum_db = GeoIP_open(file.c_str(), GEOIP_STANDARD); +// return m_asnum_db; } #if TORRENT_USE_WSTRING - bool session_impl::load_asnum_db(wchar_t const* file) + void session_impl::load_asnum_dbw(std::wstring file) { if (m_asnum_db) GeoIP_delete(m_asnum_db); std::string utf8; wchar_utf8(file, utf8); m_asnum_db = GeoIP_open(utf8.c_str(), GEOIP_STANDARD); - return m_asnum_db; +// return m_asnum_db; } - bool session_impl::load_country_db(wchar_t const* file) + void session_impl::load_country_dbw(std::wstring file) { if (m_country_db) GeoIP_delete(m_country_db); std::string utf8; wchar_utf8(file, utf8); m_country_db = GeoIP_open(utf8.c_str(), GEOIP_STANDARD); - return m_country_db; +// return m_country_db; } #endif // TORRENT_USE_WSTRING - bool session_impl::load_country_db(char const* file) + void session_impl::load_country_db(std::string file) { if (m_country_db) GeoIP_delete(m_country_db); - m_country_db = GeoIP_open(file, GEOIP_STANDARD); - return m_country_db; + m_country_db = GeoIP_open(file.c_str(), GEOIP_STANDARD); +// return m_country_db; } #endif // TORRENT_DISABLE_GEO_IP