diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-06 11:50:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-06 11:50:07 +0000 |
commit | e9c53606de237f91712bb9d2a9fdf84b80bce38d (patch) | |
tree | fff2de08fed7abd976f2212db28fceb65c51edeb /source/lib/charcnv.c | |
parent | 6b4559506d1434e6114d9707dd11fdc8ee8d54be (diff) | |
download | samba-e9c53606de237f91712bb9d2a9fdf84b80bce38d.tar.gz samba-e9c53606de237f91712bb9d2a9fdf84b80bce38d.tar.xz samba-e9c53606de237f91712bb9d2a9fdf84b80bce38d.zip |
check for initialisation in convert_string()
otherwise initial load in smb.conf can fail
Diffstat (limited to 'source/lib/charcnv.c')
-rw-r--r-- | source/lib/charcnv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index bec34c0d419..30dfd2c504a 100644 --- a/source/lib/charcnv.c +++ b/source/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 */ |