[asterisk-dev] pthread_getspecific() in app_voicemail
Kevin Stewart
kevins at callplus.co.nz
Wed Apr 15 17:38:23 CDT 2009
the calls where added because before if you where checking voice mail
and someone called you or
you checked for voice mail while someone was leaving a voice mail app
voice mail would crash asterisk.
a cleaner solution would be to remove the calls and implement reference
counting or one imap connection per call
and dont ever try to cache them.
the patch did not fix my bug http://bugs.digium.com/view.php?id=14253
but at least it made it not crash once a day.
I seem to have a user that checks for voice mail too soon after they
miss a call.
Skavin
Mark Sirota wrote:
> 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
>
Kevin Stewart
VOIP Network Engineer
Direct:
+64 9 919 6120
Mobile:
021 879057
Fax:
+64 9 919 6121
This message and any attachments contain privileged and confidential information. If you are not the intended recipient of
this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited.
If you have received this message in error please notify the sender immediately via email and then destroy this message
and any attachments.
More information about the asterisk-dev
mailing list