summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-28 18:36:17 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-28 18:36:17 +0100
commitefcf895bfcee006488d305b5344e49f87c6fd460 (patch)
tree6e8b7f0b5d6170942af2972b119f460deeb3e0a3 /modules
parentd9ecc198453a41cf92acee37b1696a057558190c (diff)
menc: make it re-entrant
Diffstat (limited to 'modules')
-rw-r--r--modules/dtls_srtp/dtls_srtp.c7
-rw-r--r--modules/libsrtp/srtp.c7
-rw-r--r--modules/srtp/srtp.c8
-rw-r--r--modules/zrtp/zrtp.c2
4 files changed, 14 insertions, 10 deletions
diff --git a/modules/dtls_srtp/dtls_srtp.c b/modules/dtls_srtp/dtls_srtp.c
index 42d5c01..b92ff06 100644
--- a/modules/dtls_srtp/dtls_srtp.c
+++ b/modules/dtls_srtp/dtls_srtp.c
@@ -452,6 +452,7 @@ static struct menc dtls_srtp2 = {
static int module_init(void)
{
+ struct list *mencl = baresip_mencl();
int err;
err = tls_alloc(&tls, TLS_METHOD_DTLSV1, NULL, NULL);
@@ -477,9 +478,9 @@ static int module_init(void)
return err;
}
- menc_register(&dtls_srtpf);
- menc_register(&dtls_srtp);
- menc_register(&dtls_srtp2);
+ menc_register(mencl, &dtls_srtpf);
+ menc_register(mencl, &dtls_srtp);
+ menc_register(mencl, &dtls_srtp2);
debug("DTLS-SRTP ready with profiles %s\n", srtp_profiles);
diff --git a/modules/libsrtp/srtp.c b/modules/libsrtp/srtp.c
index cb04c43..db05d64 100644
--- a/modules/libsrtp/srtp.c
+++ b/modules/libsrtp/srtp.c
@@ -431,6 +431,7 @@ static struct menc menc_srtp_mandf = {
static int mod_srtp_init(void)
{
+ struct list *mencl = baresip_mencl();
err_status_t err;
err = srtp_init();
@@ -440,9 +441,9 @@ static int mod_srtp_init(void)
return ENOSYS;
}
- menc_register(&menc_srtp_opt);
- menc_register(&menc_srtp_mand);
- menc_register(&menc_srtp_mandf);
+ menc_register(mencl, &menc_srtp_opt);
+ menc_register(mencl, &menc_srtp_mand);
+ menc_register(mencl, &menc_srtp_mandf);
return 0;
}
diff --git a/modules/srtp/srtp.c b/modules/srtp/srtp.c
index c0c9c36..4b2d56c 100644
--- a/modules/srtp/srtp.c
+++ b/modules/srtp/srtp.c
@@ -385,9 +385,11 @@ static struct menc menc_srtp_mandf = {
static int mod_srtp_init(void)
{
- menc_register(&menc_srtp_opt);
- menc_register(&menc_srtp_mand);
- menc_register(&menc_srtp_mandf);
+ struct list *mencl = baresip_mencl();
+
+ menc_register(mencl, &menc_srtp_opt);
+ menc_register(mencl, &menc_srtp_mand);
+ menc_register(mencl, &menc_srtp_mandf);
return 0;
}
diff --git a/modules/zrtp/zrtp.c b/modules/zrtp/zrtp.c
index c386a34..feb10a1 100644
--- a/modules/zrtp/zrtp.c
+++ b/modules/zrtp/zrtp.c
@@ -377,7 +377,7 @@ static int module_init(void)
return ENOSYS;
}
- menc_register(&menc_zrtp);
+ menc_register(baresip_mencl(), &menc_zrtp);
debug("zrtp: cache_file: %s\n",
zrtp_config.cache_file_cfg.cache_path);