aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-02 21:22:18 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-03 12:10:43 +0200
commitb5cfc6b019dbb31ceb52e8747c422bbaa0f60ac9 (patch)
treec0a8033aadbc820fea0f5db2eafc04dd16849e23 /tests
parentdd95eb64800945a564d45ccb8d74fcca6daf568e (diff)
ipaccess: Simplify handling of ipaccess e1line ts
Handle encoding specifics behind a macro to make code easier to understand and follow. Change-Id: Ibf251673bff95b7a0b066b19ef4dc6c0f94fff6b
Diffstat (limited to 'tests')
-rw-r--r--tests/e1inp_ipa_bsc_test.c8
-rw-r--r--tests/e1inp_ipa_bts_test.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/e1inp_ipa_bsc_test.c b/tests/e1inp_ipa_bsc_test.c
index 9064d0a..a7317f8 100644
--- a/tests/e1inp_ipa_bsc_test.c
+++ b/tests/e1inp_ipa_bsc_test.c
@@ -30,9 +30,9 @@ sign_link_up(void *dev, struct e1inp_line *line, enum e1inp_sign_type type)
switch(type) {
case E1INP_SIGN_OML:
LOGP(DBSCTEST, LOGL_NOTICE, "OML link up request received.\n");
- e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML - 1], line);
+ e1inp_ts_config_sign(e1inp_line_ipa_oml_ts(line), line);
sign_link = oml_sign_link =
- e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML - 1],
+ e1inp_sign_link_create(e1inp_line_ipa_oml_ts(line),
E1INP_SIGN_OML, NULL, 255, 0);
break;
case E1INP_SIGN_RSL:
@@ -45,10 +45,10 @@ sign_link_up(void *dev, struct e1inp_line *line, enum e1inp_sign_type type)
/* We have to use the same line that the OML link. */
oml_line = oml_sign_link->ts->line;
- e1inp_ts_config_sign(&oml_line->ts[E1INP_SIGN_RSL - 1],
+ e1inp_ts_config_sign(e1inp_line_ipa_rsl_ts(oml_line, 0),
oml_line);
sign_link = rsl_sign_link =
- e1inp_sign_link_create(&oml_line->ts[E1INP_SIGN_RSL - 1],
+ e1inp_sign_link_create(e1inp_line_ipa_rsl_ts(oml_line, 0),
E1INP_SIGN_RSL, NULL, 0, 0);
break;
default:
diff --git a/tests/e1inp_ipa_bts_test.c b/tests/e1inp_ipa_bts_test.c
index 48a5c59..10fe0e8 100644
--- a/tests/e1inp_ipa_bts_test.c
+++ b/tests/e1inp_ipa_bts_test.c
@@ -51,9 +51,9 @@ sign_link_up(void *unit, struct e1inp_line *line, enum e1inp_sign_type type)
case E1INP_SIGN_OML:
LOGP(DBTSTEST, LOGL_NOTICE, "OML link up request received.\n");
- e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML - 1], line);
+ e1inp_ts_config_sign(e1inp_line_ipa_oml_ts(line), line);
sign_link = oml_sign_link =
- e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML - 1],
+ e1inp_sign_link_create(e1inp_line_ipa_oml_ts(line),
E1INP_SIGN_OML, NULL, 255, 0);
if (!oml_sign_link) {
LOGP(DBTSTEST, LOGL_ERROR,
@@ -76,10 +76,10 @@ sign_link_up(void *unit, struct e1inp_line *line, enum e1inp_sign_type type)
case E1INP_SIGN_RSL:
LOGP(DBTSTEST, LOGL_NOTICE, "RSL link up request received.\n");
- e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL - 1], line);
+ e1inp_ts_config_sign(e1inp_line_ipa_rsl_ts(line, 0), line);
sign_link = rsl_sign_link =
- e1inp_sign_link_create(&line->ts[E1INP_SIGN_RSL - 1],
+ e1inp_sign_link_create(e1inp_line_ipa_rsl_ts(line, 0),
E1INP_SIGN_RSL, NULL, 0, 0);
if (!rsl_sign_link) {
LOGP(DBTSTEST, LOGL_ERROR,