diff --git a/include/libtorrent/upnp.hpp b/include/libtorrent/upnp.hpp index 2421b9cd1..691d27515 100644 --- a/include/libtorrent/upnp.hpp +++ b/include/libtorrent/upnp.hpp @@ -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 portmap_callback_t; diff --git a/test/Jamfile b/test/Jamfile index e96abf4f3..1281f4735 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -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 diff --git a/test/test_upnp.cpp b/test/test_upnp.cpp index 6d0cb5f66..447bab5a8 100644 --- a/test/test_upnp.cpp +++ b/test/test_upnp.cpp @@ -119,12 +119,12 @@ struct callback_info std::list 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)