# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1203463638 28800
# Node ID 839b8d433ef5157fc34f5bb7f003e9cb8ed700c7
# Parent 0d38670abc3cd4be2560daddbd038ebce630f3fb
Update calls to get_migration_service() to use new param.
This param indicates whether the reference should be validated, or if an instance (without
ref validation) should be returned.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 0d38670abc3c -r 839b8d433ef5 src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c Tue Feb 19 15:27:15 2008 -0800
+++ b/src/Virt_ElementCapabilities.c Tue Feb 19 15:27:18 2008 -0800
@@ -70,12 +70,16 @@ static CMPIStatus validate_caps_get_serv
if ((s.rc != CMPI_RC_OK) || (_inst == NULL))
goto out;
- s = get_migration_service(ref, &_inst, _BROKER);
+ s = get_migration_service(ref, &_inst, _BROKER, false);
} else
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
"Not found");
+
+ if ((s.rc != CMPI_RC_OK) || (_inst == NULL))
+ goto out;
+
*inst = _inst;
out:
free(classname);
@@ -99,7 +103,7 @@ static CMPIStatus validate_service_get_c
s = get_vsm_cap(_BROKER, ref, &_inst, false);
} else if (STREQC(classname, "VirtualSystemMigrationService")) {
- s = get_migration_service(ref, &_inst, _BROKER);
+ s = get_migration_service(ref, &_inst, _BROKER, true);
if ((s.rc != CMPI_RC_OK) || (_inst == NULL))
goto out;
diff -r 0d38670abc3c -r 839b8d433ef5 src/Virt_HostedService.c
--- a/src/Virt_HostedService.c Tue Feb 19 15:27:15 2008 -0800
+++ b/src/Virt_HostedService.c Tue Feb 19 15:27:18 2008 -0800
@@ -51,7 +51,7 @@ static CMPIStatus validate_service_ref(c
} else if (STREQC(classname, "ResourcePoolConfigurationService")) {
s = get_rpcs(ref, &inst, _BROKER, true);
} else if (STREQC(classname, "VirtualSystemMigrationService")) {
- s = get_migration_service(ref, &inst, _BROKER);
+ s = get_migration_service(ref, &inst, _BROKER, true);
}
if (s.rc != CMPI_RC_OK)
@@ -117,7 +117,7 @@ static CMPIStatus host_to_service(const
if (!CMIsNullObject(inst))
inst_list_add(list, inst);
- s = get_migration_service(ref, &inst, _BROKER);
+ s = get_migration_service(ref, &inst, _BROKER, false);
if (s.rc != CMPI_RC_OK)
return s;
if (!CMIsNullObject(inst))
diff -r 0d38670abc3c -r 839b8d433ef5 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Tue Feb 19 15:27:15 2008 -0800
+++ b/src/Virt_VSMigrationService.c Tue Feb 19 15:27:18 2008 -0800
@@ -847,7 +847,7 @@ static CMPIStatus EnumInstanceNames(CMPI
const CMPIResult *results,
const CMPIObjectPath *ref)
{
- return return_vsms(ref, results, true, false, false);
+ return return_vsms(ref, results, true, false);
}
static CMPIStatus EnumInstances(CMPIInstanceMI *self,
@@ -857,7 +857,7 @@ static CMPIStatus EnumInstances(CMPIInst
const char **properties)
{
- return return_vsms(ref, results, false, false, false);
+ return return_vsms(ref, results, false, false);
}
@@ -867,7 +867,7 @@ static CMPIStatus GetInstance(CMPIInstan
const CMPIObjectPath *ref,
const char **properties)
{
- return return_vsms(ref, results, false, true, true);
+ return return_vsms(ref, results, false, true);
}
DEFAULT_CI();