From: Chris B. <buc...@us...> - 2012-03-07 06:30:13
|
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 ad10ca9897578a66864905652cb02645894086c7 (commit) from 3ed344550a9d63787266bfbf8e1a942fbdb828de (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 ad10ca9897578a66864905652cb02645894086c7 Author: buccella <buc...@li...> Date: Wed Mar 7 01:30:45 2012 -0500 [ 3498275 ] Remove __Namespace ----------------------------------------------------------------------- Summary of changes: diff --git a/10_interop.mof b/10_interop.mof index a726caa..06d209c 100644 --- a/10_interop.mof +++ b/10_interop.mof @@ -44,12 +44,6 @@ class DMY_SubProfileRequiresProfile : CIM_SubProfileRequiresProfile { }; -class __Namespace -{ - [key] - string Name; -}; - class DMY_ListenerDestinationCIMXML : CIM_ListenerDestinationCIMXML { }; diff --git a/ChangeLog b/ChangeLog index c6154ed..f3d203a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-07 Chris Buccella <buc...@li...> + + * 10_interop.mof, default.reg.in, interopServerProvider.c: + [ 3498275 ] Remove __Namespace + 2012-03-01 Michael Chase-Salerno <br...@li...> * indCIMXMLHandler.c: diff --git a/NEWS b/NEWS index f394344..961d1f7 100644 --- a/NEWS +++ b/NEWS @@ -108,6 +108,7 @@ Bugs Fixed: - 3496383 Faster Return from CBDeliverIndication - 3497765 Better Error Handling in sfcb Provider Manager and Driver - 3497950 SFCB Semaphore Handling Improvements +- 3498275 Remove __Namespace Changes in 1.3.13 ================= diff --git a/default.reg.in b/default.reg.in index 8d16985..b3c5cc2 100644 --- a/default.reg.in +++ b/default.reg.in @@ -90,12 +90,6 @@ type: instance namespace: root/interop # -[__Namespace] - provider: ServerProvider - location: sfcInteropServerProvider - type: instance - namespace: * -# [CIM_ObjectManager] provider: ServerProvider location: sfcInteropServerProvider diff --git a/interopServerProvider.c b/interopServerProvider.c index ad2a039..8e3893b 100644 --- a/interopServerProvider.c +++ b/interopServerProvider.c @@ -105,19 +105,13 @@ getSfcbUuid() static int genNameSpaceData(const char *ns, const char *dn, int dbl, const CMPIResult *rslt, CMPIObjectPath * op, - CMPIInstance *ci, int nsOpt) + CMPIInstance *ci) { if (ci) { - if (nsOpt) - CMSetProperty(ci, "Name", dn, CMPI_chars); - else - CMSetProperty(ci, "Name", ns + dbl + 1, CMPI_chars); + CMSetProperty(ci, "Name", ns + dbl + 1, CMPI_chars); CMReturnInstance(rslt, ci); } else if (op) { - if (nsOpt) - CMAddKey(op, "Name", dn, CMPI_chars); - else - CMAddKey(op, "Name", ns + dbl + 1, CMPI_chars); + CMAddKey(op, "Name", ns + dbl + 1, CMPI_chars); CMReturnObjectPath(rslt, op); } return 0; @@ -126,7 +120,7 @@ genNameSpaceData(const char *ns, const char *dn, int dbl, static void gatherNameSpacesData(const char *dn, int dbl, const CMPIResult *rslt, - CMPIObjectPath * op, CMPIInstance *ci, int nsOpt) + CMPIObjectPath * op, CMPIInstance *ci) { DIR *dir, *de_test; @@ -153,38 +147,20 @@ gatherNameSpacesData(const char *dn, int dbl, } closedir(de_test); - genNameSpaceData(n, de->d_name, dbl, rslt, op, ci, nsOpt); - if (nsOpt != 1) { - if (nsOpt == 0) - gatherNameSpacesData(n, dbl, rslt, op, ci, nsOpt); - } + genNameSpaceData(n,de->d_name,dbl,rslt,op,ci); + gatherNameSpacesData(n,dbl,rslt,op,ci); free(n); } closedir(dir); } } -static void -gatherOldNameSpacesData(const char *dn, int dbl, - const CMPIResult *rslt, - CMPIObjectPath * op, CMPIInstance *ci) -{ - - char *ns = (char *) CMGetNameSpace(op, NULL)->hdl; - char *nns = alloca(strlen(dn) + strlen(ns) + 8); - - strcpy(nns, dn); - strcat(nns, "/"); - strcat(nns, ns); - gatherNameSpacesData(nns, dbl, rslt, op, ci, 1); -} - static CMPIStatus NameSpaceProviderGetInstance(CMPIInstanceMI * mi, const CMPIContext *ctx, const CMPIResult *rslt, const CMPIObjectPath * cop, - const char **properties, int nsOpt) + const char **properties) { CMPIStatus st = { CMPI_RC_OK, NULL }; char *dirn, @@ -196,7 +172,6 @@ NameSpaceProviderGetInstance(CMPIInstanceMI * mi, CMPIString *name; unsigned short info = 0, dbl; - char *ns; _SFCB_ENTER(TRACE_PROVIDERS, "NameSpaceProviderGetInstance"); @@ -212,39 +187,23 @@ NameSpaceProviderGetInstance(CMPIInstanceMI * mi, if (dirn[strlen(dirn) - 1] != '/') strcat(dn, "/"); strcat(dn, "repository/"); - if (nsOpt) { - ns = CMGetCharPtr(CMGetNameSpace(cop, NULL)); - if (ns) { - strcat(dn, ns); - strcat(dn, "/"); - } - } dbl = strlen(dn); strcat(dn, (char *) name->hdl); if ((dir = opendir(dn)) != NULL) { - if (nsOpt) { - op = CMNewObjectPath(_broker, "root/interop", "__Namespace", NULL); - ci = CMNewInstance(_broker, op, NULL); - } else { - op = CMNewObjectPath(_broker, "root/interop", "CIM_Namespace", - NULL); - ci = CMNewInstance(_broker, op, NULL); - - CMSetProperty(ci, "CreationClassName", "CIM_Namespace", - CMPI_chars); - CMSetProperty(ci, "ObjectManagerCreationClassName", - "CIM_ObjectManager", CMPI_chars); - CMSetProperty(ci, "ObjectManagerName", getSfcbUuid(), CMPI_chars); - CMSetProperty(ci, "SystemCreationClassName", "CIM_ComputerSystem", - CMPI_chars); - hostName[0] = 0; - gethostname(hostName, 511); - CMSetProperty(ci, "SystemName", hostName, CMPI_chars); - CMSetProperty(ci, "ClassInfo", &info, CMPI_uint16); - } - CMSetProperty(ci, "Name", dn + dbl, CMPI_chars); - CMReturnInstance(rslt, ci); + op=CMNewObjectPath(_broker,"root/interop","CIM_Namespace",NULL); + ci=CMNewInstance(_broker,op,NULL); + + CMSetProperty(ci,"CreationClassName","CIM_Namespace",CMPI_chars); + CMSetProperty(ci,"ObjectManagerCreationClassName","CIM_ObjectManager",CMPI_chars); + CMSetProperty(ci,"ObjectManagerName",getSfcbUuid(),CMPI_chars); + CMSetProperty(ci,"SystemCreationClassName","CIM_ComputerSystem",CMPI_chars); + hostName[0]=0; + gethostname(hostName,511); + CMSetProperty(ci,"SystemName",hostName,CMPI_chars); + CMSetProperty(ci,"ClassInfo",&info,CMPI_uint16); + CMSetProperty(ci,"Name",dn+dbl,CMPI_chars); + CMReturnInstance(rslt,ci); closedir(dir); } else st.rc = CMPI_RC_ERR_NOT_FOUND; @@ -259,7 +218,7 @@ NameSpaceProviderEnumInstances(CMPIInstanceMI * mi, const CMPIContext *ctx, const CMPIResult *rslt, const CMPIObjectPath * ref, - const char **properties, int nsOpt) + const char **properties) { CMPIStatus st = { CMPI_RC_OK, NULL }; char *dir, @@ -281,19 +240,6 @@ NameSpaceProviderEnumInstances(CMPIInstanceMI * mi, strcat(dn, "/"); strcat(dn, "repository"); - if (nsOpt) { - op = CMNewObjectPath(_broker, "root/interop", "__Namespace", &st); - if (op) { - ci = CMNewInstance(_broker, op, &st); - if (ci) { - op = CMGetObjectPath(ci, NULL); - CMSetNameSpaceFromObjectPath(op, ref); - gatherOldNameSpacesData(dn, strlen(dn), rslt, op, ci); - } - } - _SFCB_RETURN(st); - } - op = CMNewObjectPath(_broker, "root/interop", "CIM_Namespace", NULL); ci = CMNewInstance(_broker, op, NULL); @@ -308,7 +254,7 @@ NameSpaceProviderEnumInstances(CMPIInstanceMI * mi, CMSetProperty(ci, "SystemName", hostName, CMPI_chars); CMSetProperty(ci, "ClassInfo", &info, CMPI_uint16); - gatherNameSpacesData(dn, strlen(dn), rslt, NULL, ci, 0); + gatherNameSpacesData(dn, strlen(dn), rslt, NULL, ci); _SFCB_RETURN(st); } @@ -317,7 +263,7 @@ static CMPIStatus NameSpaceProviderEnumInstanceNames(CMPIInstanceMI * mi, const CMPIContext *ctx, const CMPIResult *rslt, - const CMPIObjectPath * ref, int nsOpt) + const CMPIObjectPath * ref) { CMPIStatus st = { CMPI_RC_OK, NULL }; char *dir, @@ -337,13 +283,6 @@ NameSpaceProviderEnumInstanceNames(CMPIInstanceMI * mi, strcat(dn, "/"); strcat(dn, "repository"); - if (nsOpt) { - char *ns = (char *) CMGetNameSpace(ref, NULL)->hdl; - op = CMNewObjectPath(_broker, ns, "__Namespace", NULL); - gatherOldNameSpacesData(dn, strlen(dn), rslt, op, NULL); - _SFCB_RETURN(st); - } - op = CMNewObjectPath(_broker, "root/interop", "CIM_Namespace", NULL); CMAddKey(op, "CreationClassName", "CIM_Namespace", CMPI_chars); @@ -356,7 +295,7 @@ NameSpaceProviderEnumInstanceNames(CMPIInstanceMI * mi, gethostname(hostName, 511); CMAddKey(op, "SystemName", hostName, CMPI_chars); - gatherNameSpacesData(dn, strlen(dn), rslt, op, NULL, nsOpt); + gatherNameSpacesData(dn, strlen(dn), rslt, op, NULL); _SFCB_RETURN(st); } @@ -785,9 +724,7 @@ ServerProviderGetInstance(CMPIInstanceMI * mi, CMPIString *cls = CMGetClassName(ref, NULL); if (strcasecmp((char *) cls->hdl, "cim_namespace") == 0) - return NameSpaceProviderGetInstance(mi, ctx, rslt, ref, properties, 0); - else if (strcasecmp((char *) cls->hdl, "__namespace") == 0) - return NameSpaceProviderGetInstance(mi, ctx, rslt, ref, properties, 1); + return NameSpaceProviderGetInstance(mi, ctx, rslt, ref, properties); if (strcasecmp((char *) cls->hdl, "cim_objectmanager") == 0) return ServiceProviderGetInstance(mi, ctx, rslt, ref, properties, "cim_objectmanager"); @@ -815,9 +752,7 @@ ServerProviderEnumInstanceNames(CMPIInstanceMI * mi, CMPIString *cls = CMGetClassName(ref, NULL); if (strcasecmp((char *) cls->hdl, "cim_namespace") == 0) - return NameSpaceProviderEnumInstanceNames(mi, ctx, rslt, ref, 0); - if (strcasecmp((char *) cls->hdl, "__namespace") == 0) - return NameSpaceProviderEnumInstanceNames(mi, ctx, rslt, ref, 1); + return NameSpaceProviderEnumInstanceNames(mi, ctx, rslt, ref); if (strcasecmp((char *) cls->hdl, "cim_objectmanager") == 0) return ServiceProviderEnumInstanceNames(mi, ctx, rslt, ref, "CIM_ObjectManager", @@ -847,11 +782,7 @@ ServerProviderEnumInstances(CMPIInstanceMI * mi, CMPIString *cls = CMGetClassName(ref, NULL); if (strcasecmp((char *) cls->hdl, "cim_namespace") == 0) - return NameSpaceProviderEnumInstances(mi, ctx, rslt, ref, properties, - 0); - if (strcasecmp((char *) cls->hdl, "__namespace") == 0) - return NameSpaceProviderEnumInstances(mi, ctx, rslt, ref, properties, - 1); + return NameSpaceProviderEnumInstances(mi, ctx, rslt, ref, properties); if (strcasecmp((char *) cls->hdl, "cim_objectmanager") == 0) return ObjectManagerProviderEnumInstances(mi, ctx, rslt, ref, properties); hooks/post-receive -- SFCB - Small Footprint CIM Broker |