
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1214936716 25200 # Node ID fa42fd637a89653873eb0039e8fadf834228f4bd # Parent 943ae9ae775336ee6cf5a8116eaae069d0bfe5fc [CU] Report disabled indications Make sure we always return a valid status object so that we can actually tell from the caller if the indication was delivered or not. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 943ae9ae7753 -r fa42fd637a89 std_indication.c --- a/std_indication.c Tue May 20 10:30:32 2008 -0700 +++ b/std_indication.c Tue Jul 01 11:25:16 2008 -0700 @@ -167,6 +167,7 @@ cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "Couldn't get indication name for enable check."); + goto out; } enabled = is_ind_enabled(args->_ctx, ind_name, &s); @@ -175,8 +176,16 @@ goto out; } + CU_DEBUG("Indication %s is%s enabled", + ind_name, + enabled ? "" : " not"); + if (enabled) s = CBDeliverIndication(broker, ctx, args->ns, ind); + else + cu_statusf(broker, &s, + CMPI_RC_ERR_METHOD_NOT_AVAILABLE, + "Indication not enabled"); out: return s;