# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1203123478 28800
# Node ID fe50fd4e9cfa5b858c9c5c6ce312031ca9af7dee
# Parent 9b93bc85520bc6a9cb486066e83acd8af2432c6a
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 9b93bc85520b -r fe50fd4e9cfa src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c Fri Feb 15 16:56:21 2008 -0800
+++ b/src/Virt_ElementCapabilities.c Fri Feb 15 16:57:58 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 9b93bc85520b -r fe50fd4e9cfa src/Virt_HostedService.c
--- a/src/Virt_HostedService.c Fri Feb 15 16:56:21 2008 -0800
+++ b/src/Virt_HostedService.c Fri Feb 15 16:57:58 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 9b93bc85520b -r fe50fd4e9cfa src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Fri Feb 15 16:56:21 2008 -0800
+++ b/src/Virt_VSMigrationService.c Fri Feb 15 16:57:58 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();