]> git.sur5r.net Git - openldap/commitdiff
fix ITS#2309
authorPierangelo Masarati <ando@openldap.org>
Mon, 10 Feb 2003 18:15:36 +0000 (18:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 10 Feb 2003 18:15:36 +0000 (18:15 +0000)
servers/slapd/back-sql/entry-id.c
servers/slapd/back-sql/init.c

index 25bef986fbb7722754f504522f4dad0fa8f8b873..209821d7550be8d8d3033c186749bfd1d58d8cc8 100644 (file)
@@ -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 );
index 1fd5512711cac6c5701061d4b64676661308d7bd..826e5dd92a6524036fb7e31241f9d7e5ff690c89 100644 (file)
@@ -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;