From: Pierangelo Masarati Date: Sun, 24 Dec 2006 15:45:48 +0000 (+0000) Subject: apparently, structural_class() args changed X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~310 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1939ed3fc29d0d1c01a0a9390d2c51ac2a85260f;p=openldap apparently, structural_class() args changed --- diff --git a/servers/slapd/back-sql/add.c b/servers/slapd/back-sql/add.c index ad64fc4372..95026a8ad3 100644 --- a/servers/slapd/back-sql/add.c +++ b/servers/slapd/back-sql/add.c @@ -924,6 +924,7 @@ backsql_add( Operation *op, SlapReply *rs ) Entry p = { 0 }, *e = NULL; Attribute *at, *at_objectClass = NULL; + ObjectClass *soc = NULL; struct berval scname = BER_BVNULL; struct berval pdn; struct berval realdn = BER_BVNULL; @@ -1002,7 +1003,7 @@ backsql_add( Operation *op, SlapReply *rs ) goto done; } - rs->sr_err = structural_class( at->a_vals, &scname, NULL, + rs->sr_err = structural_class( at->a_vals, &soc, NULL, &text, buf, sizeof( buf ), op->o_tmpmemctx ); if ( rs->sr_err != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, " backsql_add(\"%s\"): " @@ -1011,6 +1012,7 @@ backsql_add( Operation *op, SlapReply *rs ) e = NULL; goto done; } + scname = soc->soc_cname; } else { scname = at->a_vals[0]; diff --git a/servers/slapd/back-sql/entry-id.c b/servers/slapd/back-sql/entry-id.c index dc073eaa23..b010cb30cc 100644 --- a/servers/slapd/back-sql/entry-id.c +++ b/servers/slapd/back-sql/entry-id.c @@ -1004,8 +1004,8 @@ next:; const char *text = NULL; char textbuf[ 1024 ]; size_t textlen = sizeof( textbuf ); - struct berval soc, - bv[ 2 ], + ObjectClass *soc = NULL; + struct berval bv[ 2 ], *nvals; int rc = LDAP_SUCCESS; @@ -1031,12 +1031,12 @@ next:; return rc; } - if ( !bvmatch( &soc, &bsi->bsi_oc->bom_oc->soc_cname ) ) { + if ( !bvmatch( &soc->soc_cname, &bsi->bsi_oc->bom_oc->soc_cname ) ) { Debug( LDAP_DEBUG_TRACE, "backsql_id2entry(%s): " "computed structuralObjectClass %s " "does not match objectClass %s associated " "to entry\n", - bsi->bsi_e->e_name.bv_val, soc.bv_val, + bsi->bsi_e->e_name.bv_val, soc->soc_cname.bv_val, bsi->bsi_oc->bom_oc->soc_cname.bv_val ); backsql_entry_clean( op, bsi->bsi_e ); return rc; diff --git a/servers/slapd/back-sql/modrdn.c b/servers/slapd/back-sql/modrdn.c index 1e452019b7..57e807a6a1 100644 --- a/servers/slapd/back-sql/modrdn.c +++ b/servers/slapd/back-sql/modrdn.c @@ -50,7 +50,6 @@ backsql_modrdn( Operation *op, SlapReply *rs ) *e = NULL; int manageDSAit = get_manageDSAit( op ); struct berval *newSuperior = op->oq_modrdn.rs_newSup; - char *next; Debug( LDAP_DEBUG_TRACE, "==>backsql_modrdn() renaming entry \"%s\", " "newrdn=\"%s\", newSuperior=\"%s\"\n",