# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1314380301 25200
# Node ID 73e7bb11410f3c10d3b0b61678531314262f09b7
# Parent 2984ede9c082bab48b3494ef4b9f5561fadef2ad
DO NOT PUSH UPSTREAM
This is the workaround that was given to zGryphon
team to prevent unloading of idle providers.
There is a bug in libvirt that needs to be fixed.
That fix will be the actual fix for this problem
that cause segfault when those providers are unloaded
that make a call to virConnectOpen.
This patch is being put on mailing list just for
archiving reasons. It should not be pushed upstream.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff --git a/libcmpiutil.h b/libcmpiutil.h
--- a/libcmpiutil.h
+++ b/libcmpiutil.h
@@ -508,7 +508,16 @@
static CMPIStatus pn##Cleanup(CMPIInstanceMI *mi, \
const CMPIContext *c, \
CMPIBoolean terminating) \
- { RETURN_UNSUPPORTED(); }
+ { \
+ if (terminating) \
+ { \
+ return (CMPIStatus) {CMPI_RC_OK, NULL}; \
+ } \
+ else \
+ { \
+ return (CMPIStatus) {CMPI_RC_NEVER_UNLOAD, NULL}; \
+ } \
+ }
#define DEFAULT_IND_CLEANUP(pn) \
static CMPIStatus pn##IndicationCleanup(CMPIIndicationMI *mi, \
diff --git a/libcmpiutil.spec.in b/libcmpiutil.spec.in
--- a/libcmpiutil.spec.in
+++ b/libcmpiutil.spec.in
@@ -3,7 +3,7 @@
Summary: CMPI Utility Library
Name: libcmpiutil
Version: @PACKAGE_VERSION@
-Release: 1%{?dist}%{?extra_release}
+Release: 2%{?dist}%{?extra_release}
License: LGPLv2+
Group: System Environment/Libraries
Source: libcmpiutil-%{version}.tar.gz