diff -r 8e52de626fb5 src/Xen_HostedComputerSystem.c --- a/src/Xen_HostedComputerSystem.c Tue Jun 27 23:39:16 2006 +++ b/src/Xen_HostedComputerSystem.c Wed Jul 12 19:33:47 2006 @@ -54,7 +54,6 @@ static char * _RHSCLASSNAME = "CIM_ComputerSystem"; static char * _LHSPROPERTYNAME = "Dependent"; static char * _RHSPROPERTYNAME = "Antecedent"; - // ---------------------------------------------------------------------------- // AssociationCleanup() // Perform any necessary cleanup immediately before this provider is unloaded. @@ -247,8 +246,7 @@ CMPIData data = CMGetNext(instances, NULL); char *class = CMGetCharPtr(CMGetClassName(CMGetObjectPath(data.value.inst,NULL), NULL)); if (!(strcmp(class,targetclass) == 0) && ((resultClass == NULL) || (strcmp(class,resultClass) == 0))) { -// BUG - returning data causes crash !?! -_SBLIM_TRACE(2, ("--- data.value.inst=\"%s\"", CMGetCharPtr(CDToString(_BROKER, data.value.inst, NULL)))); + _SBLIM_TRACE(2, ("--- data.value.inst=\"%s\"", CMGetCharPtr(CDToString(_BROKER, data.value.inst, NULL)))); CMReturnInstance(results, data.value.inst); } } @@ -334,7 +332,7 @@ //char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL)); // This used to be strcmp, now replaced with CMClassPathIsA //if (strcmp(class,targetclass) == 0) { - if(CMClassPathIsA(_BROKER, data.value.ref, targetclass, NULL)) { + if((CMClassPathIsA(_BROKER, data.value.ref, targetclass, NULL))&&(!CMClassPathIsA(_BROKER, data.value.ref, sourceclass, NULL))) { /* Create an object path for the association. */ CMPIObjectPath * refobjectpath = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refobjectpath)) { @@ -439,7 +437,7 @@ //char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL)); // This used to be strcmp, now replaced with CMClassPathIsA //if (strcmp(class,targetclass) == 0) { - if(CMClassPathIsA(_BROKER, data.value.ref, targetclass, NULL)) { + if((CMClassPathIsA(_BROKER, data.value.ref, targetclass, NULL))&&(!CMClassPathIsA(_BROKER, data.value.ref, sourceclass, NULL))) { /* Create an instance for the association. */ CMPIInstance * refinstance = _CMNewInstance(_BROKER, namespace, _ASSOCCLASS, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refinstance)) {