Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jun 2011 13:35:46 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223296 - head/lib/libc/iconv
Message-ID:  <201106191335.p5JDZk11095714@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Sun Jun 19 13:35:46 2011
New Revision: 223296
URL: http://svn.freebsd.org/changeset/base/223296

Log:
  Put a quick bandaid on internal citrus locking.
  
  The code is not quite right still, but it programs from deadlocking
  on themselves if one enables new citrus code by mistake.

Modified:
  head/lib/libc/iconv/citrus_mapper.c
  head/lib/libc/iconv/iconv.c

Modified: head/lib/libc/iconv/citrus_mapper.c
==============================================================================
--- head/lib/libc/iconv/citrus_mapper.c	Sun Jun 19 13:35:41 2011	(r223295)
+++ head/lib/libc/iconv/citrus_mapper.c	Sun Jun 19 13:35:46 2011	(r223296)
@@ -337,7 +337,9 @@ _citrus_mapper_open(struct _citrus_mappe
 		goto quit;
 
 	/* open mapper */
+	UNLOCK;
 	ret = mapper_open(ma, &cm, module, variable);
+	WLOCK;
 	if (ret)
 		goto quit;
 	cm->cm_key = strdup(mapname);

Modified: head/lib/libc/iconv/iconv.c
==============================================================================
--- head/lib/libc/iconv/iconv.c	Sun Jun 19 13:35:41 2011	(r223295)
+++ head/lib/libc/iconv/iconv.c	Sun Jun 19 13:35:46 2011	(r223296)
@@ -85,7 +85,7 @@ _iconv_open(const char *out, const char 
 		errno = ENOMEM;
 		return ((iconv_t)-1);
 	}
-		
+
 	p = out_truncated;
         while (*p != 0) {
                 if (p[0] == '/' && p[1] == '/') {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106191335.p5JDZk11095714>