Use PCU's talloc context to allocate libosmogb instances

This is usefull to identifiy memory leaks while using libosmogb.
This commit is contained in:
Andreas Eversberg 2013-01-16 13:49:00 +01:00
parent 0f4541b691
commit 71cce91a76
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@
#include <pcu_l1_if.h> #include <pcu_l1_if.h>
struct sgsn_instance *sgsn; struct sgsn_instance *sgsn;
void *tall_bsc_ctx; extern void *tall_pcu_ctx;
struct bssgp_bvc_ctx *bctx = NULL; struct bssgp_bvc_ctx *bctx = NULL;
struct gprs_nsvc *nsvc = NULL; struct gprs_nsvc *nsvc = NULL;
static int bvc_sig_reset = 0, bvc_reset = 0, bvc_unblocked = 0; static int bvc_sig_reset = 0, bvc_reset = 0, bvc_unblocked = 0;
@ -573,7 +573,7 @@ int gprs_bssgp_create(uint32_t sgsn_ip, uint16_t sgsn_port, uint16_t nsei,
if (bctx) if (bctx)
return 0; /* if already created, must return 0: no error */ return 0; /* if already created, must return 0: no error */
bssgp_nsi = gprs_ns_instantiate(&sgsn_ns_cb, NULL); bssgp_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_pcu_ctx);
if (!bssgp_nsi) { if (!bssgp_nsi) {
LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n");
return -EINVAL; return -EINVAL;