[Libvirt-cim] [PATCH 05 of 27] Hack up ComputerSystemIndication to work with the new prototype

Dan Smith danms at us.ibm.com
Mon Nov 19 18:25:57 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1195497844 28800
# Node ID 2f6d7ab90c35f7a7be3555c945e412f098ad51e6
# Parent  2baab0636245ee278bcddd63dfdd4dffbb8698ba
Hack up ComputerSystemIndication to work with the new prototype
...I'll fix it later when I figure out how we're going to do all of the
per-class stuff in indications.

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r 2baab0636245 -r 2f6d7ab90c35 src/Virt_ComputerSystemIndication.c
--- a/src/Virt_ComputerSystemIndication.c	Mon Nov 19 10:39:04 2007 -0800
+++ b/src/Virt_ComputerSystemIndication.c	Mon Nov 19 10:44:04 2007 -0800
@@ -71,7 +71,10 @@ static bool _lifecycle_indication(const 
         CMPIInstance *ind;
         CMPIStatus s;
 
-        ind = get_typed_instance(broker, type, NAMESPACE(newsystem));
+        ind = get_typed_instance(broker,
+                                 "Xen", /* Temporary hack */
+                                 type,
+                                 NAMESPACE(newsystem));
         if (ind == NULL) {
                 printf("Failed to create ind\n");
                 return false;
@@ -148,12 +151,12 @@ static bool async_ind(CMPIContext *conte
 
         if (type == CS_CREATED) {
                 type_name = "ComputerSystemCreatedIndication";
-                type_cn = get_typed_class(type_name);
+                type_cn = get_typed_class(pfx_from_conn(conn), type_name);
 
                 op = CMNewObjectPath(_BROKER, ns, type_cn, &s);
         } else if (type == CS_DELETED) {
                 type_name = "ComputerSystemDeletedIndication";
-                type_cn = get_typed_class(type_name);
+                type_cn = get_typed_class(pfx_from_conn(conn), type_name);
 
                 op = CMNewObjectPath(_BROKER, ns, type_cn, &s);
         } else {




More information about the Libvirt-cim mailing list