Commit 707d2a92 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#8966 - Remove DO_DSEE ifdef Remove ifdef for DO_DSEE as it's required to...

ITS#8966 - Remove DO_DSEE ifdef Remove ifdef for DO_DSEE as it's required to be defined for syncrepl.c to compile
parent 6b81910f
...@@ -50,16 +50,10 @@ static struct berval msad_addval = BER_BVC("range=1-1"); ...@@ -50,16 +50,10 @@ static struct berval msad_addval = BER_BVC("range=1-1");
static struct berval msad_delval = BER_BVC("range=0-0"); static struct berval msad_delval = BER_BVC("range=0-0");
#endif #endif
#ifdef LDAP_DEVEL
#define DO_DSEE
#endif
#ifdef DO_DSEE
static AttributeDescription *sy_ad_nsUniqueId; static AttributeDescription *sy_ad_nsUniqueId;
static AttributeDescription *sy_ad_dseeLastChange; static AttributeDescription *sy_ad_dseeLastChange;
#define DSEE_SYNC_ADD 0x20 #define DSEE_SYNC_ADD 0x20
#endif
#define UUIDLEN 16 #define UUIDLEN 16
...@@ -156,10 +150,8 @@ typedef struct syncinfo_s { ...@@ -156,10 +150,8 @@ typedef struct syncinfo_s {
#ifdef LDAP_CONTROL_X_DIRSYNC #ifdef LDAP_CONTROL_X_DIRSYNC
struct berval si_dirSyncCookie; struct berval si_dirSyncCookie;
#endif #endif
#ifdef DO_DSEE
unsigned long si_prevchange;; unsigned long si_prevchange;;
unsigned long si_lastchange; unsigned long si_lastchange;
#endif
ldap_pvt_thread_mutex_t si_mutex; ldap_pvt_thread_mutex_t si_mutex;
} syncinfo_t; } syncinfo_t;
...@@ -194,9 +186,7 @@ static int syncrepl_dirsync_cookie( ...@@ -194,9 +186,7 @@ static int syncrepl_dirsync_cookie(
syncinfo_t *, Operation *, LDAPControl ** ); syncinfo_t *, Operation *, LDAPControl ** );
#endif #endif
#ifdef DO_DSEE
static int syncrepl_dsee_update( syncinfo_t *si, Operation *op ) ; static int syncrepl_dsee_update( syncinfo_t *si, Operation *op ) ;
#endif
/* delta-mmr overlay handler */ /* delta-mmr overlay handler */
static int syncrepl_op_modify( Operation *op, SlapReply *rs ); static int syncrepl_op_modify( Operation *op, SlapReply *rs );
...@@ -265,10 +255,8 @@ syncrepl_state2str( int state ) ...@@ -265,10 +255,8 @@ syncrepl_state2str( int state )
case MSAD_DIRSYNC_MODIFY: case MSAD_DIRSYNC_MODIFY:
return "DIRSYNC_MOD"; return "DIRSYNC_MOD";
#endif #endif
#ifdef DO_DSEE
case DSEE_SYNC_ADD: case DSEE_SYNC_ADD:
return "DSEE_ADD"; return "DSEE_ADD";
#endif
} }
return "UNKNOWN"; return "UNKNOWN";
...@@ -508,7 +496,6 @@ ldap_sync_search( ...@@ -508,7 +496,6 @@ ldap_sync_search(
* normal mode for a full refresh. * normal mode for a full refresh.
*/ */
if ( si->si_syncdata ) { if ( si->si_syncdata ) {
#ifdef DO_DSEE
if ( si->si_syncdata == SYNCDATA_CHANGELOG ) { if ( si->si_syncdata == SYNCDATA_CHANGELOG ) {
LDAPMessage *res, *msg; LDAPMessage *res, *msg;
unsigned long first = 0, last = 0; unsigned long first = 0, last = 0;
...@@ -552,7 +539,6 @@ ldap_sync_search( ...@@ -552,7 +539,6 @@ ldap_sync_search(
si->si_logstate = SYNCLOG_FALLBACK; si->si_logstate = SYNCLOG_FALLBACK;
} }
} else } else
#endif
if ( si->si_logstate == SYNCLOG_LOGGING && !si->si_syncCookie.numcsns && if ( si->si_logstate == SYNCLOG_LOGGING && !si->si_syncCookie.numcsns &&
!si->si_refreshDone ) { !si->si_refreshDone ) {
si->si_logstate = SYNCLOG_FALLBACK; si->si_logstate = SYNCLOG_FALLBACK;
...@@ -628,7 +614,6 @@ ldap_sync_search( ...@@ -628,7 +614,6 @@ ldap_sync_search(
} }
} else } else
#endif #endif
#ifdef DO_DSEE
if ( si->si_syncdata == SYNCDATA_CHANGELOG ) { if ( si->si_syncdata == SYNCDATA_CHANGELOG ) {
if ( si->si_logstate == SYNCLOG_LOGGING && si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ) { if ( si->si_logstate == SYNCLOG_LOGGING && si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ) {
c[0].ldctl_oid = LDAP_CONTROL_PERSIST_REQUEST; c[0].ldctl_oid = LDAP_CONTROL_PERSIST_REQUEST;
...@@ -641,7 +626,6 @@ ldap_sync_search( ...@@ -641,7 +626,6 @@ ldap_sync_search(
ctrls[0] = NULL; ctrls[0] = NULL;
} }
} else } else
#endif
{ {
if ( !BER_BVISNULL( &si->si_syncCookie.octet_str ) ) if ( !BER_BVISNULL( &si->si_syncCookie.octet_str ) )
{ {
...@@ -863,7 +847,6 @@ do_syncrep1( ...@@ -863,7 +847,6 @@ do_syncrep1(
} }
} else } else
#endif #endif
#ifdef DO_DSEE
if ( si->si_syncdata == SYNCDATA_CHANGELOG ) { if ( si->si_syncdata == SYNCDATA_CHANGELOG ) {
if ( !si->si_lastchange ) { if ( !si->si_lastchange ) {
BerVarray vals = NULL; BerVarray vals = NULL;
...@@ -879,7 +862,6 @@ do_syncrep1( ...@@ -879,7 +862,6 @@ do_syncrep1(
} }
} }
} else } else
#endif
{ {
/* We've just started up, or the remote server hasn't sent us /* We've just started up, or the remote server hasn't sent us
...@@ -1107,7 +1089,6 @@ do_syncrep2( ...@@ -1107,7 +1089,6 @@ do_syncrep2(
bdn.bv_val = empty; bdn.bv_val = empty;
bdn.bv_len = sizeof(empty)-1; bdn.bv_len = sizeof(empty)-1;
} }
#ifdef DO_DSEE
if ( si->si_syncdata == SYNCDATA_CHANGELOG ) { if ( si->si_syncdata == SYNCDATA_CHANGELOG ) {
if ( si->si_logstate == SYNCLOG_LOGGING ) { if ( si->si_logstate == SYNCLOG_LOGGING ) {
rc = syncrepl_message_to_op( si, op, msg ); rc = syncrepl_message_to_op( si, op, msg );
...@@ -1139,7 +1120,6 @@ do_syncrep2( ...@@ -1139,7 +1120,6 @@ do_syncrep2(
goto done; goto done;
break; break;
} }
#endif
/* we can't work without the control */ /* we can't work without the control */
if ( rctrls ) { if ( rctrls ) {
LDAPControl **next = NULL; LDAPControl **next = NULL;
...@@ -3546,7 +3526,6 @@ static int syncrepl_dirsync_schema() ...@@ -3546,7 +3526,6 @@ static int syncrepl_dirsync_schema()
} }
#endif /* LDAP_CONTROL_X_DIRSYNC */ #endif /* LDAP_CONTROL_X_DIRSYNC */
#ifdef DO_DSEE
static int syncrepl_dsee_schema() static int syncrepl_dsee_schema()
{ {
const char *text; const char *text;
...@@ -3561,7 +3540,6 @@ static int syncrepl_dsee_schema() ...@@ -3561,7 +3540,6 @@ static int syncrepl_dsee_schema()
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 "
"SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", &sy_ad_dseeLastChange, 0); "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", &sy_ad_dseeLastChange, 0);
} }
#endif /* DO_DSEE */
/* During a refresh, we may get an LDAP_SYNC_ADD for an already existing /* During a refresh, we may get an LDAP_SYNC_ADD for an already existing
* entry if a previous refresh was interrupted before sending us a new * entry if a previous refresh was interrupted before sending us a new
...@@ -6194,7 +6172,6 @@ parse_syncrepl_line( ...@@ -6194,7 +6172,6 @@ parse_syncrepl_line(
si->si_syncdata = verb_to_mask( val, datamodes ); si->si_syncdata = verb_to_mask( val, datamodes );
si->si_got |= GOT_SYNCDATA; si->si_got |= GOT_SYNCDATA;
if ( si->si_syncdata == SYNCDATA_CHANGELOG ) { if ( si->si_syncdata == SYNCDATA_CHANGELOG ) {
#ifdef DO_DSEE
if ( sy_ad_nsUniqueId == NULL ) { if ( sy_ad_nsUniqueId == NULL ) {
int rc = syncrepl_dsee_schema(); int rc = syncrepl_dsee_schema();
if ( rc ) { if ( rc ) {
...@@ -6204,12 +6181,6 @@ parse_syncrepl_line( ...@@ -6204,12 +6181,6 @@ parse_syncrepl_line(
return 1; return 1;
} }
} }
#else
snprintf( c->cr_msg, sizeof( c->cr_msg ),
"changelog not yet supported\n" );
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );
return 1;
#endif
} }
} else if ( !strncasecmp( c->argv[ i ], STRICT_REFRESH, } else if ( !strncasecmp( c->argv[ i ], STRICT_REFRESH,
STRLENOF( STRICT_REFRESH ) ) ) STRLENOF( STRICT_REFRESH ) ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment