omldummy: Allow OML dummies with multiple TRX

So far we always assumed that every oml-dummy BTS has only a single TRX.
Let's fix that.

Change-Id: I27c08c6c2da248366980f081cdfdd838b166e7a6
This commit is contained in:
Harald Welte 2018-02-05 19:22:38 +01:00
parent e990d6d49a
commit 8f5c405e19
1 changed files with 7 additions and 1 deletions

View File

@ -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);