aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libabis/input
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-01-14 23:18:59 +0100
committerHarald Welte <laforge@gnumonks.org>2011-03-04 13:44:12 +0100
commit26d7907b0229f982a65bd709c86b849eb6fef2ce (patch)
tree85516016e837efe8de3830436d9612bf48ebd88c /openbsc/src/libabis/input
parentfd355a3c6feccca5b774c0b3291a6066d0459067 (diff)
Implement the HSL SR1.0.1 protocol
It seems HSL has fixed most of their obvious issues in the SR1.0.1 release. However, this creates quite an incompatibility of the protocol, and we have to adapt accordingly
Diffstat (limited to 'openbsc/src/libabis/input')
-rw-r--r--openbsc/src/libabis/input/hsl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/libabis/input/hsl.c b/openbsc/src/libabis/input/hsl.c
index 12e974b34..360be32fc 100644
--- a/openbsc/src/libabis/input/hsl.c
+++ b/openbsc/src/libabis/input/hsl.c
@@ -228,7 +228,7 @@ static int handle_ts1_read(struct bsc_fd *bfd)
}
/* HSL proprietary RSL extension */
- if (hh->proto == 0 && msg->l2h[0] == 0x80) {
+ if (hh->proto == 0 && (msg->l2h[0] == 0x81 || msg->l2h[0] == 0x80)) {
ret = process_hsl_rsl(msg, line);
if (ret < 0) {
/* FIXME: close connection */
@@ -238,11 +238,11 @@ static int handle_ts1_read(struct bsc_fd *bfd)
return 0;
/* else: continue... */
}
-
+#ifdef HSL_SR_1_0
/* HSL for whatever reason chose to use 0x81 instead of 0x80 for FOM */
if (hh->proto == 255 && msg->l2h[0] == (ABIS_OM_MDISC_FOM | 0x01))
msg->l2h[0] = ABIS_OM_MDISC_FOM;
-
+#endif
link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
if (!link) {
LOGP(DINP, LOGL_ERROR, "no matching signalling link for "
@@ -312,9 +312,11 @@ static int handle_ts1_write(struct bsc_fd *bfd)
switch (sign_link->type) {
case E1INP_SIGN_OML:
proto = IPAC_PROTO_OML;
+#ifdef HSL_SR_1_0
/* HSL uses 0x81 for FOM for some reason */
if (msg->data[0] == ABIS_OM_MDISC_FOM)
msg->data[0] = ABIS_OM_MDISC_FOM | 0x01;
+#endif
break;
case E1INP_SIGN_RSL:
proto = IPAC_PROTO_RSL;