cleaning up code

pull/1/head
Kaleb Himes 2014-05-28 16:26:16 -06:00
parent f62c74ae8b
commit 8ff903281f
1 changed files with 5 additions and 9 deletions

View File

@ -100,7 +100,8 @@ static int dtls_select(socklen_t sockfd, int to_sec)
return TEST_SELECT_FAIL; return TEST_SELECT_FAIL;
} }
int Accept(){ int Accept()
{
while (cleanup != 1) { while (cleanup != 1) {
socklen_t clilen; /* length of address' */ socklen_t clilen; /* length of address' */
@ -162,6 +163,7 @@ int Accept(){
printf("Connection being re-routed to Thread Control.\n"); printf("Connection being re-routed to Thread Control.\n");
} }
}
return 1; return 1;
} }
@ -287,12 +289,6 @@ void* ThreadControl(void* openSock)
printf("SSL_accept failed\n"); printf("SSL_accept failed\n");
} }
pthread_t threadID;
if (pthread_create(&threadID, NULL, ThreadControl, (void *)&ret) < 0) {
printf("pthread_create failed.\n");
}
printf("Connected with a client!\n"); printf("Connected with a client!\n");
if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){ if (( recvlen = CyaSSL_read(ssl, buff, sizeof(buff)-1)) > 0){