aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-02-21 20:15:47 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-02-22 20:04:47 +0100
commit3a3b2207517eaa29dc51e971ee795017aa333047 (patch)
tree7e863111c1b66044fe517b14c3a710d1f48a784f /Transceiver52M
parentab22f4c421e088bbc6ebef151ee3231ffb68e778 (diff)
osmo-trx: Set up talloc ctx
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/osmo-trx.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 0562dcd..069d195 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -37,7 +37,9 @@
#include <Logger.h>
extern "C" {
+#include <osmocom/core/talloc.h>
#include <osmocom/core/application.h>
+#include <osmocom/core/msgb.h>
#include "convolve.h"
#include "convert.h"
}
@@ -90,6 +92,8 @@ struct trx_config {
volatile bool gshutdown = false;
+static void *tall_trx_ctx;
+
/* Setup configuration values
* Don't query the existence of the Log.Level because it's a
* mandatory value. That is, if it doesn't exist, the configuration
@@ -248,6 +252,14 @@ static void sig_handler(int signo)
fprintf(stdout, "shutting down\n");
gshutdown = true;
break;
+ case SIGABRT:
+ case SIGUSR1:
+ talloc_report(tall_trx_ctx, stderr);
+ talloc_report_full(tall_trx_ctx, stderr);
+ break;
+ case SIGUSR2:
+ talloc_report_full(tall_trx_ctx, stderr);
+ break;
default:
break;
}
@@ -486,6 +498,8 @@ int main(int argc, char *argv[])
RadioDevice::InterfaceType iface = RadioDevice::NORMAL;
struct trx_config config;
+ tall_trx_ctx = talloc_named_const(NULL, 0, "OsmoTRX");
+ msgb_talloc_ctx_init(tall_trx_ctx, 0);
setup_signal_handlers();
#ifdef HAVE_SSE3