fix test_upnp build

This commit is contained in:
arvidn 2016-02-28 01:18:27 -05:00
parent 296a38efba
commit 8ffa76842c
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)