INTERNAL unsigned32 incr_assoc_count_action_rtn ( pointer_t spc_struct, pointer_t event_param, pointer_t sm ) { rpc_cn_assoc_grp_t *assoc_grp; rpc_cn_sm_ctlblk_t *sm_p; RPC_CN_DBG_RTN_PRINTF(SERVER incr_assoc_count_action_rtn); assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; sm_p = (rpc_cn_sm_ctlblk_t *)sm; /* * Increment the group association count and add the association * to the group's association list. */ assoc_grp->grp_cur_assoc++; RPC_LIST_ADD_HEAD (assoc_grp->grp_assoc_list, (rpc_cn_assoc_t *) event_param, rpc_cn_assoc_p_t); sm_p->cur_state = RPC_C_ASSOC_GRP_ACTIVE; return( assoc_grp->grp_status); }
INTERNAL unsigned8 server_assoc_count_pred_rtn ( pointer_t spc_struct, pointer_t event_param ) { rpc_cn_assoc_grp_t *assoc_grp; RPC_CN_DBG_RTN_PRINTF(SERVER server_assoc_count_pred_rtn); assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; if (assoc_grp->grp_cur_assoc == 1) { if (server_refs_pred_rtn (spc_struct, event_param)) { return (2); /* assoc_grp->grp_refcnt != 0 */ } else { return (1); /* assoc_grp->grp_refcnt == 0 */ } } else { return (0); } }
INTERNAL unsigned32 decr_assoc_count_action_rtn ( pointer_t spc_struct, pointer_t event_param, pointer_t sm ) { rpc_cn_assoc_grp_t *assoc_grp; rpc_cn_assoc_t *assoc; rpc_cn_sm_ctlblk_t *sm_p; unsigned32 status; RPC_CN_DBG_RTN_PRINTF(SERVER decr_assoc_count_action_rtn); sm_p = (rpc_cn_sm_ctlblk_t *)sm; assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; assoc = (rpc_cn_assoc_t *) event_param; SERVER_ASSOC_COUNT_PRED( spc_struct, event_param, status); if (status == 2) { sm_p->cur_state = RPC_C_SERVER_ASSOC_GRP_CALL_WAIT; } else if (status == 1) { sm_p->cur_state = RPC_C_ASSOC_GRP_CLOSED; } else if (status == 0) { sm_p->cur_state = RPC_C_ASSOC_GRP_ACTIVE; } /* * Clear the group pointer in the association, decrement the * association count in the group and remove the association from * the group's association list. */ if ( sm_p->cur_state != RPC_C_SERVER_ASSOC_GRP_CALL_WAIT) RPC_CN_LOCAL_ID_CLEAR (assoc->assoc_grp_id); /* * Assoc_grp pointer receives a value within the SERVER_ASSOC_COUNT_PRED * macro. */ assoc_grp->grp_cur_assoc--; RPC_LIST_REMOVE (assoc_grp->grp_assoc_list, assoc); return(assoc_grp->grp_status); }
INTERNAL unsigned32 create_group_id_action_rtn ( pointer_t spc_struct, pointer_t event_param ATTRIBUTE_UNUSED, pointer_t sm ) { rpc_cn_assoc_grp_t *assoc_grp; rpc_cn_sm_ctlblk_t *sm_p; RPC_CN_DBG_RTN_PRINTF(SERVER create_group_id_action_rtn); assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; sm_p = (rpc_cn_sm_ctlblk_t *)sm; sm_p->cur_state = RPC_C_ASSOC_GRP_OPEN; return(assoc_grp->grp_status); }
INTERNAL unsigned32 decr_assoc_count_action_rtn ( pointer_t spc_struct, pointer_t event_param, pointer_t sm ) { rpc_cn_assoc_grp_t *assoc_grp; rpc_cn_assoc_t *assoc; rpc_cn_sm_ctlblk_t *sm_p; unsigned32 status; assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; sm_p = (rpc_cn_sm_ctlblk_t *)sm; ASSOC_COUNT_PRED(spc_struct, event_param, status); if (status == 1) /* (assoc_grp->grp_cur_assoc == 1) */ { sm_p->cur_state = RPC_C_ASSOC_GRP_CLOSED; } else /* (assoc_grp->grp_cur_assoc > 1) */ { /* * There is more than one association on the group. */ sm_p->cur_state = RPC_C_ASSOC_GRP_ACTIVE; } RPC_CN_DBG_RTN_PRINTF(CLIENT decr_assoc_count_action_rtn); assoc = (rpc_cn_assoc_t *) event_param; /* * Clear the group pointer in the association, decrement the * association count in the group and remove the association from * the group's association list. */ RPC_CN_LOCAL_ID_CLEAR (assoc->assoc_grp_id); assoc_grp->grp_cur_assoc--; RPC_LIST_REMOVE (assoc_grp->grp_assoc_list, assoc); return (assoc_grp->grp_status); }
INTERNAL unsigned32 rundown_handles_action_rtn ( pointer_t spc_struct, pointer_t event_param, pointer_t sm ) { rpc_cn_assoc_grp_t *assoc_grp; rpc_cn_sm_ctlblk_t *sm_p; rpc_cn_assoc_t *assoc; unsigned32 status; RPC_CN_DBG_RTN_PRINTF(SERVER rundown_handles_action_rtn); sm_p = (rpc_cn_sm_ctlblk_t *)sm; assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; assoc = (rpc_cn_assoc_t *) event_param; RPC_CN_LOCAL_ID_CLEAR (assoc->assoc_grp_id); SERVER_REFS_PRED(spc_struct, event_param, status); if (status == 0) { sm_p->cur_state = RPC_C_ASSOC_GRP_CLOSED; return(status); } /* * Call the rundown routine registered in the group passing it * the group id. * * Assoc_grp is assigned within the SERVER_REFS_PRED * macro. */ if (assoc_grp->grp_liveness_mntr != NULL) { (*assoc_grp->grp_liveness_mntr) ((rpc_client_handle_t) assoc_grp->grp_id.all); } sm_p->cur_state = RPC_C_ASSOC_GRP_CLOSED; return (assoc_grp->grp_status); }
INTERNAL unsigned8 server_refs_pred_rtn ( pointer_t spc_struct, pointer_t event_param ATTRIBUTE_UNUSED ) { rpc_cn_assoc_grp_t *assoc_grp; RPC_CN_DBG_RTN_PRINTF(SERVER server_refs_pred_rtn); assoc_grp = (rpc_cn_assoc_grp_t *) spc_struct; if (assoc_grp->grp_refcnt == 0) { return (0); } else { return (1); } }