aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysmo_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/sysmo_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/sysmo_sock.cpp')
-rw-r--r--src/sysmo_sock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysmo_sock.cpp b/src/sysmo_sock.cpp
index 8d83ca2..390f3f6 100644
--- a/src/sysmo_sock.cpp
+++ b/src/sysmo_sock.cpp
@@ -37,6 +37,7 @@ extern "C" {
#include <gprs_bssgp_pcu.h>
#include <pcuif_proto.h>
+extern void *tall_pcu_ctx;
/*
* SYSMO-PCU socket functions
@@ -219,7 +220,7 @@ int pcu_l1if_open(void)
state = pcu_sock_state;
if (!state) {
- state = talloc_zero(NULL, struct pcu_sock_state);
+ state = talloc_zero(tall_pcu_ctx, struct pcu_sock_state);
if (!state)
return -ENOMEM;
INIT_LLIST_HEAD(&state->upqueue);