aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gbproxy
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-19 16:03:07 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-10-09 17:45:14 +0200
commitf8562e362b2cafe15a9b10be0f3b0d8be831c1ee (patch)
treec8b564ca8275efe5c20b045b22320907f87dff51 /openbsc/tests/gbproxy
parent91d2f8a7048bfed3519026bb2f821bbe417c0eec (diff)
gbproxy: Rename the field 'enabled_tllis' to 'logical_links'
This field in struct gbproxy_patch_state has involved and holds a list of all tracked logical links now. Thus the name is modified accordingly. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/gbproxy')
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index 36200f432..6ac1ae902 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -117,8 +117,8 @@ static int dump_peers(FILE *stream, int indent, time_t now,
}
fprintf(stream, "%*s TLLI-Cache: %d\n",
- indent, "", state->enabled_tllis_count);
- llist_for_each_entry(link_info, &state->enabled_tllis, list) {
+ indent, "", state->logical_link_count);
+ llist_for_each_entry(link_info, &state->logical_links, list) {
char mi_buf[200];
time_t age = now ? now - link_info->timestamp : 0;
int stored_msgs = 0;
@@ -3690,14 +3690,14 @@ static void test_gbproxy_tlli_expire(void)
cfg.tlli_max_len = 0;
cfg.tlli_max_age = 0;
peer = gbproxy_peer_alloc(&cfg, 20);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 0);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 0);
printf(" Add TLLI 1, IMSI 1\n");
link_info = register_tlli(peer, tlli1,
imsi1, ARRAY_SIZE(imsi1), now);
OSMO_ASSERT(link_info);
OSMO_ASSERT(link_info->tlli.current == tlli1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
/* replace the old entry */
printf(" Add TLLI 2, IMSI 1 (should replace TLLI 1)\n");
@@ -3705,7 +3705,7 @@ static void test_gbproxy_tlli_expire(void)
imsi1, ARRAY_SIZE(imsi1), now);
OSMO_ASSERT(link_info);
OSMO_ASSERT(link_info->tlli.current == tlli2);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
dump_peers(stdout, 2, now, &cfg);
@@ -3729,14 +3729,14 @@ static void test_gbproxy_tlli_expire(void)
cfg.tlli_max_len = 0;
cfg.tlli_max_age = 0;
peer = gbproxy_peer_alloc(&cfg, 20);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 0);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 0);
printf(" Add TLLI 1, IMSI 1\n");
link_info = register_tlli(peer, tlli1,
imsi1, ARRAY_SIZE(imsi1), now);
OSMO_ASSERT(link_info);
OSMO_ASSERT(link_info->tlli.current == tlli1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
/* try to replace the old entry */
printf(" Add TLLI 1, IMSI 2 (should replace IMSI 1)\n");
@@ -3744,7 +3744,7 @@ static void test_gbproxy_tlli_expire(void)
imsi2, ARRAY_SIZE(imsi2), now);
OSMO_ASSERT(link_info);
OSMO_ASSERT(link_info->tlli.current == tlli1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
dump_peers(stdout, 2, now, &cfg);
@@ -3769,20 +3769,20 @@ static void test_gbproxy_tlli_expire(void)
cfg.tlli_max_len = 1;
cfg.tlli_max_age = 0;
peer = gbproxy_peer_alloc(&cfg, 20);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 0);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 0);
printf(" Add TLLI 1, IMSI 1\n");
register_tlli(peer, tlli1, imsi1, ARRAY_SIZE(imsi1), now);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
/* replace the old entry */
printf(" Add TLLI 2, IMSI 2 (should replace IMSI 1)\n");
register_tlli(peer, tlli2, imsi2, ARRAY_SIZE(imsi2), now);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 2);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 2);
num_removed = gbproxy_remove_stale_link_infos(peer, time(NULL) + 2);
OSMO_ASSERT(num_removed == 1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
dump_peers(stdout, 2, now, &cfg);
@@ -3807,20 +3807,20 @@ static void test_gbproxy_tlli_expire(void)
cfg.tlli_max_len = 0;
cfg.tlli_max_age = 1;
peer = gbproxy_peer_alloc(&cfg, 20);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 0);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 0);
printf(" Add TLLI 1, IMSI 1 (should expire after timeout)\n");
register_tlli(peer, tlli1, imsi1, ARRAY_SIZE(imsi1), now);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
printf(" Add TLLI 2, IMSI 2 (should not expire after timeout)\n");
register_tlli(peer, tlli2, imsi2, ARRAY_SIZE(imsi2),
now + 1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 2);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 2);
num_removed = gbproxy_remove_stale_link_infos(peer, now + 2);
OSMO_ASSERT(num_removed == 1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
dump_peers(stdout, 2, now + 2, &cfg);
@@ -3845,28 +3845,28 @@ static void test_gbproxy_tlli_expire(void)
cfg.tlli_max_len = 0;
cfg.tlli_max_age = 1;
peer = gbproxy_peer_alloc(&cfg, 20);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 0);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 0);
printf(" Add TLLI 1, IMSI 1 (should expire)\n");
register_tlli(peer, tlli1, imsi1, ARRAY_SIZE(imsi1), now);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
printf(" Add TLLI 2, IMSI 2 (should expire after timeout)\n");
register_tlli(peer, tlli2, imsi2, ARRAY_SIZE(imsi2),
now + 1);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 2);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 2);
printf(" Add TLLI 3, IMSI 3 (should not expire after timeout)\n");
register_tlli(peer, tlli3, imsi3, ARRAY_SIZE(imsi3),
now + 2);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 3);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 3);
dump_peers(stdout, 2, now + 2, &cfg);
printf(" Remove stale TLLIs\n");
num_removed = gbproxy_remove_stale_link_infos(peer, now + 3);
OSMO_ASSERT(num_removed == 2);
- OSMO_ASSERT(peer->patch_state.enabled_tllis_count == 1);
+ OSMO_ASSERT(peer->patch_state.logical_link_count == 1);
dump_peers(stdout, 2, now + 2, &cfg);