From: Dave H. <hel...@us...> - 2013-08-07 05:31:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcb - Small Footprint CIM Broker". The branch, master_1.3 has been updated via 6b1e4c5066a635fa941d054b054a8c3d40992a42 (commit) from cfcec8fefd2686b4c8e295821ac122655cf5adeb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6b1e4c5066a635fa941d054b054a8c3d40992a42 Author: Dave Heller <hel...@us...> Date: Wed Aug 7 01:31:11 2013 -0400 [sfcb-tix:#68] reinitialize select timeout in SSL handshake ----------------------------------------------------------------------- Summary of changes: httpAdapter.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/httpAdapter.c b/httpAdapter.c index cbceba2..98b6757 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -688,6 +688,8 @@ static ChunkFunctions httpChunkFunctions = { #define hdrBufsize 5000 #define hdrLimmit 5000 +#define TV_TO_MS(x) ( (int) x.tv_sec * 1000 + (int) x.tv_usec / 1000 ) + static int getHdrs(CommHndl conn_fd, Buffer * b, char *cmd) { int checked=0,total=0,isReady; @@ -1266,6 +1268,8 @@ static void handleHttpRequest(int connFd, int sslMode) intSSLerror("Error creating SSL object"); SSL_set_bio(conn_fd.ssl, sb, sb); char *error_string; + httpSelectTimeout.tv_sec = selectTimeout; + httpSelectTimeout.tv_usec = 0; while(1) { int sslacc, sslerr; sslacc = SSL_accept(conn_fd.ssl); @@ -1282,13 +1286,13 @@ static void handleHttpRequest(int connFd, int sslMode) FD_SET(connFd,&httpfds); if (sslerr == SSL_ERROR_WANT_WRITE) { _SFCB_TRACE(2, ( - "--- Waiting for SSL handshake (WANT_WRITE): timeout=%ld", - httpSelectTimeout.tv_sec)); + "--- Waiting for SSL handshake (WANT_WRITE): timeout=%lums", + TV_TO_MS(httpSelectTimeout))); isReady = select(connFd+1,NULL,&httpfds,NULL,&httpSelectTimeout); } else { _SFCB_TRACE(2, ( - "--- Waiting for SSL handshake (WANT_READ): timeout=%ld", - httpSelectTimeout.tv_sec)); + "--- Waiting for SSL handshake (WANT_READ): timeout=%lums", + TV_TO_MS(httpSelectTimeout))); isReady = select(connFd+1,&httpfds,NULL,NULL,&httpSelectTimeout); } if (isReady == 0) { hooks/post-receive -- sfcb - Small Footprint CIM Broker |