osaf/services/saf/immsv/immnd/ImmModel.cc | 12 ++++++++++-- osaf/services/saf/immsv/immnd/immnd_evt.c | 10 +++++++++- osaf/services/saf/immsv/immnd/immnd_init.h | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-)
When receiving redundant request that comes from timed out client, return SA_AIS_OK with the implementer ID. diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc b/osaf/services/saf/immsv/immnd/ImmModel.cc --- a/osaf/services/saf/immsv/immnd/ImmModel.cc +++ b/osaf/services/saf/immsv/immnd/ImmModel.cc @@ -1828,8 +1828,10 @@ immModel_implementerSet(IMMND_CB *cb, co } SaAisErrorT -immModel_implIsFree(IMMND_CB *cb, const SaImmOiImplementerNameT impName) -{ +immModel_implIsFree(IMMND_CB *cb, const IMMSV_OI_IMPLSET_REQ *req, SaUint32T *impl_id) +{ + *impl_id = 0; + SaImmOiImplementerNameT impName = req->impl_name.buf; std::string implName(impName); if(implName.empty()) { LOG_NO("ERR_INVALID_PARAM: Empty implementer name"); @@ -1844,6 +1846,12 @@ immModel_implIsFree(IMMND_CB *cb, const if(impl->mId == 0) {return SA_AIS_OK;} if(impl->mDying) {return SA_AIS_ERR_TRY_AGAIN;} + /* Check for redundant request that comes from previously timed out client */ + if (impl->mConn == m_IMMSV_UNPACK_HANDLE_HIGH(req->client_hdl) && + impl->mNodeId == m_IMMSV_UNPACK_HANDLE_LOW(req->client_hdl)) { + *impl_id = impl->mId; + } + return SA_AIS_ERR_EXIST; } diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c b/osaf/services/saf/immsv/immnd/immnd_evt.c --- a/osaf/services/saf/immsv/immnd/immnd_evt.c +++ b/osaf/services/saf/immsv/immnd/immnd_evt.c @@ -2556,10 +2556,17 @@ static uint32_t immnd_evt_proc_impl_set( in a subsequent implementerSet over fevs arriving before this implementerSet arrives back over fevs. See finalizeSync #1871. */ + SaUint32T impl_id; send_evt.info.imma.info.implSetRsp.error = - immModel_implIsFree(cb, evt->info.implSet.impl_name.buf); + immModel_implIsFree(cb, &evt->info.implSet, &impl_id); + if(send_evt.info.imma.info.implSetRsp.error != SA_AIS_OK) { + if (impl_id && send_evt.info.imma.info.implSetRsp.error == SA_AIS_ERR_EXIST) { + /* Immediately respond OK to agent */ + send_evt.info.imma.info.implSetRsp.error = SA_AIS_OK; + send_evt.info.imma.info.implSetRsp.implId = impl_id; + } goto agent_rsp; } @@ -9859,6 +9866,7 @@ static void immnd_evt_proc_impl_set_rsp( nodeId = m_IMMSV_UNPACK_HANDLE_LOW(clnt_hdl); implId = evt->info.implSet.impl_id; TRACE_2("originated here?:%u nodeId:%x conn: %u", originatedAtThisNd, nodeId, conn); + sleep(1); if(evt->type == IMMND_EVT_D2ND_IMPLSET_RSP) { /* In immModel_implementerSet, 0 will be replaced with DEFAULT_TIMEOUT_SEC diff --git a/osaf/services/saf/immsv/immnd/immnd_init.h b/osaf/services/saf/immsv/immnd/immnd_init.h --- a/osaf/services/saf/immsv/immnd/immnd_init.h +++ b/osaf/services/saf/immsv/immnd/immnd_init.h @@ -439,7 +439,7 @@ extern "C" { bool immModel_pbeNotWritable(IMMND_CB *cb); SaAisErrorT immModel_implIsFree(IMMND_CB *cb, - const SaImmOiImplementerNameT implName); + const IMMSV_OI_IMPLSET_REQ *req, SaUint32T *impl_id); SaAisErrorT immModel_resourceDisplay(IMMND_CB *cb, const struct ImmsvAdminOperationParam *reqparams, ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel