diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-13 14:00:21 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-13 14:00:21 +0200 |
commit | e266bd48aca6f5b7831eb7c44e4773e9884d4c56 (patch) | |
tree | f32eb34adc36d64470076af07d41672e7147d7df /src/sysmo_sock.cpp | |
parent | b8695f290aa6b14917ea67eeefda245ffa2df26b (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.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysmo_sock.cpp b/src/sysmo_sock.cpp index 8d83ca20..390f3f69 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); |