From: Pierangelo Masarati Date: Mon, 10 Feb 2003 18:15:36 +0000 (+0000) Subject: fix ITS#2309 X-Git-Tag: NO_SLAP_OP_BLOCKS~378 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=06b981429af164dc89d004fb39385a376be1fe1a;p=openldap fix ITS#2309 --- diff --git a/servers/slapd/back-sql/entry-id.c b/servers/slapd/back-sql/entry-id.c index 25bef986fb..209821d755 100644 --- a/servers/slapd/back-sql/entry-id.c +++ b/servers/slapd/back-sql/entry-id.c @@ -418,12 +418,16 @@ backsql_id2entry( backsql_srch_info *bsi, Entry *e, backsql_entryID *eid ) const char *text = NULL; char textbuf[ 1024 ]; size_t textlen = sizeof( textbuf ); - struct berval bv[ 2 ] = { bsi->oc->oc->soc_cname, BER_BVNULL }; + struct berval bv[ 2 ]; struct berval soc; AttributeDescription *ad_soc = slap_schema.si_ad_structuralObjectClass; + int rc; - int rc = structural_class( bv, &soc, NULL, + bv[ 0 ] = bsi->oc->oc->soc_cname; + bv[ 0 ].bv_val = NULL; + + rc = structural_class( bv, &soc, NULL, &text, textbuf, textlen ); if ( rc != LDAP_SUCCESS ) { entry_free( e ); diff --git a/servers/slapd/back-sql/init.c b/servers/slapd/back-sql/init.c index 1fd5512711..826e5dd92a 100644 --- a/servers/slapd/back-sql/init.c +++ b/servers/slapd/back-sql/init.c @@ -31,7 +31,7 @@ backsql_LTX_init_module( memset( &bi, '\0', sizeof( bi ) ); bi.bi_type = "sql"; - bi.bi_init = backbacksql_initialize; + bi.bi_init = sql_back_initialize; backend_add( &bi ); return 0;