added more logging to upnp. fixed upnp test

This commit is contained in:
Arvid Norberg
2007-05-14 08:56:46 +00:00
parent c5e150ee69
commit 36898ecc12
3 changed files with 17 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
use-project /torrent : .. ;
exe test_upnp : test_upnp.cpp /torrent : <threading>multi <logging>verbose <define>TORRENT_UPNP_LOGGING ;
exe test_upnp : test_upnp.cpp /torrent : <threading>multi <logging>verbose <upnp-logging>on ;
project
:

View File

@@ -35,6 +35,9 @@ int main(int argc, char* argv[])
ios.run();
upnp_handler.rebind(address_v4::from_string(argv[1]));
timer.expires_from_now(seconds(2));
timer.async_wait(boost::bind(&io_service::stop, boost::ref(ios)));
std::cerr << "rebinding to IP " << argv[1]
<< " broadcasting for UPnP device" << std::endl;