Hi, the mediaproxy-module in 3.3 branch establishes a single shared connection to the mediaproxy dispatcher socket before sip-router is forking sub-processes. This leads to race-conditions when multiple calls to use_mediaproxy() are made in parallel. The fix is simple, it seems it was just forgotten to restrict the opening of the dispatcher connection to subprocess initialization. Patch attached.
Regards, Emil Kroymann -- Emil Kroymann VoIP Services Engineer Email: [email protected] Tel: +49-30-203899885 Mobile: +49-176-38389303 ISACO GmbH Kurfürstenstraße 79 10787 Berlin Germany Amtsgericht Charlottenburg, HRB 112464B Geschäftsführer: Daniel Frommherz
diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c
index 0c9e2c5..4cb16c9 100644
--- a/modules/mediaproxy/mediaproxy.c
+++ b/modules/mediaproxy/mediaproxy.c
@@ -2113,7 +2113,7 @@ static int
child_init(int rank)
{
// initialize the connection to mediaproxy if needed
- if (!mediaproxy_disabled)
+ if (!mediaproxy_disabled && rank > PROC_MAIN)
mediaproxy_connect();
return 0;
signature.asc
Description: PGP signature
_______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
