]> git.sur5r.net Git - openldap/commitdiff
back out fix to ITS#3932
authorPierangelo Masarati <ando@openldap.org>
Wed, 17 Aug 2005 08:32:47 +0000 (08:32 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 17 Aug 2005 08:32:47 +0000 (08:32 +0000)
libraries/librewrite/rewrite-int.h
libraries/librewrite/rule.c

index 4b5a60bee262ecabf8ba0e82f2adff61088af4f7..fb8dbf6ee47d7fd1c3fc3e544bd73bf7acadd44b 100644 (file)
@@ -206,10 +206,7 @@ struct rewrite_rule {
        char                           *lr_pattern;
        char                           *lr_subststring;
        char                           *lr_flagstring;
-#ifdef USE_REWRITE_LDAP_PVT_THREADS
-       ldap_pvt_thread_mutex_t         lr_mutex;
-#endif /* USE_REWRITE_LDAP_PVT_THREADS */
-       regex_t                         lr_regex;
+       regex_t                         lr_regex;
 
        /*
         * I was thinking about some kind of per-rule mutex, but there's
index 9be1d844cb91677d793a1c0c66f67ea22a3d2d53..84ff22b4175918c505e6dd3fad817dc12914d026 100644 (file)
@@ -346,14 +346,6 @@ rewrite_rule_compile(
                return REWRITE_ERR;
        }
        
-#ifdef USE_REWRITE_LDAP_PVT_THREADS
-        if ( ldap_pvt_thread_mutex_init( &rule->lr_mutex ) ) {
-               regfree( &rule->lr_regex );
-               free( rule );
-               return REWRITE_ERR;
-       }
-#endif /* USE_REWRITE_LDAP_PVT_THREADS */
-
        /*
         * Just to remember them ...
         */
@@ -427,13 +419,7 @@ recurse:;
        
        op->lo_num_passes++;
 
-#ifdef USE_REWRITE_LDAP_PVT_THREADS
-        ldap_pvt_thread_mutex_lock( &rule->lr_mutex );
-#endif /* USE_REWRITE_LDAP_PVT_THREADS */
        rc = regexec( &rule->lr_regex, string, nmatch, match, 0 );
-#ifdef USE_REWRITE_LDAP_PVT_THREADS
-        ldap_pvt_thread_mutex_unlock( &rule->lr_mutex );
-#endif /* USE_REWRITE_LDAP_PVT_THREADS */
        if ( rc != 0 ) {
                if ( *result == NULL && string != arg ) {
                        free( string );
@@ -503,9 +489,6 @@ rewrite_rule_destroy(
        }
 
        regfree( &rule->lr_regex );
-#ifdef USE_REWRITE_LDAP_PVT_THREADS
-        ldap_pvt_thread_mutex_destroy( &rule->lr_mutex );
-#endif /* USE_REWRITE_LDAP_PVT_THREADS */
 
        for ( action = rule->lr_action; action; ) {
                struct rewrite_action *curraction = action;