# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1208191947 25200
# Node ID e5d09c60a54e8b4b60a8c46d3b1e8e3c4048252f
# Parent 49dd281a34132f2ac3d57efb967fafffb9de14e6
Make DevicePool handle missing network
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 49dd281a3413 -r e5d09c60a54e src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Mon Apr 14 09:52:27 2008 -0700
+++ b/src/Virt_DevicePool.c Mon Apr 14 09:52:27 2008 -0700
@@ -673,6 +673,16 @@ static CMPIStatus _netpool_for_network(s
refcn,
"NetworkPool",
ns);
+ if (inst == NULL) {
+ CMPIStatus s;
+
+ CU_DEBUG("Unable to get instance: %s:%s_NetworkPool",
+ ns, refcn);
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Error getting pool instance");
+ return s;
+ }
if (asprintf(&str, "NetworkPool/%s", netname) == -1)
return (CMPIStatus){CMPI_RC_ERR_FAILED, NULL};