mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
noop commit for ITS#6758: Remove no-effect code.
Unused variable resets, unused SlapReply parameters to some functions.
This commit is contained in:
parent
cd6e9156e7
commit
98966abeef
@ -1689,8 +1689,7 @@ fe_acl_attribute(
|
|||||||
* to do no harm to entries */
|
* to do no harm to entries */
|
||||||
rs.sr_entry = e;
|
rs.sr_entry = e;
|
||||||
rc = backend_operational( op, &rs );
|
rc = backend_operational( op, &rs );
|
||||||
rs.sr_entry = NULL;
|
|
||||||
|
|
||||||
if ( rc == LDAP_SUCCESS ) {
|
if ( rc == LDAP_SUCCESS ) {
|
||||||
if ( rs.sr_operational_attrs ) {
|
if ( rs.sr_operational_attrs ) {
|
||||||
freeattr = 1;
|
freeattr = 1;
|
||||||
@ -1856,7 +1855,6 @@ backend_access(
|
|||||||
* to do no harm to entries */
|
* to do no harm to entries */
|
||||||
rs.sr_entry = e;
|
rs.sr_entry = e;
|
||||||
rc = backend_operational( op, &rs );
|
rc = backend_operational( op, &rs );
|
||||||
rs.sr_entry = NULL;
|
|
||||||
|
|
||||||
if ( rc == LDAP_SUCCESS ) {
|
if ( rc == LDAP_SUCCESS ) {
|
||||||
if ( rs.sr_operational_attrs ) {
|
if ( rs.sr_operational_attrs ) {
|
||||||
|
@ -541,7 +541,7 @@ constraint_uri_cb( Operation *op, SlapReply *rs )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
constraint_violation( constraint *c, struct berval *bv, Operation *op, SlapReply *rs)
|
constraint_violation( constraint *c, struct berval *bv, Operation *op )
|
||||||
{
|
{
|
||||||
if ((!c) || (!bv)) return LDAP_SUCCESS;
|
if ((!c) || (!bv)) return LDAP_SUCCESS;
|
||||||
|
|
||||||
@ -558,17 +558,12 @@ constraint_violation( constraint *c, struct berval *bv, Operation *op, SlapReply
|
|||||||
slap_callback cb;
|
slap_callback cb;
|
||||||
SlapReply nrs = { REP_RESULT };
|
SlapReply nrs = { REP_RESULT };
|
||||||
int i;
|
int i;
|
||||||
int found;
|
int found = 0;
|
||||||
int rc;
|
int rc;
|
||||||
size_t len;
|
size_t len;
|
||||||
struct berval filterstr;
|
struct berval filterstr;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
found = 0;
|
|
||||||
|
|
||||||
nrs.sr_entry = NULL;
|
|
||||||
nrs.sr_nentries = 0;
|
|
||||||
|
|
||||||
cb.sc_next = NULL;
|
cb.sc_next = NULL;
|
||||||
cb.sc_response = constraint_uri_cb;
|
cb.sc_response = constraint_uri_cb;
|
||||||
cb.sc_cleanup = NULL;
|
cb.sc_cleanup = NULL;
|
||||||
@ -663,7 +658,6 @@ constraint_violation( constraint *c, struct berval *bv, Operation *op, SlapReply
|
|||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
return LDAP_CONSTRAINT_VIOLATION; /* constraint violation */
|
return LDAP_CONSTRAINT_VIOLATION; /* constraint violation */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
@ -796,7 +790,7 @@ constraint_add( Operation *op, SlapReply *rs )
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; b[i].bv_val; i++ ) {
|
for ( i = 0; b[i].bv_val; i++ ) {
|
||||||
rc = constraint_violation( cp, &b[i], op, rs );
|
rc = constraint_violation( cp, &b[i], op );
|
||||||
if ( rc ) {
|
if ( rc ) {
|
||||||
goto add_violation;
|
goto add_violation;
|
||||||
}
|
}
|
||||||
@ -949,7 +943,7 @@ constraint_update( Operation *op, SlapReply *rs )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
for ( i = 0; b[i].bv_val; i++ ) {
|
for ( i = 0; b[i].bv_val; i++ ) {
|
||||||
rc = constraint_violation( cp, &b[i], op, rs );
|
rc = constraint_violation( cp, &b[i], op );
|
||||||
if ( rc ) {
|
if ( rc ) {
|
||||||
goto mod_violation;
|
goto mod_violation;
|
||||||
}
|
}
|
||||||
|
@ -323,10 +323,9 @@ memberof_isGroupOrMember( Operation *op, memberof_cbinfo_t *mci )
|
|||||||
/*
|
/*
|
||||||
* response callback that adds memberof values when a group is modified.
|
* response callback that adds memberof values when a group is modified.
|
||||||
*/
|
*/
|
||||||
static int
|
static void
|
||||||
memberof_value_modify(
|
memberof_value_modify(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
SlapReply *rs,
|
|
||||||
struct berval *ndn,
|
struct berval *ndn,
|
||||||
AttributeDescription *ad,
|
AttributeDescription *ad,
|
||||||
struct berval *old_dn,
|
struct berval *old_dn,
|
||||||
@ -456,8 +455,6 @@ memberof_value_modify(
|
|||||||
* add will fail; better split in two operations, although
|
* add will fail; better split in two operations, although
|
||||||
* not optimal in terms of performance. At least it would
|
* not optimal in terms of performance. At least it would
|
||||||
* move towards self-repairing capabilities. */
|
* move towards self-repairing capabilities. */
|
||||||
|
|
||||||
return rs2.sr_err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1194,7 +1191,7 @@ memberof_res_add( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
/* the modification is attempted
|
/* the modification is attempted
|
||||||
* with the original identity */
|
* with the original identity */
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&ma->a_nvals[ i ], mo->mo_ad_member,
|
&ma->a_nvals[ i ], mo->mo_ad_member,
|
||||||
NULL, NULL, &op->o_req_dn, &op->o_req_ndn );
|
NULL, NULL, &op->o_req_dn, &op->o_req_ndn );
|
||||||
}
|
}
|
||||||
@ -1209,7 +1206,7 @@ memberof_res_add( Operation *op, SlapReply *rs )
|
|||||||
a = attrs_find( a->a_next, mo->mo_ad_member ) )
|
a = attrs_find( a->a_next, mo->mo_ad_member ) )
|
||||||
{
|
{
|
||||||
for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&a->a_nvals[ i ],
|
&a->a_nvals[ i ],
|
||||||
mo->mo_ad_memberof,
|
mo->mo_ad_memberof,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
@ -1242,7 +1239,7 @@ memberof_res_delete( Operation *op, SlapReply *rs )
|
|||||||
vals = mci->member;
|
vals = mci->member;
|
||||||
if ( vals != NULL ) {
|
if ( vals != NULL ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_memberof,
|
&vals[ i ], mo->mo_ad_memberof,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
@ -1253,7 +1250,7 @@ memberof_res_delete( Operation *op, SlapReply *rs )
|
|||||||
vals = mci->memberof;
|
vals = mci->memberof;
|
||||||
if ( vals != NULL ) {
|
if ( vals != NULL ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_member,
|
&vals[ i ], mo->mo_ad_member,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
@ -1299,7 +1296,7 @@ memberof_res_modify( Operation *op, SlapReply *rs )
|
|||||||
case LDAP_MOD_DELETE:
|
case LDAP_MOD_DELETE:
|
||||||
if ( vals != NULL ) {
|
if ( vals != NULL ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_member,
|
&vals[ i ], mo->mo_ad_member,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
@ -1316,7 +1313,7 @@ memberof_res_modify( Operation *op, SlapReply *rs )
|
|||||||
op->o_bd->bd_info = (BackendInfo *)on;
|
op->o_bd->bd_info = (BackendInfo *)on;
|
||||||
if ( rc == LDAP_SUCCESS ) {
|
if ( rc == LDAP_SUCCESS ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_member,
|
&vals[ i ], mo->mo_ad_member,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
@ -1333,7 +1330,7 @@ memberof_res_modify( Operation *op, SlapReply *rs )
|
|||||||
assert( vals != NULL );
|
assert( vals != NULL );
|
||||||
|
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_member,
|
&vals[ i ], mo->mo_ad_member,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
&op->o_req_dn, &op->o_req_ndn );
|
&op->o_req_dn, &op->o_req_ndn );
|
||||||
@ -1357,7 +1354,7 @@ memberof_res_modify( Operation *op, SlapReply *rs )
|
|||||||
vals = ml->sml_nvalues;
|
vals = ml->sml_nvalues;
|
||||||
if ( vals != NULL ) {
|
if ( vals != NULL ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_memberof,
|
&vals[ i ], mo->mo_ad_memberof,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
@ -1372,7 +1369,7 @@ memberof_res_modify( Operation *op, SlapReply *rs )
|
|||||||
/* delete all ... */
|
/* delete all ... */
|
||||||
if ( vals != NULL ) {
|
if ( vals != NULL ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_memberof,
|
&vals[ i ], mo->mo_ad_memberof,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
NULL, NULL );
|
NULL, NULL );
|
||||||
@ -1388,7 +1385,7 @@ memberof_res_modify( Operation *op, SlapReply *rs )
|
|||||||
assert( ml->sml_nvalues != NULL );
|
assert( ml->sml_nvalues != NULL );
|
||||||
vals = ml->sml_nvalues;
|
vals = ml->sml_nvalues;
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_memberof,
|
&vals[ i ], mo->mo_ad_memberof,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
&op->o_req_dn, &op->o_req_ndn );
|
&op->o_req_dn, &op->o_req_ndn );
|
||||||
@ -1469,7 +1466,7 @@ memberof_res_modrdn( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
if ( rc == LDAP_SUCCESS ) {
|
if ( rc == LDAP_SUCCESS ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_memberof,
|
&vals[ i ], mo->mo_ad_memberof,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
&newDN, &newNDN );
|
&newDN, &newNDN );
|
||||||
@ -1486,7 +1483,7 @@ memberof_res_modrdn( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
if ( rc == LDAP_SUCCESS ) {
|
if ( rc == LDAP_SUCCESS ) {
|
||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
(void)memberof_value_modify( op, rs,
|
memberof_value_modify( op,
|
||||||
&vals[ i ], mo->mo_ad_member,
|
&vals[ i ], mo->mo_ad_member,
|
||||||
&op->o_req_dn, &op->o_req_ndn,
|
&op->o_req_dn, &op->o_req_ndn,
|
||||||
&newDN, &newNDN );
|
&newDN, &newNDN );
|
||||||
|
@ -346,7 +346,6 @@ add_query(
|
|||||||
static int
|
static int
|
||||||
remove_query_data(
|
remove_query_data(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
SlapReply *rs,
|
|
||||||
struct berval *query_uuid );
|
struct berval *query_uuid );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -752,11 +751,10 @@ url2query(
|
|||||||
/* ignore expired queries */
|
/* ignore expired queries */
|
||||||
if ( expiry_time <= slap_get_time()) {
|
if ( expiry_time <= slap_get_time()) {
|
||||||
Operation op2 = *op;
|
Operation op2 = *op;
|
||||||
SlapReply rs2 = { 0 };
|
|
||||||
|
|
||||||
memset( &op2.oq_search, 0, sizeof( op2.oq_search ) );
|
memset( &op2.oq_search, 0, sizeof( op2.oq_search ) );
|
||||||
|
|
||||||
(void)remove_query_data( &op2, &rs2, &uuid );
|
(void)remove_query_data( &op2, &uuid );
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
|
||||||
@ -1748,7 +1746,6 @@ remove_func (
|
|||||||
static int
|
static int
|
||||||
remove_query_data(
|
remove_query_data(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
SlapReply *rs,
|
|
||||||
struct berval *query_uuid )
|
struct berval *query_uuid )
|
||||||
{
|
{
|
||||||
struct query_info *qi, *qnext;
|
struct query_info *qi, *qnext;
|
||||||
@ -1759,8 +1756,6 @@ remove_query_data(
|
|||||||
slap_callback cb = { NULL, remove_func, NULL, NULL };
|
slap_callback cb = { NULL, remove_func, NULL, NULL };
|
||||||
int deleted = 0;
|
int deleted = 0;
|
||||||
|
|
||||||
sreply.sr_entry = NULL;
|
|
||||||
sreply.sr_nentries = 0;
|
|
||||||
op->ors_filterstr.bv_len = snprintf(filter_str, sizeof(filter_str),
|
op->ors_filterstr.bv_len = snprintf(filter_str, sizeof(filter_str),
|
||||||
"(%s=%s)", ad_queryId->ad_cname.bv_val, query_uuid->bv_val);
|
"(%s=%s)", ad_queryId->ad_cname.bv_val, query_uuid->bv_val);
|
||||||
filter.f_ava = &ava;
|
filter.f_ava = &ava;
|
||||||
@ -1971,7 +1966,6 @@ struct search_info {
|
|||||||
static void
|
static void
|
||||||
remove_query_and_data(
|
remove_query_and_data(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
SlapReply *rs,
|
|
||||||
cache_manager *cm,
|
cache_manager *cm,
|
||||||
struct berval *uuid )
|
struct berval *uuid )
|
||||||
{
|
{
|
||||||
@ -1984,7 +1978,7 @@ remove_query_and_data(
|
|||||||
Debug( pcache_debug,
|
Debug( pcache_debug,
|
||||||
"Removing query UUID %s\n",
|
"Removing query UUID %s\n",
|
||||||
uuid->bv_val, 0, 0 );
|
uuid->bv_val, 0, 0 );
|
||||||
return_val = remove_query_data( op, rs, uuid );
|
return_val = remove_query_data( op, uuid );
|
||||||
Debug( pcache_debug,
|
Debug( pcache_debug,
|
||||||
"QUERY REMOVED, SIZE=%d\n",
|
"QUERY REMOVED, SIZE=%d\n",
|
||||||
return_val, 0, 0);
|
return_val, 0, 0);
|
||||||
@ -2122,7 +2116,7 @@ pcache_remove_entries_from_cache(
|
|||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
struct berval val = vals[ i ];
|
struct berval val = vals[ i ];
|
||||||
|
|
||||||
remove_query_and_data( op, &rs, cm, &val );
|
remove_query_and_data( op, cm, &val );
|
||||||
|
|
||||||
if ( !BER_BVISNULL( &val ) && val.bv_val != vals[ i ].bv_val ) {
|
if ( !BER_BVISNULL( &val ) && val.bv_val != vals[ i ].bv_val ) {
|
||||||
ch_free( val.bv_val );
|
ch_free( val.bv_val );
|
||||||
@ -2147,12 +2141,11 @@ pcache_remove_query_from_cache(
|
|||||||
struct berval *queryid )
|
struct berval *queryid )
|
||||||
{
|
{
|
||||||
Operation op2 = *op;
|
Operation op2 = *op;
|
||||||
SlapReply rs2 = { 0 };
|
|
||||||
|
|
||||||
op2.o_bd = &cm->db;
|
op2.o_bd = &cm->db;
|
||||||
|
|
||||||
/* remove the selected query */
|
/* remove the selected query */
|
||||||
remove_query_and_data( &op2, &rs2, cm, queryid );
|
remove_query_and_data( &op2, cm, queryid );
|
||||||
|
|
||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -2243,7 +2236,7 @@ pcache_remove_entry_queries_from_cache(
|
|||||||
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
for ( i = 0; !BER_BVISNULL( &vals[ i ] ); i++ ) {
|
||||||
struct berval val = vals[ i ];
|
struct berval val = vals[ i ];
|
||||||
|
|
||||||
remove_query_and_data( op, &rs, cm, &val );
|
remove_query_and_data( op, cm, &val );
|
||||||
|
|
||||||
if ( !BER_BVISNULL( &val ) && val.bv_val != vals[ i ].bv_val ) {
|
if ( !BER_BVISNULL( &val ) && val.bv_val != vals[ i ].bv_val ) {
|
||||||
ch_free( val.bv_val );
|
ch_free( val.bv_val );
|
||||||
@ -2259,7 +2252,6 @@ pcache_remove_entry_queries_from_cache(
|
|||||||
static int
|
static int
|
||||||
cache_entries(
|
cache_entries(
|
||||||
Operation *op,
|
Operation *op,
|
||||||
SlapReply *rs,
|
|
||||||
struct berval *query_uuid )
|
struct berval *query_uuid )
|
||||||
{
|
{
|
||||||
struct search_info *si = op->o_callback->sc_private;
|
struct search_info *si = op->o_callback->sc_private;
|
||||||
@ -2291,7 +2283,7 @@ cache_entries(
|
|||||||
e->e_private = NULL;
|
e->e_private = NULL;
|
||||||
while ( cm->cur_entries > (cm->max_entries) ) {
|
while ( cm->cur_entries > (cm->max_entries) ) {
|
||||||
BER_BVZERO( &crp_uuid );
|
BER_BVZERO( &crp_uuid );
|
||||||
remove_query_and_data( op_tmp, rs, cm, &crp_uuid );
|
remove_query_and_data( op_tmp, cm, &crp_uuid );
|
||||||
}
|
}
|
||||||
|
|
||||||
return_val = merge_entry(op_tmp, e, 0, query_uuid);
|
return_val = merge_entry(op_tmp, e, 0, query_uuid);
|
||||||
@ -2399,7 +2391,7 @@ over:;
|
|||||||
if ( qc != NULL ) {
|
if ( qc != NULL ) {
|
||||||
switch ( si->caching_reason ) {
|
switch ( si->caching_reason ) {
|
||||||
case PC_POSITIVE:
|
case PC_POSITIVE:
|
||||||
cache_entries( op, rs, &qc->q_uuid );
|
cache_entries( op, &qc->q_uuid );
|
||||||
if ( si->pbi )
|
if ( si->pbi )
|
||||||
si->pbi->bi_cq = qc;
|
si->pbi->bi_cq = qc;
|
||||||
break;
|
break;
|
||||||
@ -3521,7 +3513,7 @@ consistency_check(
|
|||||||
if ( BER_BVISNULL( &query->q_uuid ))
|
if ( BER_BVISNULL( &query->q_uuid ))
|
||||||
return_val = 0;
|
return_val = 0;
|
||||||
else
|
else
|
||||||
return_val = remove_query_data(op, &rs, &query->q_uuid);
|
return_val = remove_query_data(op, &query->q_uuid);
|
||||||
Debug( pcache_debug, "STALE QUERY REMOVED, SIZE=%d\n",
|
Debug( pcache_debug, "STALE QUERY REMOVED, SIZE=%d\n",
|
||||||
return_val, 0, 0 );
|
return_val, 0, 0 );
|
||||||
ldap_pvt_thread_mutex_lock(&cm->cache_mutex);
|
ldap_pvt_thread_mutex_lock(&cm->cache_mutex);
|
||||||
|
@ -172,7 +172,7 @@ rwm_op_cleanup( Operation *op, SlapReply *rs )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static rwm_op_cb *
|
static rwm_op_cb *
|
||||||
rwm_callback_get( Operation *op, SlapReply *rs )
|
rwm_callback_get( Operation *op )
|
||||||
{
|
{
|
||||||
rwm_op_cb *roc;
|
rwm_op_cb *roc;
|
||||||
|
|
||||||
@ -270,7 +270,7 @@ rwm_op_add( Operation *op, SlapReply *rs )
|
|||||||
char *olddn = op->o_req_dn.bv_val;
|
char *olddn = op->o_req_dn.bv_val;
|
||||||
int isupdate;
|
int isupdate;
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "addDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "addDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
@ -413,7 +413,7 @@ rwm_op_bind( Operation *op, SlapReply *rs )
|
|||||||
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
|
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "bindDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "bindDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
@ -449,7 +449,7 @@ rwm_op_compare( Operation *op, SlapReply *rs )
|
|||||||
int rc;
|
int rc;
|
||||||
struct berval mapped_vals[2] = { BER_BVNULL, BER_BVNULL };
|
struct berval mapped_vals[2] = { BER_BVNULL, BER_BVNULL };
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "compareDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "compareDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
@ -534,7 +534,7 @@ rwm_op_delete( Operation *op, SlapReply *rs )
|
|||||||
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
|
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "deleteDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "deleteDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
@ -559,7 +559,7 @@ rwm_op_modify( Operation *op, SlapReply *rs )
|
|||||||
Modifications **mlp;
|
Modifications **mlp;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "modifyDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "modifyDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
@ -722,7 +722,7 @@ rwm_op_modrdn( Operation *op, SlapReply *rs )
|
|||||||
int rc;
|
int rc;
|
||||||
dncookie dc;
|
dncookie dc;
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
if ( op->orr_newSup ) {
|
if ( op->orr_newSup ) {
|
||||||
struct berval nnewSup = BER_BVNULL;
|
struct berval nnewSup = BER_BVNULL;
|
||||||
@ -941,7 +941,7 @@ rwm_op_search( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
char *text = NULL;
|
char *text = NULL;
|
||||||
|
|
||||||
rwm_op_cb *roc = rwm_callback_get( op, rs );
|
rwm_op_cb *roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rewrite_session_var_set( rwmap->rwm_rw, op->o_conn,
|
rc = rewrite_session_var_set( rwmap->rwm_rw, op->o_conn,
|
||||||
"searchFilter", op->ors_filterstr.bv_val );
|
"searchFilter", op->ors_filterstr.bv_val );
|
||||||
@ -1060,7 +1060,7 @@ rwm_exop_passwd( Operation *op, SlapReply *rs )
|
|||||||
ber_dupbv_x( &op->o_req_ndn, &op->o_ndn, op->o_tmpmemctx );
|
ber_dupbv_x( &op->o_req_ndn, &op->o_ndn, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
|
|
||||||
roc = rwm_callback_get( op, rs );
|
roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "extendedDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "extendedDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
@ -1132,7 +1132,7 @@ rwm_extended( Operation *op, SlapReply *rs )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
roc = rwm_callback_get( op, rs );
|
roc = rwm_callback_get( op );
|
||||||
|
|
||||||
rc = rwm_op_dn_massage( op, rs, "extendedDN", &roc->ros );
|
rc = rwm_op_dn_massage( op, rs, "extendedDN", &roc->ros );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
|
@ -1418,7 +1418,7 @@ syncprov_op_cleanup( Operation *op, SlapReply *rs )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
syncprov_checkpoint( Operation *op, SlapReply *rs, slap_overinst *on )
|
syncprov_checkpoint( Operation *op, slap_overinst *on )
|
||||||
{
|
{
|
||||||
syncprov_info_t *si = (syncprov_info_t *)on->on_bi.bi_private;
|
syncprov_info_t *si = (syncprov_info_t *)on->on_bi.bi_private;
|
||||||
Modifications mod;
|
Modifications mod;
|
||||||
@ -1893,7 +1893,7 @@ syncprov_op_response( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
if ( do_check ) {
|
if ( do_check ) {
|
||||||
ldap_pvt_thread_rdwr_rlock( &si->si_csn_rwlock );
|
ldap_pvt_thread_rdwr_rlock( &si->si_csn_rwlock );
|
||||||
syncprov_checkpoint( op, rs, on );
|
syncprov_checkpoint( op, on );
|
||||||
ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock );
|
ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3085,7 +3085,6 @@ syncprov_db_close(
|
|||||||
Connection conn = {0};
|
Connection conn = {0};
|
||||||
OperationBuffer opbuf;
|
OperationBuffer opbuf;
|
||||||
Operation *op;
|
Operation *op;
|
||||||
SlapReply rs = {REP_RESULT};
|
|
||||||
void *thrctx;
|
void *thrctx;
|
||||||
|
|
||||||
thrctx = ldap_pvt_thread_pool_context();
|
thrctx = ldap_pvt_thread_pool_context();
|
||||||
@ -3094,7 +3093,7 @@ syncprov_db_close(
|
|||||||
op->o_bd = be;
|
op->o_bd = be;
|
||||||
op->o_dn = be->be_rootdn;
|
op->o_dn = be->be_rootdn;
|
||||||
op->o_ndn = be->be_rootndn;
|
op->o_ndn = be->be_rootndn;
|
||||||
syncprov_checkpoint( op, &rs, on );
|
syncprov_checkpoint( op, on );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SLAP_CONFIG_DELETE
|
#ifdef SLAP_CONFIG_DELETE
|
||||||
|
Loading…
Reference in New Issue
Block a user