improve time for initialisation of upnp

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1766 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-10-30 00:40:15 +00:00
parent 3d82d40a96
commit 06c1c0f59f

View File

@ -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;