LDAP backend



hi,

    I am having trouble using gconf_value_new_pair_from_string().
and also the list finction. At first I though it was just me (always a
good start), but then I made a GConfValue using two existing
GConfValues,
this works ok, and I save it ok, but I can not read it again.

--- deep in the reading function()

  car_type = _ldap_gconf_get_value( ld, err, entry, "cartype");
  cdr_type = _ldap_gconf_get_value( ld, err, entry, "cdrtype");
  gconf_log( GCL_DEBUG, "ldap_gconf_reify_gvalue create a pair");
  gconf_log( GCL_DEBUG, "ldap_gconf_reify_gvalue create a pair
car:%s",car_type); // == string
  gconf_log( GCL_DEBUG, "ldap_gconf_reify_gvalue create a pair
cdr:%s",cdr_type); // == string
  gconf_log( GCL_DEBUG, "ldap_gconf_reify_gvalue create a pair
value:%s",value); // == (left,right) -- I think

  if( !car_type || !cdr_type ) {
   return NULL;
  }

  retval = gconf_value_new_pair_from_string( // -- segv.
    gconf_value_type_from_string(car_type),
    gconf_value_type_from_string(cdr_type),
    value,
    err);

If anyone else can reproduce this bug then I'll prolly look at
gconf_value_new_pair_from_string()
and see if I can find a bug in it.


BTW  the only two methods that remain are:
  ldap_gconf_query_metainfo,
  ldap_gconf_set_schema,

which should be easy compared to  ldap_gconf_remove_dir() which I did
last nite.
(LDAP and recursive delete, hmm chicken).

I also don't know if it makes sense to have
  ldap_gconf_readable,    // not done (always 1)
  ldap_gconf_writable,    // not done (always 1)

for ldap, does it make sense to do network IO and read a value to make
sure that
it can be done? I guess it is cached so a later read will need no netIO,
but the
writeable one is a tad harder, unless I find another API for it I may
have to
read it and then set it to something to make sure I can write to it...
and it gets
worse, if the API does not set values to existing values then I have to
change it
and then change it back again. 2x network IO.


There are a few mem leaks still, but they are mostly noted with
FIXME already,
so it should be done soon.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]