]> git.sur5r.net Git - openldap/commitdiff
#6684 cleanup unneeded agi_mutex locks
authorHoward Chu <hyc@openldap.org>
Sat, 29 Jan 2011 21:23:22 +0000 (21:23 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 29 Jan 2011 21:23:22 +0000 (21:23 +0000)
contrib/slapd-modules/autogroup/autogroup.c

index f9414be3b8e6e3d17844ac1622ec303272f40caf..c42219b5c7684c90deafd2d75e8e9617f30d9304 100644 (file)
@@ -1588,8 +1588,6 @@ ag_cfgen( ConfigArgs *c )
 
        if ( c->op == SLAP_CONFIG_EMIT ) {
 
-               ldap_pvt_thread_mutex_lock( &agi->agi_mutex );
-
                switch( c->type ){
                case AG_ATTRSET:
                        for ( i = 0 ; agd ; i++, agd = agd->agd_next ) {
@@ -1624,8 +1622,6 @@ ag_cfgen( ConfigArgs *c )
                        return 1;
       }
 
-               ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );
-
                return rc;
 
        }else if ( c->op == LDAP_MOD_DELETE ) {
@@ -1635,8 +1631,6 @@ ag_cfgen( ConfigArgs *c )
                        autogroup_filter_t      *agf = age->age_filter,
                                                *agf_next;
 
-                       ldap_pvt_thread_mutex_lock( &agi->agi_mutex );
-
                        for ( agd_next = agd; agd_next; agd = agd_next ) {
                                agd_next = agd->agd_next;
 
@@ -1664,9 +1658,6 @@ ag_cfgen( ConfigArgs *c )
                                ch_free( age );
                        }
 
-                       ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );
-
-                       ldap_pvt_thread_mutex_destroy( &agi->agi_mutex );
                        ch_free( agi );
                        on->on_bi.bi_private = NULL;
 
@@ -1676,8 +1667,6 @@ ag_cfgen( ConfigArgs *c )
                        autogroup_filter_t      *agf,
                                                *agf_next;
 
-                       ldap_pvt_thread_mutex_lock( &agi->agi_mutex );
-
                        for ( i = 0, agdp = &agi->agi_def;
                                i < c->valx; i++ ) 
                        {
@@ -1722,7 +1711,6 @@ ag_cfgen( ConfigArgs *c )
 
                        ch_free( agd );
                        agd = agi->agi_def;
-                       ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );
 
                }
 
@@ -1784,8 +1772,6 @@ ag_cfgen( ConfigArgs *c )
                        return 1;
                }
 
-               ldap_pvt_thread_mutex_lock( &agi->agi_mutex );
-
                for ( agdp = &agi->agi_def ; *agdp ; agdp = &(*agdp)->agd_next ) {
                        /* The same URL attribute / member attribute pair
                        * cannot be repeated */
@@ -1815,7 +1801,6 @@ ag_cfgen( ConfigArgs *c )
                                        Debug( LDAP_DEBUG_ANY, "%s: %s.\n",
                                                c->log, c->cr_msg, 0 );
 
-                                       ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );                
                                        return 1;
                                }
                                agdp = &(*agdp)->agd_next;
@@ -1835,8 +1820,6 @@ ag_cfgen( ConfigArgs *c )
                (*agdp)->agd_member_ad = member_ad;
                (*agdp)->agd_next = agd_next;
 
-               ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );
-
                } break;
        
        case AG_MEMBER_OF_AD: {
@@ -1866,12 +1849,8 @@ ag_cfgen( ConfigArgs *c )
                        return 1;
                }
 
-               ldap_pvt_thread_mutex_lock( &agi->agi_mutex );
-
                agi->agi_memberof_ad = memberof_ad;
 
-               ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );
-
                } break;
 
        default: