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 | afa88868b76a6e825bc45f8d405d4b3f557fdfdb (patch) | |
tree | c5f15cd4f98f951d8f6b296b3179e134c989928d /source/lib | |
parent | 4e29698467d124663226929b485d27d3f67e0f8e (diff) | |
download | samba-afa88868b76a6e825bc45f8d405d4b3f557fdfdb.tar.gz samba-afa88868b76a6e825bc45f8d405d4b3f557fdfdb.tar.xz samba-afa88868b76a6e825bc45f8d405d4b3f557fdfdb.zip |
r2392: Steal the nicer error message from Samba4 :-).
Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/charcnv.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index 21d34f30cbb..40004826b4a 100644 --- a/source/lib/charcnv.c +++ b/source/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) |