Merge pull request #507 from arvidn/fix-test-upnp-1.1

fix test_upnp build
This commit is contained in:
Arvid Norberg 2016-02-28 10:44:16 -05:00
commit 0cd0c57880
3 changed files with 5 additions and 4 deletions

View File

@ -98,6 +98,7 @@ namespace libtorrent
// int: port-mapping index
// address: external address as queried from router
// int: external port
// int: protocol (UDP, TCP)
// std::string: error message
// an empty string as error means success
typedef boost::function<void(int, address, int, int, error_code const&)> portmap_callback_t;

View File

@ -193,8 +193,8 @@ test-suite libtorrent :
[ run test_priority.cpp ]
# turn these tests into simulations
# [ run test_upnp.cpp ]
# [ run test_lsd.cpp ]
[ run test_upnp.cpp ]
[ run test_lsd.cpp ]
;
# these are the tests run on appveyor, while the flapping ones are being

View File

@ -119,12 +119,12 @@ struct callback_info
std::list<callback_info> callbacks;
void callback(int mapping, address const& ip, int port, error_code const& err)
void callback(int mapping, address const& ip, int port, int protocol, error_code const& err)
{
callback_info info = {mapping, port, err};
callbacks.push_back(info);
std::cerr << "mapping: " << mapping << ", port: " << port << ", IP: " << ip
<< ", error: \"" << err.message() << "\"\n";
<< ", proto: " << protocol << ", error: \"" << err.message() << "\"\n";
}
void run_upnp_test(char const* root_filename, char const* router_model, char const* control_name, int igd_version)