version 1.87, 2005/06/30 02:06:40
|
version 1.88, 2005/07/10 08:20:21
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.86 2005/06/30 01:42:51 hyc Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.87 2005/06/30 02:06:40 hyc Exp $ */ |
/* syncprov.c - syncrepl provider */ |
/* syncprov.c - syncrepl provider */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
Line 548 syncprov_findcsn( Operation *op, int mod
|
Line 548 syncprov_findcsn( Operation *op, int mod
|
SlapReply frs = { REP_RESULT }; |
SlapReply frs = { REP_RESULT }; |
char buf[LDAP_LUTIL_CSNSTR_BUFSIZE + STRLENOF("(entryCSN<=)")]; |
char buf[LDAP_LUTIL_CSNSTR_BUFSIZE + STRLENOF("(entryCSN<=)")]; |
char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE]; |
char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE]; |
struct berval fbuf, maxcsn; |
struct berval maxcsn; |
Filter cf, af; |
Filter cf, af; |
#ifdef LDAP_COMP_MATCH |
#ifdef LDAP_COMP_MATCH |
AttributeAssertion eq = { NULL, BER_BVNULL, NULL }; |
AttributeAssertion eq = { NULL, BER_BVNULL, NULL }; |
Line 572 syncprov_findcsn( Operation *op, int mod
|
Line 572 syncprov_findcsn( Operation *op, int mod
|
/* We want pure entries, not referrals */ |
/* We want pure entries, not referrals */ |
fop.o_managedsait = SLAP_CONTROL_CRITICAL; |
fop.o_managedsait = SLAP_CONTROL_CRITICAL; |
|
|
fbuf.bv_val = buf; |
|
cf.f_ava = &eq; |
cf.f_ava = &eq; |
cf.f_av_desc = slap_schema.si_ad_entryCSN; |
cf.f_av_desc = slap_schema.si_ad_entryCSN; |
cf.f_next = NULL; |
cf.f_next = NULL; |
Line 581 syncprov_findcsn( Operation *op, int mod
|
Line 580 syncprov_findcsn( Operation *op, int mod
|
fop.ors_limit = NULL; |
fop.ors_limit = NULL; |
fop.ors_tlimit = SLAP_NO_LIMIT; |
fop.ors_tlimit = SLAP_NO_LIMIT; |
fop.ors_filter = &cf; |
fop.ors_filter = &cf; |
fop.ors_filterstr = fbuf; |
fop.ors_filterstr.bv_val = buf; |
|
|
switch( mode ) { |
switch( mode ) { |
case FIND_MAXCSN: |
case FIND_MAXCSN: |
cf.f_choice = LDAP_FILTER_GE; |
cf.f_choice = LDAP_FILTER_GE; |
cf.f_av_value = si->si_ctxcsn; |
cf.f_av_value = si->si_ctxcsn; |
fbuf.bv_len = sprintf( buf, "(entryCSN>=%s)", |
fop.ors_filterstr.bv_len = sprintf( buf, "(entryCSN>=%s)", |
cf.f_av_value.bv_val ); |
cf.f_av_value.bv_val ); |
fop.ors_attrsonly = 0; |
fop.ors_attrsonly = 0; |
fop.ors_attrs = csn_anlist; |
fop.ors_attrs = csn_anlist; |
Line 601 syncprov_findcsn( Operation *op, int mod
|
Line 600 syncprov_findcsn( Operation *op, int mod
|
case FIND_CSN: |
case FIND_CSN: |
cf.f_choice = LDAP_FILTER_LE; |
cf.f_choice = LDAP_FILTER_LE; |
cf.f_av_value = srs->sr_state.ctxcsn; |
cf.f_av_value = srs->sr_state.ctxcsn; |
fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)", |
fop.ors_filterstr.bv_len = sprintf( buf, "(entryCSN<=%s)", |
cf.f_av_value.bv_val ); |
cf.f_av_value.bv_val ); |
fop.ors_attrsonly = 1; |
fop.ors_attrsonly = 1; |
fop.ors_attrs = slap_anlist_no_attrs; |
fop.ors_attrs = slap_anlist_no_attrs; |
Line 1075 syncprov_matchops( Operation *op, opcook
|
Line 1074 syncprov_matchops( Operation *op, opcook
|
} |
} |
} |
} |
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex ); |
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex ); |
done: |
|
if ( op->o_tag != LDAP_REQ_ADD && e ) { |
if ( op->o_tag != LDAP_REQ_ADD && e ) { |
op->o_bd->bd_info = (BackendInfo *)on->on_info; |
op->o_bd->bd_info = (BackendInfo *)on->on_info; |
be_entry_release_rw( op, e, 0 ); |
be_entry_release_rw( op, e, 0 ); |