diff options
author | Jeremy Allison <jra@samba.org> | 2004-09-17 19:53:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:42 -0500 |
commit | fb4c421f1b595535639343fd90bad223457eb6a8 (patch) | |
tree | 55fa31ff357f502e5d1c6f62eb74fe8368da4e9f | |
parent | 30208782e77574dbb279fe41ad97a6417b6548bf (diff) | |
download | samba-fb4c421f1b595535639343fd90bad223457eb6a8.tar.gz samba-fb4c421f1b595535639343fd90bad223457eb6a8.tar.bz2 samba-fb4c421f1b595535639343fd90bad223457eb6a8.zip |
r2392: Steal the nicer error message from Samba4 :-).
Jeremy.
(This used to be commit afa88868b76a6e825bc45f8d405d4b3f557fdfdb)
-rw-r--r-- | source3/lib/charcnv.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 21d34f30cb..40004826b4 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -229,14 +229,18 @@ static size_t convert_string_internal(charset_t from, charset_t to, break; case E2BIG: reason="No more room"; - if (!conv_silent) - DEBUG(3, ("convert_string_internal: Required %lu, available %lu\n", - (unsigned long)srclen, (unsigned long)destlen)); - /* we are not sure we need srclen bytes, - may be more, may be less. - We only know we need more than destlen - bytes ---simo */ - break; + if (!conv_silent) { + if (from == CH_UNIX) { + DEBUG(3,("E2BIG: convert_string(%s,%s): srclen=%u destlen=%u - '%s'\n", + charset_name(from), charset_name(to), + (unsigned int)srclen, (unsigned int)destlen, (const char *)src)); + } else { + DEBUG(3,("E2BIG: convert_string(%s,%s): srclen=%u destlen=%u\n", + charset_name(from), charset_name(to), + (unsigned int)srclen, (unsigned int)destlen)); + } + } + break; case EILSEQ: reason="Illegal multibyte sequence"; if (!conv_silent) |