]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
s/SUBSTRINGS/SUBSTR/
[openldap] / servers / slapd / config.c
index 3a6312950d7b079001bf54e2fbed1786dab8a309..f5041fe0070dc9dca5c9761f122ab85e1cbb9a21 100644 (file)
@@ -8,9 +8,6 @@
 #include "portable.h"
 
 #include <stdio.h>
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
 
 #include <ac/string.h>
 #include <ac/ctype.h>
@@ -143,6 +140,27 @@ read_config( const char *fname )
                                return( 1 );
                        }
 
+               /* set thread concurrency */
+               } else if ( strcasecmp( cargv[0], "concurrency" ) == 0 ) {
+                       int c;
+                       if ( cargc < 2 ) {
+                               Debug( LDAP_DEBUG_ANY,
+           "%s: line %d: missing level in \"concurrency <level>\" line\n",
+                                   fname, lineno, 0 );
+                               return( 1 );
+                       }
+
+                       c = atoi( cargv[1] );
+
+                       if( c < 1 ) {
+                               Debug( LDAP_DEBUG_ANY,
+           "%s: line %d: invalid level (%d) in \"concurrency <level>\" line\n",
+                                   fname, lineno, c );
+                               return( 1 );
+                       }
+
+                       ldap_pvt_thread_set_concurrency( c );
+
                /* get pid file name */
                } else if ( strcasecmp( cargv[0], "pidfile" ) == 0 ) {
                        if ( cargc < 2 ) {
@@ -415,35 +433,6 @@ read_config( const char *fname )
                        vals[0]->bv_len = strlen( vals[0]->bv_val );
                        value_add( &default_referral, vals );
 
-               /* specify locale */
-               } else if ( strcasecmp( cargv[0], "locale" ) == 0 ) {
-#ifdef HAVE_LOCALE_H
-                       char *locale;
-                       if ( cargc < 2 ) {
-                               Debug( LDAP_DEBUG_ANY,
-       "%s: line %d: missing locale in \"locale <name | on | off>\" line\n",
-                                      fname, lineno, 0 );
-                               return( 1 );
-                       }
-
-                       locale = (strcasecmp(   cargv[1], "on"  ) == 0 ? ""
-                                 : strcasecmp( cargv[1], "off" ) == 0 ? "C"
-                                 : ch_strdup( cargv[1] )                    );
-
-                       if ( setlocale( LC_CTYPE, locale ) == 0 ) {
-                               Debug( LDAP_DEBUG_ANY,
-                                      (*locale
-                                       ? "%s: line %d: bad locale \"%s\"\n"
-                                       : "%s: line %d: bad locale\n"),
-                                      fname, lineno, locale );
-                               return( 1 );
-                       }
-#else
-                       Debug( LDAP_DEBUG_ANY,
-                              "%s: line %d: \"locale\" unsupported\n",
-                              fname, lineno, 0 );
-                       return( 1 );
-#endif
                /* specify an Object Identifier macro */
                } else if ( strcasecmp( cargv[0], "objectidentifier" ) == 0 ) {
                        parse_oidm( fname, lineno, cargc, cargv );