diff --git a/libs/handle.c b/libs/handle.c index 870183d..8ec4ef5 100644 --- a/libs/handle.c +++ b/libs/handle.c @@ -84,7 +84,7 @@ int antd_send(void *src, const void* data, int len) written = 0; fd_set fds; struct timeval timeout; - while (writelen > 0 && source->attempt < MAX_ATTEMPT) + while (writelen > 0) //source->attempt < MAX_ATTEMPT { count = SSL_write (source->ssl, ptr+written, writelen); if (count > 0) @@ -102,7 +102,7 @@ int antd_send(void *src, const void* data, int len) { // no real error, just try again... //LOG("SSL_ERROR_NONE \n"); - source->attempt++; + //source->attempt++; continue; } @@ -127,7 +127,7 @@ int antd_send(void *src, const void* data, int len) err = select(sock+1, &fds, NULL, NULL, &timeout); if (err == 0 || (err > 0 && FD_ISSET(sock, &fds))) { - source->attempt++; + //source->attempt++; continue; // more data to read... } break; @@ -147,7 +147,7 @@ int antd_send(void *src, const void* data, int len) err = select(sock+1, NULL, &fds, NULL, &timeout); if (err == 0 || (err > 0 && FD_ISSET(sock, &fds))) { - source->attempt++; + //source->attempt++; continue; // can write more data now... } break; @@ -192,7 +192,7 @@ int antd_recv(void *src, void* data, int len) read = 0; fd_set fds; struct timeval timeout; - while (readlen > 0 && source->attempt < MAX_ATTEMPT) + while (readlen > 0 )//&& source->attempt < MAX_ATTEMPT { received = SSL_read (source->ssl, ptr+read, readlen); if (received > 0) @@ -210,7 +210,7 @@ int antd_recv(void *src, void* data, int len) { // no real error, just try again... //LOG("SSL_ERROR_NONE \n"); - source->attempt++; + //source->attempt++; continue; } @@ -235,7 +235,7 @@ int antd_recv(void *src, void* data, int len) err = select(sock+1, &fds, NULL, NULL, &timeout); if (err == 0 || (err > 0 && FD_ISSET(sock, &fds))) { - source->attempt++; + //source->attempt++; continue; // more data to read... } break; @@ -255,7 +255,7 @@ int antd_recv(void *src, void* data, int len) err = select(sock+1, NULL, &fds, NULL, &timeout); if (err == 0 || (err > 0 && FD_ISSET(sock, &fds))) { - source->attempt++; + //source->attempt++; continue; // can write more data now... } break;