From: Chris B. <buc...@us...> - 2012-06-07 17:55:58
|
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 "SFCC - Small Footprint CIM Client". The branch, master has been updated via 7bad81a2525585d6c1f67f3183b5371a3f30e72a (commit) from 167dcc80e145e486139266560b284aed7aa20f36 (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 7bad81a2525585d6c1f67f3183b5371a3f30e72a Author: buccella <buc...@li...> Date: Thu Jun 7 13:55:58 2012 -0400 [ 3435363 ] Wrong call of curl_global_cleanup() ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 86bf9af..8de2ebc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-07 Chris Buccella <buc...@li...> + + * backend/cimxml/client.c, cimc/cimc.h, cimc/cimcclient.c: + [ 3435363 ] Wrong call of curl_global_cleanup() + 2012-05-29 Chris Buccella <buc...@li...> * TEST/v2test_ecn.c, backend/cimxml/cimXmlParser.c, diff --git a/NEWS b/NEWS index 2bd79aa..86b4140 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ Bugs: - 3344917: Beam, file leak - 3528819: Crash in getInstance when instance has NULL properties - 3530609: Various BEAM Errors +- 3435363: Wrong call of curl_global_cleanup() Changes in 2.2.3 ================ diff --git a/backend/cimxml/client.c b/backend/cimxml/client.c index 69b2848..16b788d 100644 --- a/backend/cimxml/client.c +++ b/backend/cimxml/client.c @@ -2961,8 +2961,12 @@ static void *releaseEnv(CIMCEnv *env) { CMPIStatus rc = {CMPI_RC_OK,NULL}; + if (!(env->options & CIMC_NO_CURL_INIT)) { + curl_global_cleanup(); + } + free(env); - curl_global_cleanup(); + return NULL; } @@ -3036,13 +3040,18 @@ static CIMCEnvFT localFT = { /* Factory function for CIMXML Client */ -CIMCEnv* _Create_XML_Env(char *id) +CIMCEnv* _Create_XML_Env(const char *id, unsigned int options, int *rc, char **msg) { CIMCEnv *env = (CIMCEnv*)malloc(sizeof(CIMCEnv)); env->hdl=NULL; env->ft=&localFT; - + env->options = options; + + if (!(options & CIMC_NO_CURL_INIT)) { + curl_global_init(CURL_GLOBAL_SSL); + } + return env; } /* *********************************************************** */ diff --git a/cimc/cimc.h b/cimc/cimc.h index a238994..1199eeb 100644 --- a/cimc/cimc.h +++ b/cimc/cimc.h @@ -30,6 +30,9 @@ extern "C" { #endif +/* NewCIMCEnv options */ + +#define CIMC_NO_CURL_INIT 1 /* don't call curl_global_init() or _cleanup() */ /* @@ -404,6 +407,7 @@ extern "C" { struct _CIMCEnv { void *hdl; CIMCEnvFT *ft; + unsigned int options; }; diff --git a/cimc/cimcclient.c b/cimc/cimcclient.c index 4a7f943..73865dc 100644 --- a/cimc/cimcclient.c +++ b/cimc/cimcclient.c @@ -36,7 +36,12 @@ #define ENTLEN 256 #define ERRLEN 1024 +/* Create new CIMCEnv + id - the interface to use, either XML or SfcbLocal + options - options passed to the given backend (ops in cimc.h) + + */ CIMCEnv* NewCIMCEnv(const char *id, unsigned int options, int *rc, char **msg) { char libName[LIBLEN+1]; hooks/post-receive -- SFCC - Small Footprint CIM Client |