[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: hdb as a dynamic module unsupported (ITS#2816)



Oops, the uploaded patch has wrong reverse check.
Sorry to bother you guys, but please use Masato-Taruishi-1106-2.patch.

Thanks

> Ah, sorry. This patch is wrong. I have to check more strict pattern
> as follows:
> 
> -#ifdef SLAPD_BDB_DYNAMIC
> +#if ((! defined(BDB_HIER) && defined(SLAPD_BDB_DYNAMIC)) || \
> +               (defined(BDB_HIER) && defined(SLAPD_HDB_DYNAMIC)))
> 
> I uploaded one more suggestion to share bi_type value
> as Masato-Taruishi-1106.patch. This patch includes the
> above, too.
> 
> Thanks
> 
> > Full_Name: Masato Taruishi
> > Version: HEAD
> > OS: Debian GNU/Linux
> > URL: ftp://ftp.openldap.org/incoming/
> > Submission from: (NULL) (210.128.90.14)
> > 
> > 
> > Hi,
> > 
> > hdb can't be used as a dynamic module because bi_type keeps "bdb"
> > when --enable-hdb-module=dynamic.
> > 
> > The applied patch fixes this problem, but I guess
> > we should share bi_type value in both backend.c and init_module.
> > 
> > maybe it's better to create SLAPD_BDB_BITYPE "bdb" macro in
> > external.h and to use it in both backend.c and back-bdb/init.c.
> > 
> > Thanks
> > 
> > --- servers/slapd/back-bdb/init.c       24 Sep 2003 22:27:22 -0000      1.141
> > +++ servers/slapd/back-bdb/init.c       6 Nov 2003 10:36:48 -0000
> > @@ -554,18 +554,22 @@
> >         return 0;
> >  }
> >                                                                                
> > 
> > -#ifdef SLAPD_BDB_DYNAMIC
> > +#if defined(SLAPD_BDB_DYNAMIC) || defined(SLAPD_HDB_DYNAMIC)
> >  int init_module( int argc, char *argv[] ) {
> >         BackendInfo bi;
> >                                                                                
> > 
> >         memset( &bi, '\0', sizeof(bi) );
> > +#ifndef BDB_HIER
> >         bi.bi_type = "bdb";
> > +#else
> > +       bi.bi_type = "hdb";
> > +#endif
> >         bi.bi_init = bdb_initialize;
> >                                                                                
> > 
> >         backend_add( &bi );
> >         return 0;
> >  }
> > -#endif /* SLAPD_BDB_DYNAMIC */
> > +#endif /* SLAPD_BDB_DYNAMIC || SLAPD_HDB_DYNAMIC */
> >                                                                                
> > 
> >  int
> >  bdb_initialize(
> > 
> > 
> > 
> 
> 
>