diff options
author | kan <kan@FreeBSD.org> | 2011-06-19 13:35:46 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2011-06-19 13:35:46 +0000 |
commit | 92d29093280cc14ccdb91f166332c07fc3b2370a (patch) | |
tree | 3bc323a0fd631c5d744d0899f650996dc54f0f73 | |
parent | 13e3e9fd0231fda3d7f7dec351a439b26fe94d34 (diff) | |
download | FreeBSD-src-92d29093280cc14ccdb91f166332c07fc3b2370a.zip FreeBSD-src-92d29093280cc14ccdb91f166332c07fc3b2370a.tar.gz |
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.
-rw-r--r-- | lib/libc/iconv/citrus_mapper.c | 2 | ||||
-rw-r--r-- | lib/libc/iconv/iconv.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/iconv/citrus_mapper.c b/lib/libc/iconv/citrus_mapper.c index a788a9d9..b5ae96d 100644 --- a/lib/libc/iconv/citrus_mapper.c +++ b/lib/libc/iconv/citrus_mapper.c @@ -337,7 +337,9 @@ _citrus_mapper_open(struct _citrus_mapper_area *__restrict ma, goto quit; /* open mapper */ + UNLOCK; ret = mapper_open(ma, &cm, module, variable); + WLOCK; if (ret) goto quit; cm->cm_key = strdup(mapname); diff --git a/lib/libc/iconv/iconv.c b/lib/libc/iconv/iconv.c index 2cd38df..d1e01e8 100644 --- a/lib/libc/iconv/iconv.c +++ b/lib/libc/iconv/iconv.c @@ -85,7 +85,7 @@ _iconv_open(const char *out, const char *in, struct _citrus_iconv *prealloc) errno = ENOMEM; return ((iconv_t)-1); } - + p = out_truncated; while (*p != 0) { if (p[0] == '/' && p[1] == '/') { |