summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-17 19:53:12 +0000
committerJeremy Allison <jra@samba.org>2004-09-17 19:53:12 +0000
commitcc5432812c4e1fa5185949b3fed1cbda1c7e0b2a (patch)
tree118ddc3335c45c8e37745c0fa37b4c19612a5c97 /source/lib
parent2783ae0e1fe8f2110484234e984b37f56adc32e5 (diff)
downloadsamba-cc5432812c4e1fa5185949b3fed1cbda1c7e0b2a.tar.gz
samba-cc5432812c4e1fa5185949b3fed1cbda1c7e0b2a.tar.xz
samba-cc5432812c4e1fa5185949b3fed1cbda1c7e0b2a.zip
r2392: Steal the nicer error message from Samba4 :-).
Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/charcnv.c20
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)