summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-02 20:46:32 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:44:33 +0200
commitc186375109757598414fbf5aace3276f76c58ffa (patch)
tree645ef944ed88c0a4dfb328671b6f0e5ef0044552
parent810b3e69629402f775f7759b33e394f1496ffda3 (diff)
HO: If handover logic is used to do assignment, signal assignment result
-rw-r--r--openbsc/include/openbsc/signal.h2
-rw-r--r--openbsc/src/libbsc/bsc_api.c29
2 files changed, 31 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 39319f1c9..02f32459c 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -97,6 +97,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/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index d8159eb4a..75bb3e100 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -437,6 +437,21 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn,
struct gsm48_hdr *gh;
struct bsc_api *api = conn->bts->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;
@@ -472,6 +487,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");