@@ -1068,6 +1069,10 @@
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
"Referenced domain `%s' does not exist", name);
Remove the call to cu_statusf().
+ virt_set_status(_BROKER, &s,
+ CMPI_RC_ERR_NOT_FOUND,
+ conn,
+ "Referenced domain `%s' does not exist",
name);
goto out;
}
@@ -1252,6 +1257,10 @@
dom = virDomainLookupByName(conn, dom_name);
if (dom == NULL) {
CU_DEBUG("No such domain `%s'", dom_name);
+ virt_set_status(_BROKER, &status,
+ CMPI_RC_ERR_NOT_FOUND,
+ conn,
+ "Referenced domain `%s' does not exist",
dom_name);
When you set the status here, it will get overwritten by the calls to
cu_statusf() on lines 1285 - 1292.
Instead, replace the cu_statusf() calls on lines 1285 - 1292 with calls
to virt_set_status().
@@ -1825,9 +1839,11 @@
dom = virDomainLookupByName(conn, name);
if (dom == NULL) {
- cu_statusf(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Unknown system `%s'", name);
+ virt_set_status(_BROKER, &s,
+ CMPI_RC_ERR_NOT_FOUND,
+ conn,
+ "Referenced domain `%s' \
+ does not exist", name);
Instead of splitting the string up, format like the following:
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
conn,
"Referenced domain `%s' does not exist",
name);
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com