[prev in list] [next in list] [prev in thread] [next in thread]
List: asterisk-dev
Subject: [asterisk-dev] cdr_radius.c thread safety
From: Alex Massover <alex () jajah ! com>
Date: 2010-01-31 11:39:30
Message-ID: F5B5EF8F78C0BC4BB417E1DBB9D7F7D00BA112A999 () jjex01 ! jajah ! dublin
[Download RAW message or body]
Hello,
I'm trying to understand if there's thread safety problem with cdr_radius m=
odule. I'm pretty new to Asterisk internals, so please correct me if I misu=
nderstand something.
AFAIU, cdr_radius.c load_module() called once upon loading the module, and =
it exports radius_log() function. Each call opens a thread, so radius_log()=
can be called from different threads and should be thread-safe.
But the radiusclient-ng lib, the module uses, is neither thread-safe nor re=
entrant.
Is it a potential problem or I just miss something?
--
Best Regards,
Alex Massover
VoIP R&D TL
Jajah Inc.
This mail was sent via Mail-SeCure System.
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hello,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I’m trying to understand if there’s thread
safety problem with cdr_radius module. I’m pretty new to Asterisk
internals, so please correct me if I misunderstand something.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>AFAIU, cdr_radius.c load_module() called once upon loading
the module, and it exports radius_log() function. Each call opens a thread, so \
radius_log() can be called from different threads and should be \
thread-safe.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>But the radiusclient-ng lib, the module uses, is neither \
thread-safe nor reentrant.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Is it a potential problem or I just miss something?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>--<o:p></o:p></p>
<p class=MsoNormal><span \
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Best Regards,</span><span \
style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>
<p class=MsoNormal><span \
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Alex Massover</span><span \
style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>
<p class=MsoNormal><span \
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>VoIP R&D TL</span><span \
style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>
<p class=MsoNormal><span \
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Jajah \
Inc.</span><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<br><br>
This mail was sent via Mail-SeCure System.<br>
</body>
</html>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
--===============3345167381524798536==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic