From 53712434c0f7b6d34523540ad766aa27c2cc9501 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Mon, 26 Dec 2016 20:26:20 +0100 Subject: mnat: make it re-entrant --- modules/ice/ice.c | 3 ++- modules/natpmp/natpmp.c | 2 +- modules/pcp/pcp.c | 2 +- modules/stun/stun.c | 3 ++- modules/turn/turn.c | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/ice/ice.c b/modules/ice/ice.c index 2782069..4b3b1ac 100644 --- a/modules/ice/ice.c +++ b/modules/ice/ice.c @@ -689,7 +689,8 @@ static int module_init(void) } #endif - return mnat_register(&mnat, "ice", "+sip.ice", + return mnat_register(&mnat, baresip_mnatl(), + "ice", "+sip.ice", session_alloc, media_alloc, update); } diff --git a/modules/natpmp/natpmp.c b/modules/natpmp/natpmp.c index 9157612..45c7809 100644 --- a/modules/natpmp/natpmp.c +++ b/modules/natpmp/natpmp.c @@ -365,7 +365,7 @@ static int module_init(void) if (err) return err; - return mnat_register(&mnat, "natpmp", NULL, + return mnat_register(&mnat, baresip_mnatl(), "natpmp", NULL, session_alloc, media_alloc, NULL); } diff --git a/modules/pcp/pcp.c b/modules/pcp/pcp.c index 8803594..601e1be 100644 --- a/modules/pcp/pcp.c +++ b/modules/pcp/pcp.c @@ -346,7 +346,7 @@ static int module_init(void) } #endif - return mnat_register(&mnat, "pcp", NULL, + return mnat_register(&mnat, baresip_mnatl(), "pcp", NULL, session_alloc, media_alloc, NULL); } diff --git a/modules/stun/stun.c b/modules/stun/stun.c index d7edf94..48dffe7 100644 --- a/modules/stun/stun.c +++ b/modules/stun/stun.c @@ -230,7 +230,8 @@ static int media_alloc(struct mnat_media **mp, struct mnat_sess *sess, static int module_init(void) { - return mnat_register(&mnat, "stun", NULL, session_alloc, media_alloc, + return mnat_register(&mnat, baresip_mnatl(), + "stun", NULL, session_alloc, media_alloc, NULL); } diff --git a/modules/turn/turn.c b/modules/turn/turn.c index 41588e6..85fe84b 100644 --- a/modules/turn/turn.c +++ b/modules/turn/turn.c @@ -279,7 +279,8 @@ static int update(struct mnat_sess *sess) static int module_init(void) { - return mnat_register(&mnat, "turn", NULL, session_alloc, media_alloc, + return mnat_register(&mnat, baresip_mnatl(), + "turn", NULL, session_alloc, media_alloc, update); } -- cgit v1.2.3