mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
minor cleanup
This commit is contained in:
parent
b29bf83e7e
commit
78ddb88960
14 changed files with 25 additions and 64 deletions
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -31,15 +29,16 @@
|
|||
|
||||
/*
|
||||
* Skip:
|
||||
* - the first occurrence of objectClass, which is used
|
||||
* to determine how to build the SQL entry (FIXME ?!?)
|
||||
* - null values (e.g. delete modification)
|
||||
* - single occurrence of objectClass, because it is already used
|
||||
* to determine how to build the SQL entry
|
||||
* - operational attributes
|
||||
* - empty attributes (FIXME ?!?)
|
||||
* - empty attributes
|
||||
*/
|
||||
#define backsql_attr_skip(ad,vals) \
|
||||
#define backsql_attr_skip(ad, vals) \
|
||||
( \
|
||||
( (ad) == slap_schema.si_ad_objectClass \
|
||||
&& BER_BVISNULL( &((vals)[ 1 ]) ) ) \
|
||||
&& (vals) && BER_BVISNULL( &((vals)[ 1 ]) ) ) \
|
||||
|| is_at_operational( (ad)->ad_type ) \
|
||||
|| ( (vals) && BER_BVISNULL( &((vals)[ 0 ]) ) ) \
|
||||
)
|
||||
|
|
@ -273,14 +272,14 @@ backsql_modify_internal(
|
|||
|
||||
BerVarray sm_values;
|
||||
#if 0
|
||||
/* NOTE: some time we'll have to pass
|
||||
/* NOTE: some day we'll have to pass
|
||||
* the normalized values as well */
|
||||
BerVarray nvalues;
|
||||
#endif
|
||||
backsql_at_map_rec *at = NULL;
|
||||
struct berval *at_val;
|
||||
int i;
|
||||
/* first parameter no, parameter order */
|
||||
/* first parameter position, parameter order */
|
||||
SQLUSMALLINT pno, po;
|
||||
/* procedure return code */
|
||||
int prc;
|
||||
|
|
@ -404,6 +403,10 @@ add_only:;
|
|||
Debug( LDAP_DEBUG_TRACE, " backsql_modify_internal(): "
|
||||
"adding new values for attribute \"%s\"\n",
|
||||
at->bam_ad->ad_cname.bv_val, 0, 0 );
|
||||
|
||||
/* can't add a NULL val array */
|
||||
assert( sm_values != NULL );
|
||||
|
||||
for ( i = 0, at_val = sm_values;
|
||||
!BER_BVISNULL( at_val );
|
||||
i++, at_val++ )
|
||||
|
|
@ -1418,5 +1421,3 @@ done:;
|
|||
return ( ( rs->sr_err == LDAP_SUCCESS ) ? op->o_noop : 1 );
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -140,5 +138,3 @@ backsql_api_odbc2dn( Operation *op, SlapReply *rs, struct berval *dn )
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
@ -151,5 +149,3 @@ error_return:;
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
@ -168,5 +166,3 @@ return_results:;
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ac/string.h"
|
||||
#include <sys/types.h>
|
||||
|
|
@ -652,5 +650,3 @@ create_baseObject(
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -396,5 +394,3 @@ done:;
|
|||
return ( ( rs->sr_err == LDAP_SUCCESS ) ? op->o_noop : 1 );
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -605,5 +603,3 @@ done:;
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -125,5 +123,3 @@ backsql_modify( Operation *op, SlapReply *rs )
|
|||
return op->o_noop;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -463,5 +461,3 @@ modrdn_return:;
|
|||
return op->o_noop;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
@ -227,5 +225,3 @@ backsql_operational(
|
|||
return rc;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -928,5 +926,3 @@ backsql_destroy_schema_map( backsql_info *bi )
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -673,6 +671,19 @@ backsql_process_filter( backsql_srch_info *bsi, Filter *f )
|
|||
rc = 1;
|
||||
goto done;
|
||||
|
||||
} else if ( ad == slap_schema.si_ad_entryCSN ) {
|
||||
/*
|
||||
* TODO: introduce appropriate entryCSN filtering
|
||||
* to support syncrepl as producer...
|
||||
*/
|
||||
if ( bsi->bsi_op->o_sync_mode != SLAP_SYNC_REFRESH ) {
|
||||
/* unsupported at present... */
|
||||
bsi->bsi_status = LDAP_OTHER;
|
||||
rc = -1;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
} else if ( ad == slap_schema.si_ad_hasSubordinates || ad == NULL ) {
|
||||
/*
|
||||
* FIXME: this is not robust; e.g. a filter
|
||||
|
|
@ -1970,5 +1981,3 @@ done:;
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ac/string.h"
|
||||
#include <sys/types.h>
|
||||
|
|
@ -469,5 +467,3 @@ backsql_get_db_conn( Operation *op, SQLHDBC *dbh )
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "portable.h"
|
||||
|
||||
#ifdef SLAPD_SQL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "ac/string.h"
|
||||
|
|
@ -577,6 +575,3 @@ backsql_entryUUID_decode(
|
|||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
#endif /* SLAPD_SQL */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue