jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33614 )
Change subject: ASCI: Forward lchan activation states to VGCS FSM ......................................................................
ASCI: Forward lchan activation states to VGCS FSM
Change-Id: I757b562e02480c1a68446d91217910069f17d060 Related: OS#4852 --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 67 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/14/33614/1
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 816d4b5..99bdaf2 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -43,6 +43,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/bsc/bsc_stats.h> #include <osmocom/bsc/lchan.h> +#include <osmocom/bsc/vgcs_fsm.h>
static struct osmo_fsm lchan_fsm;
@@ -191,6 +192,23 @@ _osmo_fsm_inst_dispatch(for_conn->ho.fi, HO_EV_LCHAN_ERROR, lchan, file, line); break;
+ case ACTIVATE_FOR_VGCS_CHANNEL: + LOG_LCHAN(lchan, LOGL_NOTICE, "Signalling VGCS Assignment FSM of error (%s)\n", + lchan->last_error ? : "unknown error"); + if (!for_conn) { + LOG_LCHAN(lchan, LOGL_ERROR, + "lchan activation for VGCS Assignment failed, but activation request has no conn\n"); + break; + } + if (!for_conn->vgcs_chan.fi) { + LOG_LCHAN(lchan, LOGL_ERROR, + "lchan activation for VGCS Assignment failed, but conn has no ongoing" + " assignment procedure\n"); + break; + } + _osmo_fsm_inst_dispatch(for_conn->vgcs_chan.fi, VGCS_EV_LCHAN_ERROR, lchan, file, line); + break; + case ACTIVATE_FOR_VTY: LOG_LCHAN(lchan, LOGL_ERROR, "VTY user invoked lchan activation failed (%s)\n", lchan->last_error ? : "unknown error"); @@ -278,6 +296,22 @@ * we will try to roll back a modified RTP connection. */ break;
+ case ACTIVATE_FOR_VGCS_CHANNEL: + if (!lchan->conn) { + LOG_LCHAN(lchan, LOGL_ERROR, + "lchan activation for VGCS assignment succeeded, but lchan has no conn\n"); + lchan_release(lchan, false, true, RSL_ERR_EQUIPMENT_FAIL, NULL); + break; + } + if (!lchan->conn->vgcs_chan.fi) { + LOG_LCHAN(lchan, LOGL_ERROR, + "lchan Activation for VGCS assignment requested, but conn has no VGCS resource FSM.\n"); + lchan_release(lchan, false, true, RSL_ERR_EQUIPMENT_FAIL, NULL); + break; + } + osmo_fsm_inst_dispatch(lchan->conn->vgcs_chan.fi, VGCS_EV_LCHAN_ACTIVE, lchan); + break; + case ACTIVATE_FOR_MODE_MODIFY_RTP: lchan_on_mode_modify_success(lchan); break; @@ -412,6 +446,28 @@ } break;
+ case ACTIVATE_FOR_VGCS_CHANNEL: + if (!info->for_conn + || !info->for_conn->fi) { + LOG_LCHAN(lchan, LOGL_ERROR, "Activation requested, but no conn\n"); + goto abort; + } + if (!info->for_conn->vgcs_chan.fi) { + LOG_LCHAN(lchan, LOGL_ERROR, + "Activation for VGCS assignment requested, but conn has no VGCS resource FSM.\n"); + goto abort; + } + if (info->for_conn->vgcs_chan.new_lchan != lchan) { + LOG_LCHAN(lchan, LOGL_ERROR, + "Activation for VGCS assignment requested, but conn's VGCS assignment state does" + " not reflect this lchan to be activated (instead: %s)\n", + info->for_conn->vgcs_chan.new_lchan? + gsm_lchan_name(info->for_conn->vgcs_chan.new_lchan) + : "NULL"); + goto abort; + } + break; + default: break; } @@ -856,6 +912,7 @@ ho_ref = lchan->conn->ho.ho_ref; break; case ACTIVATE_FOR_ASSIGNMENT: + case ACTIVATE_FOR_VGCS_CHANNEL: default: act_type = RSL_ACT_INTRA_NORM_ASS; break;