aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-12-05 00:31:07 +0100
committerHarald Welte <laforge@osmocom.org>2020-12-05 13:49:37 +0100
commit78db244b42be1e2bf9726cb2d80150876c70dedc (patch)
treebd726b8a33fdf6d2249492774c1e0c24d4815888 /tests
parent0e1b791c818181f5b95aa55d71d6b2469fb95475 (diff)
gbproxy: convert bss_nses from llist_head to hashtable
For the common lookup-by-nsei, this should reduce the computational complexity significantly. Depends: libosmocore.git I8ef73a62fe9846ce45058eb21cf999dd3eed5741 Change-Id: Idbb6a362332bb6e3ce22102e7409ae80d0980f44
Diffstat (limited to 'tests')
-rw-r--r--tests/gbproxy/gbproxy_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c
index 553808964..bd5c8b531 100644
--- a/tests/gbproxy/gbproxy_test.c
+++ b/tests/gbproxy/gbproxy_test.c
@@ -120,7 +120,7 @@ static int dump_peers(FILE *stream, int indent, time_t now,
{
struct gbproxy_nse *nse;
struct gprs_ra_id raid;
- unsigned int i;
+ unsigned int i, _nse;
const struct rate_ctr_group_desc *desc;
int rc;
@@ -129,7 +129,7 @@ static int dump_peers(FILE *stream, int indent, time_t now,
return rc;
- llist_for_each_entry(nse, &cfg->bss_nses, list) {
+ hash_for_each(cfg->bss_nses, _nse, nse, list) {
struct gbproxy_bvc *peer;
llist_for_each_entry(peer, &nse->bvcs, list) {
struct gbproxy_link_info *link_info;