summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-17 10:41:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:46 -0500
commit66f1e8d020709aa66b3b64c9b583fd326aa6d3b0 (patch)
treeb5942701fc90056d024f5a1c45505b682b6eda24 /source4
parent3e3f7b0ed03baa1d97012a787f377fdca131d219 (diff)
downloadsamba-66f1e8d020709aa66b3b64c9b583fd326aa6d3b0.tar.gz
samba-66f1e8d020709aa66b3b64c9b583fd326aa6d3b0.tar.bz2
samba-66f1e8d020709aa66b3b64c9b583fd326aa6d3b0.zip
r2380: nicer error reporting in convert_string()
(This used to be commit 6807d336c2365e4e7f45605d75667dbf05715b34)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/charcnv.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/lib/charcnv.c b/source4/lib/charcnv.c
index 2109e957d9..f30f5b9239 100644
--- a/source4/lib/charcnv.c
+++ b/source4/lib/charcnv.c
@@ -161,12 +161,15 @@ ssize_t convert_string(charset_t from, charset_t to,
break;
case E2BIG:
reason="No more room";
- DEBUG(0, ("convert_string: Required %d, available %d\n",
- srclen, 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 */
+ if (from == CH_UNIX) {
+ DEBUG(0,("E2BIG: convert_string(%s,%s): srclen=%d destlen=%d - '%s'\n",
+ charset_name(from), charset_name(to),
+ srclen, destlen, (const char *)src));
+ } else {
+ DEBUG(0,("E2BIG: convert_string(%s,%s): srclen=%d destlen=%d\n",
+ charset_name(from), charset_name(to),
+ srclen, destlen));
+ }
break;
case EILSEQ:
reason="Illegal multibyte sequence";