From: Dave H. <hel...@us...> - 2014-12-21 04:37:50
|
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 has been updated via cd0689e1b9150be739f281043d7c568dc54379eb (commit) from 92d33aa79002bc45dde32fec4d4185dfb5780af8 (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 cd0689e1b9150be739f281043d7c568dc54379eb Author: Dave Heller <hel...@us...> Date: Sat Dec 20 23:34:13 2014 -0500 [sfcb-tix:#109] Add a timeout for localconnect clients ----------------------------------------------------------------------- Summary of changes: cimcClientSfcbLocal.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/cimcClientSfcbLocal.c b/cimcClientSfcbLocal.c index b8286a8..4e95afe 100644 --- a/cimcClientSfcbLocal.c +++ b/cimcClientSfcbLocal.c @@ -73,6 +73,9 @@ extern int localClientMode; extern void sunsetControl(); +int httpProcIdX; +long httpReqHandlerTimeout; + #include <stdlib.h> #include <string.h> @@ -2032,6 +2035,16 @@ CMPIConnect2(ClientEnv *ce, const char *hn, const char *scheme, cc->certData.certFile = certFile ? strdup(certFile) : NULL; cc->certData.keyFile = keyFile ? strdup(keyFile) : NULL; + char *lcto_env = getenv("SFCC_LOCALCONNECT_CLIENT_TIMEOUT"); + if (lcto_env) { + long lcto = (long) atoi(lcto_env); + if (lcto > 0) { + /* Of course we are not using http here, but this is + * a simple way to make spGetMsg() obey the timeout */ + httpReqHandlerTimeout = (lcto < 5) ? 5 : lcto; + httpProcIdX = 1; + } + } return (Client *) cc; } hooks/post-receive -- sfcb - Small Footprint CIM Broker |