From c5cc721dc3758d3cec5e3b04078f3b2a52841994 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 6 Jul 2001 11:50:07 +0000 Subject: check for initialisation in convert_string() otherwise initial load in smb.conf can fail (This used to be commit e9c53606de237f91712bb9d2a9fdf84b80bce38d) --- source3/lib/charcnv.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib') 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 */ -- cgit