[Date Prev][Date Next]
How the backend knows it's being searched by syncprov?
- To: hyc@OpenLDAP.org
- Subject: How the backend knows it's being searched by syncprov?
- From: Pierangelo Masarati <email@example.com>
- Date: Sat, 27 Nov 2004 10:51:07 +0100
- Cc: openldap-devel@OpenLDAP.org
- References: <200411270755.iAR7t48t014001@cantor.openldap.org>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
Update of /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays
syncprov.c 1.24 -> 1.25
to use syncprov on top of back-sql, I need the backend to know it's
being searched for sync replication purposes when filtering for CSN. To
this end, I added a function slap_find_control_id() that returns the cid
for a given control oid; then, to determine if a search is performed for
syncrepl purposes, I'd use
slap_find_control_id( LDAP_CONTROL_SYNC, &sync_cid );
to grab the control's cid at initialization and, when requested to
filter for CSN, I'd test (op->o_controls[sync_cid]).
sync_cid could be a back-sql wide static variable, initialized to -1 and
grabbed, for instance, at bi_open(); or it could
even be global scoped, in case other backends need to be syncrepl-aware.
Do you think this is correct?
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497