aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-02 20:46:32 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-12 03:28:14 +0100
commit6997abb110777709e9c25d9f207ca675caef062f (patch)
tree0c917f5a0eb1b50c32d85d1a0cb3647c584bbaf8
parent531ebc3abfd6875d4839acf44546b2870f138fe8 (diff)
HO: If handover logic is used to do assignment, signal assignment result
-rw-r--r--include/osmocom/bsc/signal.h2
-rw-r--r--src/libbsc/bsc_api.c29
2 files changed, 31 insertions, 0 deletions
diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h
index 58d9acfa2..9c0d5a3de 100644
--- a/include/osmocom/bsc/signal.h
+++ b/include/osmocom/bsc/signal.h
@@ -85,6 +85,8 @@ enum signal_lchan {
S_LCHAN_ACTIVATE_NACK, /* 08.58 Channel Activate NACK */
S_LCHAN_HANDOVER_COMPL, /* 04.08 Handover Completed */
S_LCHAN_HANDOVER_FAIL, /* 04.08 Handover Failed */
+ S_LCHAN_ASSIGNMENT_COMPL, /* 04.08 Assignment Completed */
+ S_LCHAN_ASSIGNMENT_FAIL, /* 04.08 Assignment Failed */
S_LCHAN_HANDOVER_DETECT, /* 08.58 Handover Detect */
S_LCHAN_MEAS_REP, /* 08.58 Measurement Report */
};
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 5dd61aa13..20a296893 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -446,6 +446,21 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn,
struct gsm48_hdr *gh;
struct bsc_api *api = conn->network->bsc_api;
+ if (conn->ho_lchan) {
+ struct lchan_signal_data sig;
+ struct gsm48_hdr *gh = msgb_l3(msg);
+
+ DEBUGP(DRR, "ASSIGNMENT COMPLETE cause = %s\n",
+ rr_cause_name(gh->data[0]));
+
+ sig.lchan = msg->lchan;
+ sig.mr = NULL;
+ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_ASSIGNMENT_COMPL, &sig);
+ /* FIXME: release old channel */
+
+ return;
+ }
+
if (conn->secondary_lchan != msg->lchan) {
LOGP(DMSC, LOGL_ERROR, "Assignment Compl should occur on second lchan.\n");
return;
@@ -481,6 +496,20 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn,
uint8_t *rr_failure;
struct gsm48_hdr *gh;
+ if (conn->ho_lchan) {
+ struct lchan_signal_data sig;
+ struct gsm48_hdr *gh = msgb_l3(msg);
+
+ DEBUGP(DRR, "ASSIGNMENT FAILED cause = %s\n",
+ rr_cause_name(gh->data[0]));
+
+ sig.lchan = msg->lchan;
+ sig.mr = NULL;
+ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_ASSIGNMENT_FAIL, &sig);
+ /* FIXME: release allocated new channel */
+
+ return;
+ }
if (conn->lchan != msg->lchan) {
LOGP(DMSC, LOGL_ERROR, "Assignment failure should occur on primary lchan.\n");