From 06c1c0f59f81537233e00466409436f242a74a51 Mon Sep 17 00:00:00 2001 From: joss17 Date: Fri, 30 Oct 2009 00:40:15 +0000 Subject: [PATCH] improve time for initialisation of upnp git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1766 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/upnp/UPnPBase.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libretroshare/src/upnp/UPnPBase.cpp b/libretroshare/src/upnp/UPnPBase.cpp index 724be6749..679d3157d 100644 --- a/libretroshare/src/upnp/UPnPBase.cpp +++ b/libretroshare/src/upnp/UPnPBase.cpp @@ -993,13 +993,13 @@ bool CUPnPControlPoint::AddPortMappings( // Check the number of port mappings before //have a little break in case we just modified the variable, so we have to wait for an event - std::cerr << "GetStateVariable pausing in case of an UPnP event incomming."; - time_t begin_time = time(NULL); - while (true) { - if (time(NULL) - begin_time > 7) { - break; - } - } +// std::cerr << "GetStateVariable pausing in case of an UPnP event incomming."; +// time_t begin_time = time(NULL); +// while (true) { +// if (time(NULL) - begin_time > 7) { +// break; +// } +// } std::istringstream OldPortMappingNumberOfEntries( m_WanService->GetStateVariable( "PortMappingNumberOfEntries")); @@ -1022,7 +1022,7 @@ bool CUPnPControlPoint::AddPortMappings( // Not very good, must find a better test : check the new number of port entries //have a little break in case we just modified the variable, so we have to wait for an event std::cerr << "GetStateVariable pausing in case of an UPnP event incomming."; - begin_time = time(NULL); + time_t begin_time = time(NULL); while (true) { if (time(NULL) - begin_time > 7) { break;