summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-06 11:50:07 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-06 11:50:07 +0000
commitc5cc721dc3758d3cec5e3b04078f3b2a52841994 (patch)
tree4cc588e768c08f7bd4b2623e039a48f3108b9cff /source3
parent2036ce8a5d72f8e14f59d1c41b129f2787df2c66 (diff)
downloadsamba-c5cc721dc3758d3cec5e3b04078f3b2a52841994.tar.gz
samba-c5cc721dc3758d3cec5e3b04078f3b2a52841994.tar.bz2
samba-c5cc721dc3758d3cec5e3b04078f3b2a52841994.zip
check for initialisation in convert_string()
otherwise initial load in smb.conf can fail (This used to be commit e9c53606de237f91712bb9d2a9fdf84b80bce38d)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/charcnv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index bec34c0d41..30dfd2c504 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -73,6 +73,12 @@ static size_t convert_string(smb_iconv_t descriptor,
size_t retval;
char* inbuf = (char*)src;
char* outbuf = (char*)dest;
+ static int initialised;
+
+ if (!initialised) {
+ initialised = 1;
+ init_iconv(NULL, NULL);
+ }
if (descriptor == (smb_iconv_t)-1) {
/* conversion not supported, use as is */