aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-11-13 05:49:12 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2020-11-16 17:02:06 +0100
commitf07f05900086b2925159d61eaa42fd3589c9b5b6 (patch)
tree614028c87d6def0ca56e5bce6506173de9ecbf68
parent0a9720fedfdbd56738a597229552b2419a0968a0 (diff)
handover_test: drop secondary array of lchans
-rw-r--r--tests/handover/handover_test.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index db1a39a68..5b2f72820 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1874,8 +1874,6 @@ struct gsm_bts *bts_by_num_str(const char *num_str)
int main(int argc, char **argv)
{
char **test_case;
- struct gsm_lchan *lchan[256];
- int lchan_num = 0;
int i;
int algorithm;
int test_case_i;
@@ -2020,18 +2018,18 @@ int main(int argc, char **argv)
const char *bts_nr_str = test_case[1];
const char *tch_type = test_case[2];
const char *codec = test_case[3];
- fprintf(stderr, "- Creating mobile #%d at BTS %s on "
- "%s with %s codec\n", lchan_num, bts_nr_str, tch_type, codec);
- lchan[lchan_num] = create_lchan(bts_by_num_str(bts_nr_str),
+ struct gsm_lchan *lchan;
+ fprintf(stderr, "- Creating mobile at BTS %s on "
+ "%s with %s codec\n", bts_nr_str, tch_type, codec);
+ lchan = create_lchan(bts_by_num_str(bts_nr_str),
!strcmp(tch_type, "TCH/F"), codec);
- if (!lchan[lchan_num]) {
+ if (!lchan) {
printf("Failed to create lchan!\n");
return EXIT_FAILURE;
}
fprintf(stderr, " * New MS is at BTS %d TS %d\n",
- lchan[lchan_num]->ts->trx->bts->nr,
- lchan[lchan_num]->ts->nr);
- lchan_num++;
+ lchan->ts->trx->bts->nr,
+ lchan->ts->nr);
test_case += 4;
} else
if (!strcmp(*test_case, "set-ta")) {
@@ -2192,19 +2190,6 @@ int main(int argc, char **argv)
test_case += 1;
got_chan_req = 0;
got_ho_req = 0;
- /* switch lchan */
- for (i = 0; i < lchan_num; i++) {
- if (lchan[i] == ho_req_lchan) {
- fprintf(stderr, " * MS %d changes from "
- "BTS=%d TS=%d to BTS=%d "
- "TS=%d\n", i,
- lchan[i]->ts->trx->bts->nr,
- lchan[i]->ts->nr,
- chan_req_lchan->ts->trx->bts->nr,
- chan_req_lchan->ts->nr);
- lchan[i] = chan_req_lchan;
- }
- }
send_ho_complete(chan_req_lchan, true);
} else
if (!strcmp(*test_case, "ho-failed")) {
@@ -2287,13 +2272,6 @@ int main(int argc, char **argv)
}
}
- for (i = 0; i < lchan_num; i++) {
- struct gsm_subscriber_connection *conn = lchan[i]->conn;
- lchan[i]->conn = NULL;
- conn->lchan = NULL;
- osmo_fsm_inst_term(conn->fi, OSMO_FSM_TERM_REGULAR, NULL);
- }
-
fprintf(stderr, "--------------------\n");
printf("Test OK\n");