
+1 Sharad Mishra wrote:
# HG changeset patch # User Sharad Mishra <snmishra@us.ibm.com> # Date 1274997567 25200 # Node ID 49781459fdcfb5cd91eb7c1e99701d663d5b53eb # Parent 8b1793add36c7e72933c2f8f04c400fa9d3b8910 Workaround for Pegasus ObjectPath issue.
Pegasus loses its object path after a call to CMGetObjectPath. This patch adds the object path back to indication.
Signed-off-by: Sharad Mishra <snmishra@us.ibm.com>
diff -r 8b1793add36c -r 49781459fdcf src/Virt_ResourceAllocationSettingDataIndication.c --- a/src/Virt_ResourceAllocationSettingDataIndication.c Thu May 27 14:09:56 2010 -0700 +++ b/src/Virt_ResourceAllocationSettingDataIndication.c Thu May 27 14:59:27 2010 -0700 @@ -113,6 +113,10 @@ args->classname = strdup(CLASSNAME(ref)); args->_ctx = _ctx;
+ /* This is a workaround for Pegasus, it loses its objectpath by + CMGetObjectPath. So set it back. */ + ind->ft->setObjectPath((CMPIInstance *)ind, ref); + s = stdi_deliver(broker, ctx, args, (CMPIInstance *)ind); if (s.rc == CMPI_RC_OK) { CU_DEBUG("Indication delivered"); diff -r 8b1793add36c -r 49781459fdcf src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu May 27 14:09:56 2010 -0700 +++ b/src/Virt_VSMigrationService.c Thu May 27 14:59:27 2010 -0700 @@ -757,6 +757,11 @@ ind_name = ind_type_to_name(ind_type);
ref = CMGetObjectPath(inst, &s); + + /* This is a workaround for Pegasus, it loses its objectpath by + CMGetObjectPath. So set it back. */ + inst->ft->setObjectPath((CMPIInstance *)inst, ref); + if ((ref == NULL) || (s.rc != CMPI_RC_OK)) { CU_DEBUG("Failed to get job reference"); } else {
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent@us.ibm.com