Browse Source

Ticket #348 - crash in ldap_initialize with multiple threads

https://fedorahosted.org/389/ticket/348
Resolves: Ticket #348
Bug Description: crash in ldap_initialize with multiple threads
Reviewed by: mreynolds (Thanks!)
Branch: master
Fix Description: ldclt was not calling PR_Init - needed in order to use
PR_CallOnce
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 9368250f2db4353cec7b489cb48c9c1f192f5c90)
(cherry picked from commit b72119fb54bb97998d96159f8c56831fd3742456)
Rich Megginson 13 years ago
parent
commit
e13b70b725
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ldap/servers/slapd/tools/ldclt/ldclt.c

+ 2 - 0
ldap/servers/slapd/tools/ldclt/ldclt.c

@@ -295,6 +295,7 @@ dd/mm/yy | Author	| Comments
 #include <sys/time.h>		/* struct rlimit, etc... */
 #endif
 
+#include "nspr.h"
 #include "port.h"		/* Portability definitions */	/*JLS 29-11-00*/
 #include "ldclt.h"		/* This tool's include file */
 #include "utils.h"		/* Utilities functions */	/*JLS 16-11-00*/
@@ -2652,6 +2653,7 @@ main (
   int	  found;	/* General purpose variable */		/*JLS 18-12-00*/
   char	  verStr[40];	/* Version string */			/*JLS 13-03-01*/
 
+  PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 0); /* for PR_CallOnce, others */
   /*
    * Build the argv list to keep track of it...
    * Print version.