aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/utils
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-16 02:31:17 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-13 13:14:41 +0000
commit4c2d4ab5db5f5703d435e6a49639fca65a049778 (patch)
tree0bd360971fdd49b1bb8550d4d803aba31959977a /openbsc/src/utils
parente072da9d2e1ea7face8136fa90e6d9e9be70b997 (diff)
msgb talloc ctx: initialize in all main() scopes
Add msgb_talloc_ctx_init() call to many main() functions still lacking a msgb talloc context. Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1
Diffstat (limited to 'openbsc/src/utils')
-rw-r--r--openbsc/src/utils/bs11_config.c1
-rw-r--r--openbsc/src/utils/meas_udp2db.c2
-rw-r--r--openbsc/src/utils/meas_vis.c2
-rw-r--r--openbsc/src/utils/smpp_mirror.c2
4 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c
index 34209917b..7356b8204 100644
--- a/openbsc/src/utils/bs11_config.c
+++ b/openbsc/src/utils/bs11_config.c
@@ -891,6 +891,7 @@ int main(int argc, char **argv)
struct e1inp_line *line;
tall_bs11cfg_ctx = talloc_named_const(NULL, 0, "bs11-config");
+ msgb_talloc_ctx_init(tall_bs11cfg_ctx, 0);
osmo_init_logging(&log_info);
handle_options(argc, argv);
diff --git a/openbsc/src/utils/meas_udp2db.c b/openbsc/src/utils/meas_udp2db.c
index 4a07217ad..5032d0c3e 100644
--- a/openbsc/src/utils/meas_udp2db.c
+++ b/openbsc/src/utils/meas_udp2db.c
@@ -90,6 +90,8 @@ int main(int argc, char **argv)
char *db_fname;
int rc;
+ msgb_talloc_ctx_init(NULL, 0);
+
if (argc < 2) {
fprintf(stderr, "You have to specify the database file name\n");
exit(2);
diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c
index 4f7e632c3..061a7a4ce 100644
--- a/openbsc/src/utils/meas_vis.c
+++ b/openbsc/src/utils/meas_vis.c
@@ -264,6 +264,8 @@ int main(int argc, char **argv)
char *header[1];
char *title[1];
+ msgb_talloc_ctx_init(NULL, 0);
+
printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep));
printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas));
diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c
index 2f154db49..95df5f2a6 100644
--- a/openbsc/src/utils/smpp_mirror.c
+++ b/openbsc/src/utils/smpp_mirror.c
@@ -302,6 +302,8 @@ int main(int argc, char **argv)
int port = 0;
int rc;
+ msgb_talloc_ctx_init(NULL, 0);
+
memset(&esme, 0, sizeof(esme));
osmo_init_logging(&log_info);