|
From: Chris B. <buc...@us...> - 2012-11-26 23:27:04
|
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 2a27df15c74711e4742972f4010498a7ac5e6e45 (commit)
from 989fee789381930e0c78b17bb04ed7e7cfa6abf3 (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 2a27df15c74711e4742972f4010498a7ac5e6e45
Author: buccella <buc...@li...>
Date: Mon Nov 26 18:26:38 2012 -0500
[ 3590203 ] Remove pg_interop checking in SFCB 1.4
-----------------------------------------------------------------------
Summary of changes:
diff --git a/NEWS b/NEWS
index 8945966..56518a8 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ New features:
- 3506453 Support peer cert verification for SSL indications
- 3531210 Allow indication delivery timeout tuning
- 3562538 Enable curl debug via env variable
+- 3590203 Remove pg_interop checking in SFCB 1.4
Bugs fixed:
- 3495804 Cleanup: httpProcId still defined, wrong define in cimXmlGen
diff --git a/classProvider.c b/classProvider.c
index 8c5f091..8f3923e 100644
--- a/classProvider.c
+++ b/classProvider.c
@@ -572,10 +572,7 @@ getNsReg(const CMPIObjectPath * ref, int *rc)
if (nsi && nsi->hdl) {
ns = (char *) nsi->hdl;
- if (strcasecmp(ns, "root/pg_interop") == 0)
- cReg = nsHt->ft->get(nsHt, "root/interop");
- else
- cReg = nsHt->ft->get(nsHt, ns);
+ cReg = nsHt->ft->get(nsHt, ns);
return cReg;
}
diff --git a/classProviderGz.c b/classProviderGz.c
index 95d89b2..fe154db 100644
--- a/classProviderGz.c
+++ b/classProviderGz.c
@@ -539,10 +539,7 @@ getNsReg(const CMPIObjectPath * ref, int *rc)
if (nsi && nsi->hdl) {
ns = (char *) nsi->hdl;
- if (strcasecmp(ns, "root/pg_interop") == 0)
- cReg = nsHt->ft->get(nsHt, "root/interop");
- else
- cReg = nsHt->ft->get(nsHt, ns);
+ cReg = nsHt->ft->get(nsHt, ns);
return cReg;
}
diff --git a/classProviderMem.c b/classProviderMem.c
index e23c28b..86a620a 100644
--- a/classProviderMem.c
+++ b/classProviderMem.c
@@ -452,10 +452,7 @@ getNsReg(const CMPIObjectPath * ref, int *rc)
if (nsi && nsi->hdl) {
ns = (char *) nsi->hdl;
- if (strcasecmp(ns, "root/pg_interop") == 0)
- cReg = nsHt->ft->get(nsHt, "root/interop");
- else
- cReg = nsHt->ft->get(nsHt, ns);
+ cReg = nsHt->ft->get(nsHt, ns);
return cReg;
}
diff --git a/classProviderSf.c b/classProviderSf.c
index ab88210..94a6ec3 100644
--- a/classProviderSf.c
+++ b/classProviderSf.c
@@ -559,10 +559,7 @@ getNsReg(const CMPIObjectPath * ref, int *rc)
if (nsi && nsi->hdl) {
ns = (char *) nsi->hdl;
- if (strcasecmp(ns, "root/pg_interop") == 0)
- cReg = nsHt->ft->get(nsHt, "root/interop");
- else
- cReg = nsHt->ft->get(nsHt, ns);
+ cReg = nsHt->ft->get(nsHt, ns);
return cReg;
}
diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c
index c18a7f9..1b38632 100644
--- a/indCIMXMLHandler.c
+++ b/indCIMXMLHandler.c
@@ -55,7 +55,7 @@ static int
interOpNameSpace(const CMPIObjectPath * cop, CMPIStatus *st)
{
char *ns = (char *) CMGetNameSpace(cop, NULL)->hdl;
- if (strcasecmp(ns, "root/interop") && strcasecmp(ns, "root/pg_interop")) {
+ if (strcasecmp(ns, "root/interop")) {
setStatus(st, CMPI_RC_ERR_FAILED,
"Object must reside in root/interop");
return 0;
diff --git a/internalProvider.c b/internalProvider.c
index 71c68ec..039d363 100644
--- a/internalProvider.c
+++ b/internalProvider.c
@@ -39,7 +39,6 @@
#define LOCALCLASSNAME "InternalProvider"
static char *interopNs = "root/interop";
-static char *pg_interopNs = "root/pg_interop";
extern ProviderInfo *interOpProvInfoPtr;
extern ProviderInfo *forceNoProvInfoPtr;
@@ -53,16 +52,6 @@ extern void setStatus(CMPIStatus *st, CMPIrc rc, const char *msg);
static const CMPIBroker *_broker;
-static const char *
-repositoryNs(const char *nss)
-{
- if (strcasecmp(nss, pg_interopNs) == 0) {
- return interopNs;
- } else {
- return nss;
- }
-}
-
/*
* static int cpy2lower(char *in, char *out) { int i = 0; while ((out[i] =
* tolower(in[i++])) != 0); return i - 1; }
@@ -185,7 +174,6 @@ InternalProviderEnumInstanceNames(CMPIInstanceMI * mi,
CMPIObjectPath *cop;
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *cns = cn->ft->getCharPtr(cn, NULL);
- const char *bnss = repositoryNs(nss);
size_t ekl;
int i,
ac = 0;
@@ -203,14 +191,14 @@ InternalProviderEnumInstanceNames(CMPIInstanceMI * mi,
in = CMNewArgs(Broker, NULL);
out = CMNewArgs(Broker, NULL);
CMAddArg(in, "class", cns, CMPI_chars);
- op = CMNewObjectPath(Broker, bnss, "$ClassProvider$", &sti);
+ op = CMNewObjectPath(Broker, nss, "$ClassProvider$", &sti);
rv = CBInvokeMethod(Broker, ctx, op, "getallchildren", in, out, &sti);
ar = CMGetArg(out, "children", NULL).value.array;
if (ar)
ac = CMGetArrayCount(ar, NULL);
for (i = 0; cns; i++) {
- if ((bi = _getIndex(bnss, cns)) != NULL) {
+ if ((bi = _getIndex(nss, cns)) != NULL) {
if (ipGetFirst(bi, NULL, &kp, &ekl)) {
while (1) {
strcpy(copKey, nss);
@@ -258,7 +246,6 @@ enumInstances(CMPIInstanceMI * mi,
CMPIString *ns = CMGetNameSpace(ref, NULL);
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *cns = cn->ft->getCharPtr(cn, NULL);
- const char *bnss = repositoryNs(nss);
int len,
i,
ac = 0;
@@ -279,7 +266,7 @@ enumInstances(CMPIInstanceMI * mi,
else
CMAddArg(in, "class", cns, CMPI_chars);
- op = CMNewObjectPath(Broker, bnss, "$ClassProvider$", &sti);
+ op = CMNewObjectPath(Broker, nss, "$ClassProvider$", &sti);
_SFCB_TRACE(1, ("--- getallchildren"));
rv = CBInvokeMethod(Broker, ctx, op, "getallchildren", in, out, &sti);
_SFCB_TRACE(1, ("--- getallchildren rc: %d", sti.rc));
@@ -291,7 +278,7 @@ enumInstances(CMPIInstanceMI * mi,
for (i = 0; cns; i++) {
_SFCB_TRACE(1, ("--- looking for %s", cns));
- if ((bi = _getIndex(bnss, cns)) != NULL) {
+ if ((bi = _getIndex(nss, cns)) != NULL) {
for (ci = ipGetFirst(bi, &len, NULL, 0); ci;
ci = ipGetNext(bi, &len, NULL, 0)) {
if (properties) {
@@ -366,19 +353,18 @@ internalProviderGetInstance(const CMPIObjectPath * cop, CMPIStatus *rc)
CMPIInstance *ci = NULL;
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *cns = cn->ft->getCharPtr(cn, NULL);
- const char *bnss = repositoryNs(nss);
CMPIStatus st = { CMPI_RC_OK, NULL };
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "internalProviderGetInstance");
_SFCB_TRACE(1, ("--- Get instance for %s %s %s", nss, cns, key));
- if (testNameSpace(bnss, rc) == 0) {
+ if (testNameSpace(nss, rc) == 0) {
_SFCB_TRACE(1, ("--- Invalid namespace %s", nss));
free(key);
_SFCB_RETURN(NULL);
}
- ci = ipGetBlob(bnss, cns, key, &len);
+ ci = ipGetBlob(nss, cns, key, &len);
if (ci == NULL) {
_SFCB_TRACE(1, ("--- Instance not found"));
@@ -429,11 +415,10 @@ InternalProviderCreateInstance(CMPIInstanceMI * mi,
char *key = normalizeObjectPathCharsDup(cop);
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *cns = cn->ft->getCharPtr(cn, NULL);
- const char *bnss = repositoryNs(nss);
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderCreateInstance");
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
free(key);
_SFCB_RETURN(st);
}
@@ -448,7 +433,7 @@ InternalProviderCreateInstance(CMPIInstanceMI * mi,
_SFCB_RETURN(st);
}
- if (existingBlob(bnss, cns, key)) {
+ if (existingBlob(nss, cns, key)) {
CMPIStatus st = { CMPI_RC_ERR_ALREADY_EXISTS, NULL };
free(key);
_SFCB_RETURN(st);
@@ -458,7 +443,7 @@ InternalProviderCreateInstance(CMPIInstanceMI * mi,
blob = malloc(len + 64);
getSerializedInstance(ci, blob);
- if (addBlob(bnss, cns, key, blob, (int) len)) {
+ if (addBlob(nss, cns, key, blob, (int) len)) {
CMPIStatus st = { CMPI_RC_ERR_FAILED, NULL };
st.msg =
sfcb_native_new_CMPIString("Unable to write to repository", NULL,
@@ -493,16 +478,15 @@ InternalProviderModifyInstance(CMPIInstanceMI * mi,
char *key = normalizeObjectPathCharsDup(cop);
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *cns = cn->ft->getCharPtr(cn, NULL);
- const char *bnss = repositoryNs(nss);
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderSetInstance");
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
free(key);
_SFCB_RETURN(st);
}
- if (existingBlob(bnss, cns, key) == 0) {
+ if (existingBlob(nss, cns, key) == 0) {
CMPIStatus st = { CMPI_RC_ERR_NOT_FOUND, NULL };
free(key);
_SFCB_RETURN(st);
@@ -515,7 +499,7 @@ InternalProviderModifyInstance(CMPIInstanceMI * mi,
len = getInstanceSerializedSize(ci);
blob = malloc(len + 64);
getSerializedInstance(ci, blob);
- addBlob(bnss, cns, key, blob, (int) len);
+ addBlob(nss, cns, key, blob, (int) len);
free(blob);
free(key);
_SFCB_RETURN(st);
@@ -533,22 +517,21 @@ InternalProviderDeleteInstance(CMPIInstanceMI * mi,
char *key = normalizeObjectPathCharsDup(cop);
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *cns = cn->ft->getCharPtr(cn, NULL);
- const char *bnss = repositoryNs(nss);
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderDeleteInstance");
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
free(key);
_SFCB_RETURN(st);
}
- if (existingBlob(bnss, cns, key) == 0) {
+ if (existingBlob(nss, cns, key) == 0) {
CMPIStatus st = { CMPI_RC_ERR_NOT_FOUND, NULL };
free(key);
_SFCB_RETURN(st);
}
- deleteBlob(bnss, cns, key);
+ deleteBlob(nss, cns, key);
free(key);
_SFCB_RETURN(st);
diff --git a/interopProvider.c b/interopProvider.c
index d6c8164..771d36e 100644
--- a/interopProvider.c
+++ b/interopProvider.c
@@ -122,7 +122,7 @@ static int
interOpNameSpace(const CMPIObjectPath * cop, CMPIStatus *st)
{
char *ns = (char *) CMGetNameSpace(cop, NULL)->hdl;
- if (strcasecmp(ns, "root/interop") && strcasecmp(ns, "root/pg_interop")) {
+ if (strcasecmp(ns, "root/interop")) {
if (st)
setStatus(st, CMPI_RC_ERR_FAILED,
"Object must reside in root/interop");
diff --git a/providerMgr.c b/providerMgr.c
index 8185025..6d452dc 100644
--- a/providerMgr.c
+++ b/providerMgr.c
@@ -179,9 +179,6 @@ nameSpaceOk(ProviderInfo * info, char *nameSpace)
if (info == classProvInfoPtr)
_SFCB_RETURN(1);
- if (strcasecmp(nameSpace, "root/pg_interop") == 0)
- return nameSpaceOk(info, "root/interop");
-
_SFCB_TRACE(1, ("--- failed"));
_SFCB_RETURN(0);
}
diff --git a/qualifierProvider.c b/qualifierProvider.c
index 1f42bd1..0ff8928 100644
--- a/qualifierProvider.c
+++ b/qualifierProvider.c
@@ -32,7 +32,6 @@
#include "providerRegister.h"
#include "fileRepository.h"
static char *interopNs = "root/interop";
-static char *pg_interopNs = "root/pg_interop";
static char *qualrep = "qualifiers"; // filename of qualifier
// repository
extern ProviderInfo *interOpProvInfoPtr;
@@ -46,15 +45,6 @@ static const CMPIBroker *_broker;
*
*/
-static const char *
-repositoryNs(const char *nss)
-{
- if (strcasecmp(nss, pg_interopNs) == 0) {
- return interopNs;
- } else {
- return nss;
- }
-}
static int
testNameSpace(const char *ns, CMPIStatus *st)
{
@@ -105,17 +95,16 @@ QualifierProviderGetQualifier(CMPIQualifierDeclMI * mi,
void *blob;
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *qns = qn->ft->getCharPtr(qn, NULL);
- const char *bnss = repositoryNs(nss);
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "QualifierProviderGetQualifier");
_SFCB_TRACE(1, ("--- Get Qualifier for %s %s %s", nss, qualrep, qns));
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
_SFCB_TRACE(1, ("--- Invalid namespace %s", nss));
_SFCB_RETURN(st);
}
- blob = getBlob(bnss, qualrep, qns, &len);
+ blob = getBlob(nss, qualrep, qns, &len);
if (blob == NULL) {
_SFCB_TRACE(1, ("--- Qualifier not found"));
@@ -149,26 +138,25 @@ QualifierProviderSetQualifier(CMPIQualifierDeclMI * mi,
CMPIString *ns = CMGetNameSpace(cop, NULL);
char *qns = (char *) qual->ft->getCharQualifierName(qual);
const char *nss = ns->ft->getCharPtr(ns, NULL);
- const char *bnss = repositoryNs(nss);
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "QualifierProviderSetQualifier");
_SFCB_TRACE(1, ("--- Set Qualifier for %s %s %s", nss, qualrep, qns));
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
_SFCB_TRACE(1, ("--- Invalid namespace %s", nss));
_SFCB_RETURN(st);
}
- if (existingBlob(bnss, qualrep, qns)) {
+ if (existingBlob(nss, qualrep, qns)) {
// first delete it
- deleteBlob(bnss, qualrep, qns);
+ deleteBlob(nss, qualrep, qns);
}
len = getQualifierSerializedSize(qual);
blob = malloc(len + 64);
getSerializedQualifier(qual, blob);
- if (addBlob(bnss, qualrep, qns, blob, (int) len)) {
+ if (addBlob(nss, qualrep, qns, blob, (int) len)) {
CMPIStatus st = { CMPI_RC_ERR_FAILED, NULL };
st.msg =
sfcb_native_new_CMPIString("Unable to write to repository", NULL,
@@ -191,21 +179,20 @@ QualifierProviderDeleteQualifier(CMPIQualifierDeclMI * mi,
const char *nss = ns->ft->getCharPtr(ns, NULL);
const char *qns = qn->ft->getCharPtr(qn, NULL);
- const char *bnss = repositoryNs(nss);
_SFCB_ENTER(TRACE_INTERNALPROVIDER, "QualifierProviderDeleteQualifier");
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
_SFCB_TRACE(1, ("--- Invalid namespace %s", nss));
_SFCB_RETURN(st);
}
- if (existingBlob(bnss, qualrep, qns) == 0) {
+ if (existingBlob(nss, qualrep, qns) == 0) {
CMPIStatus st = { CMPI_RC_ERR_NOT_FOUND, NULL };
_SFCB_RETURN(st);
}
- deleteBlob(bnss, qualrep, qns);
+ deleteBlob(nss, qualrep, qns);
_SFCB_RETURN(st);
}
@@ -217,7 +204,6 @@ QualifierProviderEnumQualifiers(CMPIQualifierDeclMI * mi,
{
CMPIString *ns = CMGetNameSpace(ref, NULL);
const char *nss = ns->ft->getCharPtr(ns, NULL);
- const char *bnss = repositoryNs(nss);
BlobIndex *bi;
int len = 0;
void *blob;
@@ -226,12 +212,12 @@ QualifierProviderEnumQualifiers(CMPIQualifierDeclMI * mi,
_SFCB_ENTER(TRACE_PROVIDERS, "QualifierProviderEnumQualifiers");
- if (testNameSpace(bnss, &st) == 0) {
+ if (testNameSpace(nss, &st) == 0) {
_SFCB_TRACE(1, ("--- Invalid namespace %s", nss));
_SFCB_RETURN(st);
}
// why 64 ? copied it from _getIndex from InternalProvider
- if (getIndex(bnss, qualrep, strlen(bnss) + strlen(qualrep) + 64, 0, &bi)) {
+ if (getIndex(nss, qualrep, strlen(nss) + strlen(qualrep) + 64, 0, &bi)) {
for (blob = getFirst(bi, &len, NULL, 0); blob;
blob = getNext(bi, &len, NULL, 0)) {
q = relocateSerializedQualifier(blob);
diff --git a/test/xmltest/enumerateNameSpaces.xml b/test/xmltest/enumerateNameSpaces.xml
index 7ab552b..6bd0d9c 100644
--- a/test/xmltest/enumerateNameSpaces.xml
+++ b/test/xmltest/enumerateNameSpaces.xml
@@ -5,7 +5,7 @@
<IMETHODCALL NAME="EnumerateInstances">
<LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"/>
- <NAMESPACE NAME="PG_InterOp"/>
+ <NAMESPACE NAME="InterOp"/>
</LOCALNAMESPACEPATH>
<IPARAMVALUE NAME="ClassName">
<CLASSNAME NAME="CIM_Namespace"/>
hooks/post-receive
--
SFCB - Small Footprint CIM Broker
|