aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/gsm_04_08_utils.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-06-16 17:20:13 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-06-26 23:57:11 +0200
commitaf6f6bc3d63a889b851a6ef3da98ffdcdfde2f28 (patch)
tree3210ccd17198a0e0ec717d6febcff3b77ead382f /src/osmo-bsc/gsm_04_08_utils.c
parentdd0fd8238386156459d68e0885fd2b5eb1dbe923 (diff)
fix / clarify rsl dtap cache
In certain situations like handover or assignment, DTAP must not go out via RSL directly but is cached to be submitted later. Make sure that all RSL DTAP sending adheres to this: gscon_submit_rsl_dtap() is the new "public" API to request an RSL DTAP to be sent. Depending on the gscon's state, this ends up in the cache or is sent directly. When caching, there is no way to tell whether sending will succeed or not, so semantically it does not make sense to even return a result code. Just return void. Change all "public" callers to gscon_submit_rsl_dtap(). Merge gsm0808_submit_dtap() and submit_dtap() guts to gsm0808_send_rsl_dtap(), static in bsc_subscr_conn_fsm.c: directly send DTAP, assume a conn->lchan to be present, or otherwise trigger a BSSMAP Clear Request. The static submit_dtap() becomes a thin convenience wrapper. Move ho_dtap_cache* functions to bsc_subscr_conn_fsm.c and rename to gscon_dtap_cache_* -- they are not only for handover, also for assignment. Function gsm0808_submit_dtap() m Introduce function gscon_submit_rsl_dtap() Change-Id: I6ffd7aa641c8905292c769400048c96aa0949585
Diffstat (limited to 'src/osmo-bsc/gsm_04_08_utils.c')
-rw-r--r--src/osmo-bsc/gsm_04_08_utils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/osmo-bsc/gsm_04_08_utils.c b/src/osmo-bsc/gsm_04_08_utils.c
index e9aeb550f..c54850081 100644
--- a/src/osmo-bsc/gsm_04_08_utils.c
+++ b/src/osmo-bsc/gsm_04_08_utils.c
@@ -34,7 +34,7 @@
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/paging.h>
#include <osmocom/bsc/signal.h>
-#include <osmocom/bsc/bsc_api.h>
+#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/gsm_04_08_utils.h>
/* should ip.access BTS use direct RTP streams between each other (1),
@@ -600,7 +600,8 @@ int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn)
DEBUGP(DMM, "-> CM SERVICE ACK\n");
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
/* 9.2.6 CM service reject */
@@ -617,7 +618,8 @@ int gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
DEBUGP(DMM, "-> CM SERVICE Reject cause: %d\n", value);
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
/* 9.1.29 RR Status */
@@ -644,7 +646,8 @@ int gsm48_tx_rr_status(struct gsm_subscriber_connection *conn, uint8_t cause)
struct msgb *msg = gsm48_create_rr_status(cause);
if (!msg)
return -1;
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value)