summaryrefslogtreecommitdiffstats
path: root/openbsc/src/mncc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-28 18:37:07 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-28 18:37:07 +0200
commite211da49b98162cbf9653da7b80e30634f2b1637 (patch)
treeeb8d9954ccc3aac8436442e2c6bbb4a1564110e2 /openbsc/src/mncc.c
parente51b2eaa0b9b5bfaaa3adb3c0f7ae0e567d5be10 (diff)
parentf4e79f24fcdabdfd81be5d3842b4bf4c05465db4 (diff)
Merge branch 'master' into proxy
Diffstat (limited to 'openbsc/src/mncc.c')
-rw-r--r--openbsc/src/mncc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/openbsc/src/mncc.c b/openbsc/src/mncc.c
index b2dab07..8cd62f6 100644
--- a/openbsc/src/mncc.c
+++ b/openbsc/src/mncc.c
@@ -140,9 +140,6 @@ static int mncc_setup_ind(struct gsm_call *call, int msg_type,
if (call->remote_ref)
return 0;
- if (!tall_call_ctx)
- tall_call_ctx = talloc_named_const(tall_bsc_ctx, 1,
- "gsm_call");
/* create remote call */
if (!(remote = talloc(tall_call_ctx, struct gsm_call))) {
memset(&mncc, 0, sizeof(struct gsm_mncc));
@@ -306,9 +303,6 @@ int mncc_recv(struct gsm_network *net, int msg_type, void *arg)
if (!call) {
if (msg_type != MNCC_SETUP_IND)
return 0; /* drop */
- if (!tall_call_ctx)
- tall_call_ctx = talloc_named_const(tall_bsc_ctx, 1,
- "gsm_call");
/* create call */
if (!(call = talloc_zero(tall_call_ctx, struct gsm_call))) {
struct gsm_mncc rel;
@@ -395,3 +389,8 @@ int mncc_recv(struct gsm_network *net, int msg_type, void *arg)
return rc;
}
+
+static __attribute__((constructor)) void on_dso_load_trau_mncc(void)
+{
+ tall_call_ctx = talloc_named_const(tall_bsc_ctx, 1, "gsm_call");
+}