diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-06-07 12:15:26 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-06-07 12:36:42 +0200 |
commit | 54b4979de6ee0340694dc7cef85ddce9cf2e6aa6 (patch) | |
tree | a27038671f27f2628f8745bbdebf77fae1eb9b3b /src/input/ipaccess.c | |
parent | 177094b4c988f126ead93a5d3f25b4bedefa2d97 (diff) |
src: add libosmo_abis_init(void *ctx) to set the talloc context
This function is called during initialization, so we can set what's
the talloc context for the application and the library.
Diffstat (limited to 'src/input/ipaccess.c')
-rw-r--r-- | src/input/ipaccess.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 40d69b6..ef773ba 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -46,7 +46,7 @@ #define PRIV_OML 1 #define PRIV_RSL 2 -static void *tall_bsc_ctx; +static void *tall_ipa_ctx; /* data structure for one E1 interface with A-bis */ struct ia_e1_handle { @@ -378,7 +378,7 @@ static int rsl_listen_fd_cb(struct osmo_fd *listen_bfd, unsigned int what) if (!(what & BSC_FD_READ)) return 0; - bfd = talloc_zero(tall_bsc_ctx, struct osmo_fd); + bfd = talloc_zero(tall_ipa_ctx, struct osmo_fd); if (!bfd) return -ENOMEM; @@ -502,7 +502,9 @@ int ipaccess_setup(struct gsm_network *gsmnet) void e1inp_ipaccess_init(void) { - e1h = talloc_zero(tall_bsc_ctx, struct ia_e1_handle); + tall_ipa_ctx = talloc_named_const(libosmo_abis_ctx, 1, "ipa"); + + e1h = talloc_zero(tall_ipa_ctx, struct ia_e1_handle); if (!e1h) return; |