diff options
author | Marcus Brinkmann <[email protected]> | 2007-07-13 00:43:17 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2007-07-13 00:43:17 +0000 |
commit | c4bb93ec28db2bab7e02c5e6c76645a7367bf4b2 (patch) | |
tree | ff1cbba84d64f76fcae49755a36404da8e0a7668 /assuan | |
parent | Fix last change. (diff) | |
download | gpgme-c4bb93ec28db2bab7e02c5e6c76645a7367bf4b2.tar.gz gpgme-c4bb93ec28db2bab7e02c5e6c76645a7367bf4b2.zip |
2007-07-13 Marcus Brinkmann <[email protected]>
* assuan/assuan-io.c (_assuan_simple_read, _assuan_simple_write):
Always use read/write (which means _gpgme_io_read and
_gpgme_io_write).
gpgme/
2007-07-13 Marcus Brinkmann <[email protected]>
* priv-io.h (_gpgme_io_set_close_notify): Change type of HANDLER
to _gpgme_close_notify_handler.
(_gpgme_close_notify_handler): New type.
(_gpgme_io_dup): Remove prototype.
* posix-io.c (notify_table, _gpgme_io_set_close_notify): Change
type of HANDLER to _gpgme_close_notify_handler_t.
(_gpgme_io_close): Do not close the FD if handler returns 0.
(_gpgme_io_dup): Remove function.
* w32-io.c (notify_table, _gpgme_io_set_close_notify,
_gpgme_io_close): Change type of HANDLER to
_gpgme_close_notify_handler_t.
(_gpgme_io_close): Do not close the FD if handler returns 0.
(_gpgme_io_dup): Remove function.
* w32-glib-io.c (_gpgme_io_dup): Remove function.
(_gpgme_io_set_close_notify, notify_table): Change type of HANDLER
to _gpgme_close_notify_handler_t.
(_gpgme_io_close): Do not close the FD if handler returns 0.
* rungpg.c (close_notify_handler): Change return type to int,
return 1.
* engine-gpgsm.c (close_notify_handler): Change return type to
int, return 0 for status FD and 1 for all other FDs.
(start): Do not duplicate the status FD.
Diffstat (limited to 'assuan')
-rw-r--r-- | assuan/README.1st | 8 | ||||
-rw-r--r-- | assuan/assuan-io.c | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/assuan/README.1st b/assuan/README.1st index c755cfec..8e805c39 100644 --- a/assuan/README.1st +++ b/assuan/README.1st @@ -27,7 +27,13 @@ updating this directory, are: We don't need this file as GPGME doesn't use sendmsg and recvmsg. If it would, we would need to pick up the W32 implementation. - Copyright 2004 g10 Code GmbH +* assuan-io.c +** _assuan_simple_read() and _assuan_simple_write() must always use + read()/write() (which actually translates to _gpgme_io_read() and + _gpgme_io_write()). + + + Copyright 2004, 2007 g10 Code GmbH This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without diff --git a/assuan/assuan-io.c b/assuan/assuan-io.c index 066231fb..a7f84492 100644 --- a/assuan/assuan-io.c +++ b/assuan/assuan-io.c @@ -51,7 +51,7 @@ _assuan_waitpid (pid_t pid, int *status, int options) ssize_t _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size) { -#ifdef HAVE_W32_SYSTEM +#if defined(HAVE_W32_SYSTEM) && !defined(_ASSUAN_IN_GPGME_BUILD_ASSUAN) /* Due to the peculiarities of the W32 API we can't use read for a network socket and thus we try to use recv first and fallback to read if recv detects that it is not a network socket. */ @@ -84,7 +84,7 @@ _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size) ssize_t _assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size) { -#ifdef HAVE_W32_SYSTEM +#if defined(HAVE_W32_SYSTEM) && !defined(_ASSUAN_IN_GPGME_BUILD_ASSUAN) /* Due to the peculiarities of the W32 API we can't use write for a network socket and thus we try to use send first and fallback to write if send detects that it is not a network socket. */ |