From fa57d233bc4c98223b6b5829e12b2c35d04cec61 Mon Sep 17 00:00:00 2001 From: CJ Date: Wed, 2 Jul 2014 09:33:17 -0600 Subject: [PATCH 1/2] nonblocking update --- tls/client-tls-nonblocking.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tls/client-tls-nonblocking.c b/tls/client-tls-nonblocking.c index d845bdd3..4c9de769 100644 --- a/tls/client-tls-nonblocking.c +++ b/tls/client-tls-nonblocking.c @@ -112,7 +112,6 @@ int ClientGreet(CYASSL* ssl) /* data to send to the server, data recieved from the server */ char sendBuff[MAXDATASIZE], rcvBuff[MAXDATASIZE] = {0}; int ret = 0; -int count = 0; printf("Message for server:\t"); fgets(sendBuff, MAXDATASIZE, stdin); @@ -129,11 +128,9 @@ int count = 0; /* the server failed to send data, or error trying */ ret = CyaSSL_get_error(ssl, 0); while (ret == SSL_ERROR_WANT_READ) { -count++; ret = CyaSSL_read(ssl, rcvBuff, MAXDATASIZE); ret = CyaSSL_get_error(ssl, 0); } -printf("counter %d\n", count); if (ret < 0) { ret = CyaSSL_get_error(ssl, 0); printf("Read error. Error: %d\n", ret); From 45d970cdac5908dd4b1fec39c2f8419d0cdb9e53 Mon Sep 17 00:00:00 2001 From: CJ Date: Wed, 2 Jul 2014 10:29:50 -0600 Subject: [PATCH 2/2] additional include for select --- tls/client-tls-nonblocking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tls/client-tls-nonblocking.c b/tls/client-tls-nonblocking.c index 4c9de769..89e61830 100644 --- a/tls/client-tls-nonblocking.c +++ b/tls/client-tls-nonblocking.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include /* CyaSSL security library */ #include /* nonblocking I/O library */