[asterisk-commits] tilghman: branch 1.6.2 r195531 - in /branches/1.6.2: ./ apps/app_voicemail.c

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


Author: tilghman
Date: Tue May 19 15:19:15 2009
New Revision: 195531

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195531
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.2/   (props changed)
    branches/1.6.2/apps/app_voicemail.c

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

Modified: branches/1.6.2/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/apps/app_voicemail.c?view=diff&rev=195531&r1=195530&r2=195531
==============================================================================
--- branches/1.6.2/apps/app_voicemail.c (original)
+++ branches/1.6.2/apps/app_voicemail.c Tue May 19 15:19:15 2009
@@ -2571,6 +2571,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;
 	}
@@ -2598,6 +2599,7 @@
 
 	if (interactive) {
 		struct vm_state *vms;
+		pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
 		vms = pthread_getspecific(ts_vmstate.key);
 		return vms;
 	}
@@ -2633,6 +2635,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