summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
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 */