Example #1
0
/****************************************************************************
 * Name          : gld_quisced_process
 *
 * Description   : Instruction from the GLND to set the orphan flag
 *
 * Arguments     : evt  - Event structure
 *
 * Return Values : NCSCC_RC_SUCCESS/ NCSCC_RC_FAILURE
 *
 * Notes         : None.
 *****************************************************************************/
static uint32_t gld_quisced_process(GLSV_GLD_EVT *evt)
{
	GLSV_GLD_CB *gld_cb = evt->gld_cb;
	SaAisErrorT saErr = SA_AIS_OK;
	uint32_t rc = NCSCC_RC_SUCCESS;
	TRACE_ENTER();

	if ((evt == GLSV_GLD_EVT_NULL) || (gld_cb == NULL)){
		rc = NCSCC_RC_FAILURE;
		goto end;
	}

	if (gld_cb->is_quiasced) {
		gld_cb->ha_state = SA_AMF_HA_QUIESCED;
		/* Give up our IMM OI implementer role */
		rc = immutil_saImmOiImplementerClear(gld_cb->immOiHandle);
		if (rc != SA_AIS_OK) {
			LOG_ER("saImmOiImplementerClear failed: err = %d", rc);
		}
		gld_cb->is_impl_set = false;
		rc = glsv_gld_mbcsv_chgrole(gld_cb);
		if (rc != NCSCC_RC_SUCCESS) {
			m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
			goto end;
		}
		saAmfResponse(gld_cb->amf_hdl, gld_cb->invocation, saErr);
		gld_cb->is_quiasced = false;
	}
 end:
	TRACE_LEAVE();
	return rc;

}
Example #2
0
/****************************************************************************
 * Name          : gld_quisced_process
 *
 * Description   : Instruction from the GLND to set the orphan flag
 *
 * Arguments     : evt  - Event structure
 *
 * Return Values : NCSCC_RC_SUCCESS/ NCSCC_RC_FAILURE
 *
 * Notes         : None.
 *****************************************************************************/
static uns32 gld_quisced_process(GLSV_GLD_EVT *evt)
{
    GLSV_GLD_CB *gld_cb = evt->gld_cb;
    SaAisErrorT saErr = SA_AIS_OK;
    uns32 rc = NCSCC_RC_SUCCESS;

    if ((evt == GLSV_GLD_EVT_NULL) || (gld_cb == NULL))
        return NCSCC_RC_FAILURE;

    if (gld_cb->is_quiasced) {
        gld_cb->ha_state = SA_AMF_HA_QUIESCED;

        rc = glsv_gld_mbcsv_chgrole(gld_cb);
        if (rc != NCSCC_RC_SUCCESS) {
            m_LEAP_DBG_SINK(NCSCC_RC_FAILURE);
            return rc;
        }
        saAmfResponse(gld_cb->amf_hdl, gld_cb->invocation, saErr);
        gld_cb->is_quiasced = FALSE;
    }
    return rc;

}