From 57f0e85f6ccbe64904414fb6ede859dcc8acdc5b Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 24 Jan 2001 22:45:40 +0000 Subject: make sure to add the lengths here (include the \0? anyone?). 2001-01-24 Chris Toshok * backend/pas/pas-backend-ldap.c (email_ber_func): make sure to add the lengths here (include the \0? anyone?). (build_mods_from_ecards): if we're filling in mod->mod_bvalues, set mod_op |= LDAP_MOD_BVALUES. svn path=/trunk/; revision=7791 --- addressbook/backend/pas/pas-backend-ldap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'addressbook/backend') diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 46681af3a6..6d7c9f5f8f 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -482,6 +482,7 @@ build_mods_from_ecards (ECardSimple *current, ECardSimple *new, gboolean *new_dn mod->mod_values[1] = NULL; } else { + mod->mod_op |= LDAP_MOD_BVALUES; mod->mod_bvalues = prop_info[i].ber_func (new); } @@ -1005,8 +1006,10 @@ email_ber_func(ECardSimple *card) j = 0; for (i = 0; i < 3; i ++) { - if (emails[i]) - result[j++]->bv_val = g_strdup (emails[i]); + if (emails[i]) { + result[j]->bv_val = g_strdup (emails[i]); + result[j++]->bv_len = strlen (emails[i]) + 1; + } } result[num] = NULL; -- cgit v1.2.3