svn commit: samba r4623 - in
branches/SAMBA_4_0/source/lib/registry: .
jelmer at samba.org
jelmer at samba.org
Sun Jan 9 19:06:49 GMT 2005
Author: jelmer
Date: 2005-01-09 19:06:49 +0000 (Sun, 09 Jan 2005)
New Revision: 4623
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4623
Log:
Convert values from UTF8 to UTF16 in gconf registry backend (caught
by Andrew Bartlett)
Modified:
branches/SAMBA_4_0/source/lib/registry/reg_backend_gconf.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_gconf.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/reg_backend_gconf.c 2005-01-09 18:53:54 UTC (rev 4622)
+++ branches/SAMBA_4_0/source/lib/registry/reg_backend_gconf.c 2005-01-09 19:06:49 UTC (rev 4623)
@@ -72,6 +72,7 @@
GConfValue *value;
struct registry_value *newval;
char *fullpath = p->backend_data;
+ const char *tmp;
int i;
cur = entries = gconf_client_all_entries((GConfClient*)p->hive->backend_data, fullpath, NULL);
@@ -92,8 +93,8 @@
case GCONF_VALUE_STRING:
newval->data_type = REG_SZ;
- newval->data_blk = talloc_strdup(mem_ctx, gconf_value_get_string(value));
- newval->data_len = strlen(newval->data_blk);
+ tmp = gconf_value_get_string(value);
+ newval->data_len = convert_string_talloc(mem_ctx, CH_UTF8, CH_UTF16, tmp, strlen(tmp), &(newval->data_blk));
break;
case GCONF_VALUE_INT:
@@ -149,7 +150,7 @@
return WERR_OK;
}
-static WERROR gconf_set_value(struct registry_key *key, const char *valname, int type, void *data, int len)
+static WERROR gconf_set_value(struct registry_key *key, const char *valname, uint32 type, void *data, int len)
{
GError *error = NULL;
char *valpath;
More information about the samba-cvs
mailing list