|
@@ -53,14 +53,14 @@ SKlient* Server::getKlient()
|
|
|
sockaddr_in client;
|
|
|
int len = sizeof(addresse);
|
|
|
fd_set set;
|
|
|
- FD_ZERO(&set);
|
|
|
- FD_SET(sock, &set);
|
|
|
int rv = 0;
|
|
|
struct timeval timeout;
|
|
|
- timeout.tv_sec = 10;
|
|
|
- timeout.tv_usec = 0;
|
|
|
while (rv == 0 && sock)
|
|
|
{
|
|
|
+ FD_ZERO(&set);
|
|
|
+ FD_SET(sock, &set);
|
|
|
+ timeout.tv_sec = 10;
|
|
|
+ timeout.tv_usec = 0;
|
|
|
rv = select((int)sock + 1, &set, NULL, NULL, &timeout);
|
|
|
if (rv == -1) return 0;
|
|
|
}
|
|
@@ -430,14 +430,14 @@ SSLSKlient* SSLServer::getKlient()
|
|
|
int len = sizeof(addr);
|
|
|
struct sockaddr_in addr;
|
|
|
fd_set set;
|
|
|
- FD_ZERO(&set);
|
|
|
- FD_SET(s, &set);
|
|
|
int rv = 0;
|
|
|
struct timeval timeout;
|
|
|
- timeout.tv_sec = 10;
|
|
|
- timeout.tv_usec = 0;
|
|
|
while (rv == 0 && s)
|
|
|
{
|
|
|
+ FD_ZERO(&set);
|
|
|
+ FD_SET(s, &set);
|
|
|
+ timeout.tv_sec = 10;
|
|
|
+ timeout.tv_usec = 0;
|
|
|
rv = select((int)s + 1, &set, NULL, NULL, &timeout);
|
|
|
if (rv == -1) return 0;
|
|
|
}
|