aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-05 19:22:38 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-05 19:22:38 +0100
commit8f5c405e19f9b53b5a25579d5c5949a66b391c5c (patch)
treed7b0474216f5f002149af2a26a6eaed6a3bb2975
parente990d6d49a694f2dfad5135088e5de871217f0af (diff)
omldummy: Allow OML dummies with multiple TRXlaforge/omldummy
So far we always assumed that every oml-dummy BTS has only a single TRX. Let's fix that. Change-Id: I27c08c6c2da248366980f081cdfdd838b166e7a6
-rw-r--r--src/osmo-bts-omldummy/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/osmo-bts-omldummy/main.c b/src/osmo-bts-omldummy/main.c
index b9334b1..627060d 100644
--- a/src/osmo-bts-omldummy/main.c
+++ b/src/osmo-bts-omldummy/main.c
@@ -13,8 +13,14 @@ int main(int argc, char **argv)
struct e1inp_line *line;
int rc, i;
+ if (argc < 4) {
+ fprintf(stderr, "Usage: osmo-bts-omldummy <dst_host> <site_id> <num_trx>\n");
+ exit(2);
+ }
+
char *dst_host = argv[1];
int site_id = atoi(argv[2]);
+ int num_trx = atoi(argv[3]);
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
msgb_talloc_ctx_init(tall_bts_ctx, 10*1024);
@@ -28,7 +34,7 @@ int main(int argc, char **argv)
bts->ip_access.bts_id = 0;
/* Additional TRXs */
- for (i = 1; i < 8; i++) {
+ for (i = 1; i < num_trx; i++) {
trx = gsm_bts_trx_alloc(bts);
if (!trx)
exit(1);