we block reading the next line with assuan.
* Before release:
-** Figure out if _gpgme_io_pipe should pre-create reader/writer and if we
- then can use !start_it in most invocations. Note that gpgme_io_dup
- probably should always use !start_it, because currently it will
- always create reader/writer if they don't exist(!?).
** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig)
The test is currently disabled there and in gpg/t-import.
** When gpg supports it, write binary subpackets directly,
and parse SUBPACKET status lines.
-** A few months after 1.1.7:
- Remove GPGME_CONF_PATHNAME macro.
* ABI's to break:
+** Implementation: Remove support for old style error codes in
+ conversion.c::_gpgme_map_gnupg_error.
** gpgme_edit_cb_t: Add "processed" return argument
(see edit.c::command_handler).
** I/O and User Data could be made extensible. But this can be done
without breaking the ABI hopefully.
-** All enums that should be enums need to have a maximum value to ensure
- a certain minimum width for extensibility.
+** All enums should be replaced by ints and simple macros for
+ maximum compatibility.
** Compatibility interfaces that can be removed in future versions:
*** gpgme_data_new_from_filepart
*** gpgme_data_new_from_file
the fds unregistered immediately - i think so?)
Note that we need support in gpgsm to set include-certs to default
as RESET does not reset it.
-** Optimize the case where a data object has 0an underlying fd we can pass
+** Optimize the case where a data object has an underlying fd we can pass
directly to the engine. This will be automatic with socket I/O and
descriptor passing.
** Move code common to all engines up from gpg to engine.
if (i != reader_table_size)
{
rd = create_reader (fd_to_handle (fd));
- reader_table[i].fd = fd;
- reader_table[i].context = rd;
- reader_table[i].used = 1;
+ if (rd)
+ {
+ reader_table[i].fd = fd;
+ reader_table[i].context = rd;
+ reader_table[i].used = 1;
+ }
}
UNLOCK (reader_table_lock);
if (i != writer_table_size)
{
wt = create_writer (fd_to_handle (fd));
- writer_table[i].fd = fd;
- writer_table[i].context = wt;
- writer_table[i].used = 1;
+ if (wt)
+ {
+ writer_table[i].fd = fd;
+ writer_table[i].context = wt;
+ writer_table[i].used = 1;
+ }
}
UNLOCK (writer_table_lock);
if (count == 0)
return TRACE_SYSRES (0);
- ctx = find_writer (fd, 1);
+ ctx = find_writer (fd, 0);
if (!ctx)
return TRACE_SYSRES (-1);
/* Make one end inheritable. */
if (inherit_idx == 0)
{
+ struct writer_context_s *ctx;
HANDLE hd;
if (!DuplicateHandle (GetCurrentProcess(), rh,
GetCurrentProcess(), &hd, 0,
}
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)
{
}
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);
{
if (fds[i].for_read)
{
- struct reader_context_s *ctx = find_reader (fds[i].fd,1);
+ struct reader_context_s *ctx = find_reader (fds[i].fd,0);
if (!ctx)
TRACE_LOG1 ("error: no reader for FD 0x%x (ignored)",
}
else if (fds[i].for_write)
{
- struct writer_context_s *ctx = find_writer (fds[i].fd,1);
+ struct writer_context_s *ctx = find_writer (fds[i].fd,0);
if (!ctx)
TRACE_LOG1 ("error: no writer for FD 0x%x (ignored)",
return TRACE_SYSRES (-1);
}
- rd_ctx = find_reader (fd, 1);
+ rd_ctx = find_reader (fd, 0);
if (rd_ctx)
{
/* No need for locking, as the only races are against the reader
UNLOCK (reader_table_lock);
}
- wt_ctx = find_writer (fd, 1);
+ wt_ctx = find_writer (fd, 0);
if (wt_ctx)
{
/* No need for locking, as the only races are against the writer