
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1205785362 25200 # Node ID 47f5fc1ac66dad65785dd050d6b4b9fe95948f8a # Parent 0c1fb92b677674d5f94648020f72707c5eb16dd8 Make migration indications not crash the provider if they fail to be created. Also make raise_indication() tolerant of getting a NULL. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 0c1fb92b6776 -r 47f5fc1ac66d src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Mon Mar 17 12:22:19 2008 -0700 +++ b/src/Virt_VSMigrationService.c Mon Mar 17 13:22:42 2008 -0700 @@ -692,6 +692,9 @@ static bool raise_indication(const CMPIC CMPIStatus s; const char *ind_name = NULL; + if (ind == NULL) + return false; + ind_name = ind_type_to_name(ind_type); CU_DEBUG("Setting SourceInstance"); @@ -730,6 +733,7 @@ static CMPIInstance *prepare_indication( if (ind == NULL) { CU_DEBUG("Failed to create ind, type '%s:%s_%s'", ns, "Xen", ind_name); + goto out; } if (ind_type == MIG_MODIFIED) {