aboutsummaryrefslogtreecommitdiffstats
path: root/src/openbts_sock.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-07-13 14:00:21 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-07-13 14:00:21 +0200
commite266bd48aca6f5b7831eb7c44e4773e9884d4c56 (patch)
treef32eb34adc36d64470076af07d41672e7147d7df /src/openbts_sock.cpp
parentb8695f290aa6b14917ea67eeefda245ffa2df26b (diff)
Adding signal handler to allow clean exit of PCU
The signal handler will end the main loop, so clean exit is performed. The allocated memory is dumped in order to detect memory leaks. All talloc functions use tall_pcu_ctx context instead of NULL, to track memory leaks.
Diffstat (limited to 'src/openbts_sock.cpp')
-rw-r--r--src/openbts_sock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openbts_sock.cpp b/src/openbts_sock.cpp
index cbf7adcc..1f1e9044 100644
--- a/src/openbts_sock.cpp
+++ b/src/openbts_sock.cpp
@@ -35,6 +35,8 @@ extern "C" {
#include <pcuif_proto.h>
}
+extern void *tall_pcu_ctx;
+
struct femtol1_hdl {
struct gsm_time gsm_time;
uint32_t hLayer1; /* handle to the L1 instance in the DSP */
@@ -142,7 +144,7 @@ int pcu_l1if_open()
int rc;
/* allocate new femtol1_handle */
- fl1h = talloc_zero(NULL, struct femtol1_hdl);
+ fl1h = talloc_zero(tall_pcu_ctx, struct femtol1_hdl);
INIT_LLIST_HEAD(&fl1h->wlc_list);
l1fh->fl1h = fl1h;