svn commit: samba r7898 - in branches/SAMBA_4_0/source/torture/local: .

tridge at samba.org tridge at samba.org
Sat Jun 25 04:48:20 GMT 2005


Author: tridge
Date: 2005-06-25 04:48:20 +0000 (Sat, 25 Jun 2005)
New Revision: 7898

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7898

Log:
don't die on bad iconv libs in LOCAL-ICONV test















Modified:
   branches/SAMBA_4_0/source/torture/local/iconv.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/iconv.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/iconv.c	2005-06-25 03:43:33 UTC (rev 7897)
+++ branches/SAMBA_4_0/source/torture/local/iconv.c	2005-06-25 04:48:20 UTC (rev 7898)
@@ -38,6 +38,10 @@
 	size_t size_in, size_out, ret;
 	if (!cd) {
 		cd = iconv_open("UTF-16LE", "UCS-4LE");
+		if (cd == (iconv_t)-1) {
+			cd = NULL;
+			return -1;
+		}
 	}
 
 	in[0] = codepoint & 0xFF;
@@ -123,6 +127,10 @@
 
 	if (!cd) {
 		cd = iconv_open(charset, "UTF-16LE");
+		if (cd == (iconv_t)-1) {
+			cd = NULL;
+			return 0;
+		}
 		cd2 = smb_iconv_open(charset, "UTF-16LE");
 		cd3 = smb_iconv_open("UTF-16LE", charset);
 		last_charset = charset;



More information about the samba-cvs mailing list