if(output != NULL && output_data == NULL) { rc = cib_output_ptr;
if(output_data == NULL) {
cib_native_perform_op(	cib_t *cib, const char *op, const char *host, const char *section,	xmlNodePtr data, xmlNodePtr *output_data, int call_options) {	int  rc = HA_OK;	const char *output = NULL;		struct ha_msg *op_msg   = NULL;	struct ha_msg *op_reply = NULL; 	cib_native_opaque_t *native = cib->variant_opaque;	if(cib->state ==  cib_disconnected) {		return cib_not_connected;	}	if(output_data != NULL) {		*output_data = NULL;	}		op_msg = ha_msg_new(7);	if(op == NULL) {		crm_err("No operation specified");		rc = cib_operation;	}		if(rc == HA_OK) {		rc = ha_msg_add(op_msg, F_TYPE, "cib");	}	if(rc == HA_OK) {		rc = ha_msg_add(op_msg, F_CIB_OPERATION, op);	}	if(rc == HA_OK && host != NULL) {		rc = ha_msg_add(op_msg, F_CIB_HOST, host);	}	if(rc == HA_OK && section != NULL) {		rc = ha_msg_add(op_msg, F_CIB_SECTION, section);	}	if(rc == HA_OK) {		char *tmp = crm_itoa(cib->call_id);		rc = ha_msg_add(op_msg, F_CIB_CALLID, tmp);		crm_free(tmp);	}	if(rc == HA_OK) {		char *tmp = crm_itoa(call_options);		crm_trace("Sending call options: %.8lx, %d, %s",			  (long)call_options, call_options, tmp);		rc = ha_msg_add(op_msg, F_CIB_CALLOPTS, tmp);		crm_free(tmp);	}	if(rc == HA_OK) {		char *calldata = dump_xml_unformatted(data);		if(calldata != NULL) {			rc = ha_msg_add(op_msg, F_CIB_CALLDATA, calldata);		} else {			crm_debug("Calldata string was NULL (xml=%p)", data);		}		crm_free(calldata);	}		if (rc != HA_OK) {		ha_msg_del(op_msg);		crm_err("Failed to create CIB operation message");		return cib_create_msg;	}	cib->call_id++;	crm_debug("Sending message to CIB service");	cl_log_message(op_msg);	rc = msg2ipcchan(op_msg, native->command_channel);	ha_msg_del(op_msg);		if (rc != HA_OK) {		return cib_send_failed;	}	if((call_options & cib_discard_reply)) {		return cib_ok;	} else if(!(call_options & cib_sync_call)) {		return cib->call_id - 1;	}	op_reply = msgfromIPC_noauth(native->command_channel);	if (op_reply == NULL) {		crm_err("No reply message");		return cib_reply_failed;	}	rc = cib_ok;		/* Start processing the reply... */	if(ha_msg_value_int(op_reply, F_CIB_RC, &rc) != HA_OK) {		rc = cib_return_code;	}		/* eg. op may have been a privelidged action and we are in query mode */	if(rc != cib_ok) {		ha_msg_del(op_reply);		return rc;	}		if(!(call_options & cib_discard_reply)) {		output = cl_get_string(op_msg, F_CIB_CALLDATA);	}	if(output != NULL && output_data == NULL) {		rc = cib_output_ptr;	} else if(output != NULL) {		*output_data = string2xml(output);		if(*output_data == NULL) {			rc = cib_output_data;		}	} else {		crm_debug("No output in reply to \"%s\" command %d",			  op, cib->call_id - 1);	}		ha_msg_del(op_reply);	return rc;}