aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/gsm_04_80_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-25 23:57:27 +0200
commit3206e7868be655fab93ed048d8df6de0d194c8a6 (patch)
treeb10f50ec2782339ea9dca42d2c2880eb7446f6a5 /src/osmo-bsc/gsm_04_80_utils.c
parentd4155871335780f8afb67af18b60e0f36d637dfb (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_80_utils.c')
-rw-r--r--src/osmo-bsc/gsm_04_80_utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/osmo-bsc/gsm_04_80_utils.c b/src/osmo-bsc/gsm_04_80_utils.c
index d67f3c568..8de1262e9 100644
--- a/src/osmo-bsc/gsm_04_80_utils.c
+++ b/src/osmo-bsc/gsm_04_80_utils.c
@@ -20,7 +20,7 @@
*/
#include <osmocom/gsm/gsm0480.h>
-#include <osmocom/bsc/bsc_api.h>
+#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
const char *text)
@@ -28,7 +28,8 @@ int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
struct msgb *msg = gsm0480_create_ussd_notify(level, text);
if (!msg)
return -1;
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn)
@@ -36,5 +37,6 @@ int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn)
struct msgb *msg = gsm0480_create_ussd_release_complete();
if (!msg)
return -1;
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}