[asterisk-commits] tilghman: branch 1.6.0 r195522 - in /branches/1.6.0: ./ apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 19 15:17:15 CDT 2009


Author: tilghman
Date: Tue May 19 15:17:10 2009
New Revision: 195522

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195522
Log:
Merged revisions 195521 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r195521 | tilghman | 2009-05-19 15:16:01 -0500 (Tue, 19 May 2009) | 14 lines
  
  Merged revisions 195520 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r195520 | tilghman | 2009-05-19 15:12:20 -0500 (Tue, 19 May 2009) | 7 lines
    
    Ensure thread keys are initialized before attempting to access them.
    (closes issue #14889)
     Reported by: jaroth
     Patches: 
           app_voicemail.c.patch uploaded by msirota (license 758)
     Tested by: msirota, BlargMaN
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_voicemail.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/apps/app_voicemail.c?view=diff&rev=195522&r1=195521&r2=195522
==============================================================================
--- branches/1.6.0/apps/app_voicemail.c (original)
+++ branches/1.6.0/apps/app_voicemail.c Tue May 19 15:17:10 2009
@@ -2149,6 +2149,7 @@
 {
 	struct vm_state *vms_p;
 
+	pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
 	if ((vms_p = pthread_getspecific(ts_vmstate.key)) && !strcmp(vms_p->imapuser, vmu->imapuser) && !strcmp(vms_p->username, vmu->mailbox)) {
 		return vms_p;
 	}
@@ -2175,6 +2176,7 @@
 
 	if (interactive) {
 		struct vm_state *vms;
+		pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
 		vms = pthread_getspecific(ts_vmstate.key);
 		return vms;
 	}
@@ -2209,6 +2211,7 @@
 
 	if (interactive) {
 		struct vm_state *vms;
+		pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
 		vms = pthread_getspecific(ts_vmstate.key);
 		return vms;
 	}




More information about the asterisk-commits mailing list