From: Dave H. <hel...@us...> - 2013-04-08 20:18:50
|
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 212ac056f8eaba07485f21ad3e1b2f6bf6470844 (commit) from f0bf5ec8a65ac9252348524ba13818b3d6fdf58a (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 212ac056f8eaba07485f21ad3e1b2f6bf6470844 Author: Dave Heller <hel...@us...> Date: Mon Apr 8 16:17:30 2013 -0400 [sfcb-tix:#31] TestAssociationProvider can cause some queries to fail ----------------------------------------------------------------------- Summary of changes: test/TestProviders/cmpiTestAssociationProvider.c | 60 ++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/test/TestProviders/cmpiTestAssociationProvider.c b/test/TestProviders/cmpiTestAssociationProvider.c index 360a521..a4f9651 100644 --- a/test/TestProviders/cmpiTestAssociationProvider.c +++ b/test/TestProviders/cmpiTestAssociationProvider.c @@ -78,6 +78,10 @@ get_assoc_targetClass_ObjectPath(const CMPIBroker * broker, op = CMNewObjectPath(broker, CMGetCharsPtr(CMGetNameSpace(ref, rc), NULL), targetName, rc); + + if (!op) + CMSetStatusWithChars(_broker, rc, CMPI_RC_ERR_FAILED, + "Create CMPIObjectPath failed in cmpiTestAssociationProvider"); } return op; } @@ -128,6 +132,20 @@ TestAssociationProviderAssociators(CMPIAssociationMI * mi, ref, _RefLeftClass, _RefRightClass, &rc); + + /* + * check for a failure in creating the object path + */ + if (rc.rc != CMPI_RC_OK) + return rc; + + /* + * the target class does not belong to us so just return CMPI_RC_OK + */ + if (!op) { + CMSetStatusWithChars( _broker, &rc, CMPI_RC_OK, NULL ); + return rc; + } sourceClass = CMGetClassName(op, &rc); @@ -184,6 +202,20 @@ TestAssociationProviderAssociatorNames(CMPIAssociationMI * mi, _RefRightClass, &rc); /* + * check for a failure in creating the object path + */ + if (rc.rc != CMPI_RC_OK) + return rc; + + /* + * the target class does not belong to us so just return CMPI_RC_OK + */ + if (!op) { + CMSetStatusWithChars( _broker, &rc, CMPI_RC_OK, NULL ); + return rc; + } + + /* * create new object path of association */ rop = CMNewObjectPath(_broker, @@ -247,6 +279,20 @@ TestAssociationProviderReferences(CMPIAssociationMI * mi, _RefRightClass, &rc); /* + * check for a failure in creating the object path + */ + if (rc.rc != CMPI_RC_OK) + return rc; + + /* + * the target class does not belong to us so just return CMPI_RC_OK + */ + if (!op) { + CMSetStatusWithChars( _broker, &rc, CMPI_RC_OK, NULL ); + return rc; + } + + /* * create new object path of association */ rop = CMNewObjectPath(_broker, @@ -337,6 +383,20 @@ TestAssociationProviderReferenceNames(CMPIAssociationMI * mi, _RefRightClass, &rc); /* + * check for a failure in creating the object path + */ + if (rc.rc != CMPI_RC_OK) + return rc; + + /* + * the target class does not belong to us so just return CMPI_RC_OK + */ + if (!op) { + CMSetStatusWithChars( _broker, &rc, CMPI_RC_OK, NULL ); + return rc; + } + + /* * create new object path of association */ rop = CMNewObjectPath(_broker, hooks/post-receive -- sfcb - Small Footprint CIM Broker |