summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-09-30 19:40:15 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-30 19:41:41 (GMT)
commitd0081aeea512cc367a1aa9939693d8247b0571af (patch)
tree30510b936a89ccd0d167fbc934c62ec2f2c92a3c
parent1b255f6ba90847240b92126deb5ea0174ad269b0 (diff)
downloadswift-contrib-d0081aeea512cc367a1aa9939693d8247b0571af.zip
swift-contrib-d0081aeea512cc367a1aa9939693d8247b0571af.tar.bz2
Increment timeout on UPNP.
-rw-r--r--3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c b/3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c
index 76e8e37..7afd2b1 100644
--- a/3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c
+++ b/3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c
@@ -79,25 +79,25 @@ int connecthostport(const char * host, unsigned short port)
memset(dest.sin_zero, 0, sizeof(dest.sin_zero));
s = socket(PF_INET, SOCK_STREAM, 0);
if(s < 0)
{
PRINT_SOCKET_ERROR("socket");
return -1;
}
#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT
/* setting a 3 seconds timeout for the connect() call */
- timeout.tv_sec = 3;
+ timeout.tv_sec = 5;
timeout.tv_usec = 0;
if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(struct timeval)) < 0)
{
PRINT_SOCKET_ERROR("setsockopt");
}
- timeout.tv_sec = 3;
+ timeout.tv_sec = 5;
timeout.tv_usec = 0;
if(setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(struct timeval)) < 0)
{
PRINT_SOCKET_ERROR("setsockopt");
}
#endif /* #ifdef MINIUPNPC_SET_SOCKET_TIMEOUT */
dest.sin_family = AF_INET;
dest.sin_port = htons(port);
n = connect(s, (struct sockaddr *)&dest, sizeof(struct sockaddr_in));
@@ -169,25 +169,25 @@ int connecthostport(const char * host, unsigned short port)
}
s = -1;
for(p = ai; p; p = p->ai_next)
{
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
if(s < 0)
continue;
#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT
/* setting a 3 seconds timeout for the connect() call */
- timeout.tv_sec = 3;
+ timeout.tv_sec = 5;
timeout.tv_usec = 0;
if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(struct timeval)) < 0)
{
PRINT_SOCKET_ERROR("setsockopt");
}
- timeout.tv_sec = 3;
+ timeout.tv_sec = 5;
timeout.tv_usec = 0;
if(setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(struct timeval)) < 0)
{
PRINT_SOCKET_ERROR("setsockopt");
}
#endif /* #ifdef MINIUPNPC_SET_SOCKET_TIMEOUT */
n = connect(s, p->ai_addr, p->ai_addrlen);
#ifdef MINIUPNPC_IGNORE_EINTR
while(n < 0 && errno == EINTR)