|
From: Michael Chase-S. <mc...@us...> - 2012-06-01 18:50:17
|
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 ab71d6d8e7904a5f42fa3bba2204a55cac91dd8b (commit)
from d42b30ac4e38801e4da2bd0d344160492f5f9990 (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 ab71d6d8e7904a5f42fa3bba2204a55cac91dd8b
Author: Michael Chase-Salerno <br...@li...>
Date: Fri Jun 1 14:49:54 2012 -0400
[ 3531210 ] Allow indication delivery timeout tuning
-----------------------------------------------------------------------
Summary of changes:
diff --git a/ChangeLog b/ChangeLog
index 815912a..8468e6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-01 Michael Chase-Salerno <br...@li...>
+
+ * control.h, indCIMXMLExport.c, sfcb.cfg.pre.in:
+ [ 3531210 ] Allow indication delivery timeout tuning
+
2012-05-30 Chris Buccella <buc...@li...>
* cimXmlOps.y:
diff --git a/NEWS b/NEWS
index 00095db..7c9d907 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ New features:
- 3441679 Add a feature to validate CMPI types
- 3497831 Updates to sfcb-ps test script
- 3506453 Support peer cert verification for SSL indications
+- 3531210 Allow indication delivery timeout tuning
Bugs fixed:
- 3495804 Cleanup: httpProcId still defined, wrong define in cimXmlGen
diff --git a/control.c b/control.c
index d394a3c..d89f4c3 100644
--- a/control.c
+++ b/control.c
@@ -129,7 +129,7 @@ Control init[] = {
{"indicationDeliveryThreadTimeout",1,"0"},
{"MaxListenerDestinations",1,"100"},
{"MaxActiveSubscriptions",1,"100"},
-
+ {"indicationCurlTimeout",1,"10"},
};
void
diff --git a/indCIMXMLExport.c b/indCIMXMLExport.c
index dbaa4b3..636091b 100644
--- a/indCIMXMLExport.c
+++ b/indCIMXMLExport.c
@@ -23,6 +23,7 @@
#include <sfcCommon/utilft.h>
#include "trace.h"
#include <string.h>
+#include "control.h"
extern UtilStringBuffer *newStringBuffer(int);
extern int getControlChars(char *id, char **val);
@@ -229,10 +230,11 @@ genRequest(CurlData * cd, char *url, char **msg)
return 3;
}
- /*
- * Set transfer timeout to 10 sec
- */
- rv = curl_easy_setopt(cd->mHandle, CURLOPT_TIMEOUT, 10);
+ /* Set transfer timeout to config option or 10 sec */
+ long indicationCurlTimeout=10;
+ if (getControlNum("indicationCurlTimeout", &indicationCurlTimeout))
+ indicationCurlTimeout = 10;
+ rv = curl_easy_setopt(cd->mHandle, CURLOPT_TIMEOUT, indicationCurlTimeout);
/*
* Set username and password * / if (url.user.length() > 0 &&
diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in
index f7d9cf4..e3c55a1 100644
--- a/sfcb.cfg.pre.in
+++ b/sfcb.cfg.pre.in
@@ -298,6 +298,11 @@ sslCiphers: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH
## Default is 0 (no timeout)
#indicationDeliveryThreadTimeout: 0
+## Timeout passed to curl for thread delivery. After this time has elapsed
+## the indication delivery is considered a failure.
+## Default is 10 seconds
+#indicationCurlTimeout: 10
+
##----------------------------Reliable Indications ----------------------------
## Interval between indication retry attempts
## Default is 20 seconds
hooks/post-receive
--
SFCB - Small Footprint CIM Broker
|