[asterisk-dev] pthread_getspecific() in app_voicemail
Mark Sirota
msirota at isc.upenn.edu
Wed Apr 15 16:52:17 CDT 2009
A recent version introduced new code to app_voicemail, using
pthread_setspecific() and pthread_getspecific() to handle vm_state in some
circumstances.
This code has introduced a bug -- sometimes pthread_getspecific() is called
before pthread_setspecific(). It has been reported here in more detail:
<http://bugs.digium.com/view.php?id=14889>
I have a simple patch, involving setting a flag when calling
pthread_setspecific() and checking it before calling pthread_getspecific().
However, I have no idea if this is the best approach, because I don't know
why the pthread calls were introduced.
I can't find a report in the issue tracker related to this. Can anyone
tell me what problem the pthread code solves?
Thanks,
Mark
--
Mark Sirota, Associate Director, Network Engineering and Services
University of Pennsylvania, Information Systems and Computing
msirota at upenn.edu, +1 215 573 7214
More information about the asterisk-dev
mailing list