[Gpg4win-commits] r1195 - in trunk: . patches patches/gpgme-1.2.0
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sun Jun 21 03:44:12 CEST 2009
Author: marcus
Date: 2009-06-21 03:44:12 +0200 (Sun, 21 Jun 2009)
New Revision: 1195
Added:
trunk/patches/gpgme-1.2.0/
trunk/patches/gpgme-1.2.0/01-w32-io-threads.patch
Modified:
trunk/ChangeLog
trunk/Makefile.am
Log:
2009-06-21 Marcus Brinkmann <marcus at g10code.de>
* patches/gpgme-1.2.0/01-w32-io-threads.patch: New file.
* Makefile.am (EXTRA_DIST): Add it.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-20 21:03:01 UTC (rev 1194)
+++ trunk/ChangeLog 2009-06-21 01:44:12 UTC (rev 1195)
@@ -1,3 +1,8 @@
+2009-06-21 Marcus Brinkmann <marcus at g10code.de>
+
+ * patches/gpgme-1.2.0/01-w32-io-threads.patch: New file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
2009-06-20 Werner Koch <wk at g10code.com>
* patches/gpa-0.9.0/01-title-prop.patch: New.
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2009-06-20 21:03:01 UTC (rev 1194)
+++ trunk/Makefile.am 2009-06-21 01:44:12 UTC (rev 1195)
@@ -32,6 +32,7 @@
patches/gpgme-1.1.7/01-registry.patch \
patches/gpgme-1.1.7/02-extern-umlaute.patch \
patches/gpgme-1.1.7/03-error-parsing.patch \
+ patches/gpgme-1.2.0/01-w32-io-threads.patch \
patches/libetpan-0.54/01-config.patch \
patches/libetpan-0.54/02-index.patch \
patches/winpt/01-gpg-path.patch \
Added: trunk/patches/gpgme-1.2.0/01-w32-io-threads.patch
===================================================================
--- trunk/patches/gpgme-1.2.0/01-w32-io-threads.patch 2009-06-20 21:03:01 UTC (rev 1194)
+++ trunk/patches/gpgme-1.2.0/01-w32-io-threads.patch 2009-06-21 01:44:12 UTC (rev 1195)
@@ -0,0 +1,136 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+Revert a change that needs more testing.
+
+diff -rup src/w32-io.c src/w32-io.c
+--- src/w32-io.c 2009-06-21 00:55:40.000000000 +0200
++++ src/w32-io.c 2009-06-21 00:56:01.000000000 +0200
+@@ -389,12 +389,9 @@ find_reader (int fd, int start_it)
+ if (i != reader_table_size)
+ {
+ rd = create_reader (fd_to_handle (fd));
+- if (rd)
+- {
+- reader_table[i].fd = fd;
+- reader_table[i].context = rd;
+- reader_table[i].used = 1;
+- }
++ reader_table[i].fd = fd;
++ reader_table[i].context = rd;
++ reader_table[i].used = 1;
+ }
+
+ UNLOCK (reader_table_lock);
+@@ -695,12 +692,9 @@ find_writer (int fd, int start_it)
+ if (i != writer_table_size)
+ {
+ wt = create_writer (fd_to_handle (fd));
+- if (wt)
+- {
+- writer_table[i].fd = fd;
+- writer_table[i].context = wt;
+- writer_table[i].used = 1;
+- }
++ writer_table[i].fd = fd;
++ writer_table[i].context = wt;
++ writer_table[i].used = 1;
+ }
+
+ UNLOCK (writer_table_lock);
+@@ -739,7 +733,7 @@ _gpgme_io_write (int fd, const void *buf
+ if (count == 0)
+ return TRACE_SYSRES (0);
+
+- ctx = find_writer (fd, 0);
++ ctx = find_writer (fd, 1);
+ if (!ctx)
+ return TRACE_SYSRES (-1);
+
+@@ -832,7 +826,6 @@ _gpgme_io_pipe (int filedes[2], int inhe
+ /* Make one end inheritable. */
+ if (inherit_idx == 0)
+ {
+- struct writer_context_s *ctx;
+ HANDLE hd;
+ if (!DuplicateHandle (GetCurrentProcess(), rh,
+ GetCurrentProcess(), &hd, 0,
+@@ -848,22 +841,9 @@ _gpgme_io_pipe (int filedes[2], int inhe
+ }
+ CloseHandle (rh);
+ rh = hd;
+-
+- ctx = find_writer (handle_to_fd (wh), 0);
+- assert (ctx == NULL);
+- ctx = find_writer (handle_to_fd (wh), 1);
+- if (!ctx)
+- {
+- CloseHandle (rh);
+- CloseHandle (wh);
+- /* FIXME: Should translate the error code. */
+- errno = EIO;
+- return TRACE_SYSRES (-1);
+- }
+ }
+ else if (inherit_idx == 1)
+ {
+- struct reader_context_s *ctx;
+ HANDLE hd;
+ if (!DuplicateHandle( GetCurrentProcess(), wh,
+ GetCurrentProcess(), &hd, 0,
+@@ -879,18 +859,6 @@ _gpgme_io_pipe (int filedes[2], int inhe
+ }
+ CloseHandle (wh);
+ wh = hd;
+-
+- ctx = find_reader (handle_to_fd (rh), 0);
+- assert (ctx == NULL);
+- ctx = find_reader (handle_to_fd (rh), 1);
+- if (!ctx)
+- {
+- CloseHandle (rh);
+- CloseHandle (wh);
+- /* FIXME: Should translate the error code. */
+- errno = EIO;
+- return TRACE_SYSRES (-1);
+- }
+ }
+
+ filedes[0] = handle_to_fd (rh);
+@@ -1280,7 +1248,7 @@ _gpgme_io_select (struct io_select_fd_s
+ {
+ if (fds[i].for_read)
+ {
+- struct reader_context_s *ctx = find_reader (fds[i].fd,0);
++ struct reader_context_s *ctx = find_reader (fds[i].fd,1);
+
+ if (!ctx)
+ TRACE_LOG1 ("error: no reader for FD 0x%x (ignored)",
+@@ -1303,7 +1271,7 @@ _gpgme_io_select (struct io_select_fd_s
+ }
+ else if (fds[i].for_write)
+ {
+- struct writer_context_s *ctx = find_writer (fds[i].fd,0);
++ struct writer_context_s *ctx = find_writer (fds[i].fd,1);
+
+ if (!ctx)
+ TRACE_LOG1 ("error: no writer for FD 0x%x (ignored)",
+@@ -1449,7 +1417,7 @@ _gpgme_io_dup (int fd)
+ return TRACE_SYSRES (-1);
+ }
+
+- rd_ctx = find_reader (fd, 0);
++ rd_ctx = find_reader (fd, 1);
+ if (rd_ctx)
+ {
+ /* No need for locking, as the only races are against the reader
+@@ -1468,7 +1436,7 @@ _gpgme_io_dup (int fd)
+ UNLOCK (reader_table_lock);
+ }
+
+- wt_ctx = find_writer (fd, 0);
++ wt_ctx = find_writer (fd, 1);
+ if (wt_ctx)
+ {
+ /* No need for locking, as the only races are against the writer
More information about the Gpg4win-commits
mailing list