gpgme/src
Werner Koch 28e620fa16
core: Refactor the wait code utilizing the new fdtable.
* src/fdtable.c, src/fdtable.h: Largely extend.
* src/wait-global.c, src/wait-private.c, src/wait-user.c: Remove and
move code to ...
* src/wait.c: here.
(_gpgme_fd_table_init, fd_table_put): Remove.  Do not call them.
(_gpgme_add_io_cb, _gpgme_add_io_cb_user): Change to use the fdtable.
(_gpgme_remove_io_cb, _gpgme_remove_io_cb_user):  Ditto.
(_gpgme_wait_global_event_cb):  Ditto.
(gpgme_wait_ext, _gpgme_wait_on_condition): Ditto.
* src/wait.h (struct io_cb_tag_s): Add fields 'serial' and 'desc'.
Change 'idx' to 'fd'.
(struct fd_table): Remove.
* src/context.h (struct gpgme_context): Remoce 'fdt'.  Rename io_cbs
to user_io_cbs for clarity.
* src/engine-gpgsm.c: Unify trace output.
(start): Pass a description along with the IO handlers.
* src/priv-io.h (struct io_select_fd_s): Rename to io_select_s.
(io_select_t): New.
* src/gpgme.c (_gpgme_cancel_with_err): Replace arg 'ctx' by 'serial'.
(gpgme_cancel): Adjust.
--

This is the second part of a larger refactoring of the wait/event
code.  Does currently only work on Unix and with the private wait
functions (i.e. the async operations don't yet work).

Signed-off-by: Werner Koch <wk@gnupg.org>
2019-06-13 08:40:33 +02:00
..
.gitignore .gitignore: flesh out rules and add subdirectory-.gitignores. 2012-04-20 16:05:11 +02:00
argparse.c spelling: fix misspellings 2018-11-08 12:34:27 +07:00
argparse.h doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
assuan-support.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
ath.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
ath.h w32: Remove all support for WindowsCE 2018-10-31 12:35:14 +01:00
b64dec.c core: Silence newer compiler warnings. 2018-12-17 16:47:27 +01:00
ChangeLog-2011 spelling: fix misspellings 2018-11-08 12:34:27 +07:00
cJSON.c json: Print "nan", "-inf", "inf" if needed. 2019-06-04 10:56:48 +02:00
cJSON.h spelling: fix misspellings 2018-11-08 12:34:27 +07:00
cJSON.readme doc: convert more http:// links to https:// 2018-10-18 00:28:51 -04:00
context.h core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
conversion.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
data-compat.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
data-estream.c core: Protect the trace macros for fun and profit. 2018-11-16 18:17:22 +01:00
data-fd.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
data-identify.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
data-mem.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
data-stream.c core: Protect the trace macros for fun and profit. 2018-11-16 18:17:22 +01:00
data-user.c core: Protect the trace macros for fun and profit. 2018-11-16 18:17:22 +01:00
data.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
data.h spelling: fix misspellings 2018-11-08 12:34:27 +07:00
debug.c core: At debug levels up to 9 print only an ascii dump. 2019-06-12 12:31:44 +02:00
debug.h core: Prettify _gpgme_io_select debug output again and fix TRACE_SYSRES. 2019-06-05 16:48:47 +02:00
decrypt-verify.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
decrypt.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
delete.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
dirinfo.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
edit.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
encrypt-sign.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
encrypt.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
engine-assuan.c core: Replace the posix close notify mechanism by a new generic one. 2019-06-07 11:17:53 +02:00
engine-backend.h core: Replace the posix close notify mechanism by a new generic one. 2019-06-07 11:17:53 +02:00
engine-g13.c core: Replace the posix close notify mechanism by a new generic one. 2019-06-07 11:17:53 +02:00
engine-gpg.c core: Use fully correct command args for gpg --verify. 2019-06-12 12:54:11 +02:00
engine-gpgconf.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
engine-gpgsm.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
engine-spawn.c core: Replace the posix close notify mechanism by a new generic one. 2019-06-07 11:17:53 +02:00
engine-uiserver.c core: Replace the posix close notify mechanism by a new generic one. 2019-06-07 11:17:53 +02:00
engine.c core: Fix error return. 2019-04-19 11:34:12 +09:00
engine.h core: Remove cruft from the engine-gpg code. 2018-06-01 00:13:53 +02:00
error.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
export.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
fdtable.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
fdtable.h core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
genkey.c core: Fix ERR_INV_ARG check in genkey_start 2018-12-07 10:43:58 +01:00
get-env.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
getauditlog.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
gpgconf.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
gpgme-config.in build: Provide gpgme.pc, generated by configure. 2018-11-12 09:03:49 +09:00
gpgme-glib.pc.in build: Provide gpgme-glib.pc too. 2018-11-12 09:59:05 +09:00
gpgme-json.c json: Fix cosmetic error in the repl. 2019-02-28 14:05:06 +01:00
gpgme-tool.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
gpgme-w32spawn.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
gpgme.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
gpgme.def estreams revised 2018-09-08 14:45:37 +10:00
gpgme.h.in Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
gpgme.m4 build: Make gpgme.m4 use gpgrt-config with *.pc. 2018-11-12 10:01:16 +09:00
gpgme.pc.in build: Provide gpgme-glib.pc too. 2018-11-12 09:59:05 +09:00
import.c core: Fix format string errors in trace macros 2018-11-16 16:57:09 +01:00
isascii.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
key.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
keylist.c core: Protect the trace macros for fun and profit. 2018-11-16 18:17:22 +01:00
keysign.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
libgpgme.vers doc: use https:// for www.gnu.org 2018-10-18 00:28:51 -04:00
Makefile.am core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
mbox-util.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
mbox-util.h doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
op-support.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
opassuan.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
ops.h core: Link all context objects and add _gpgme_get_ctx. 2019-06-12 10:50:30 +02:00
parsetlv.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
parsetlv.h Spelling fixes for comments and doc 2017-12-08 05:59:11 +01:00
passphrase.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
passwd.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
posix-io.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
posix-util.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
priv-io.h core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
progress.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
putc_unlocked.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
queryswdb.c core: Fix format string errors in trace macros 2018-11-16 16:57:09 +01:00
sema.h core: Use gpgrt locking for thread safeness 2016-11-10 13:33:13 +01:00
setenv.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
sig-notation.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
sign.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
signers.c core: Protect the trace macros for fun and profit. 2018-11-16 18:17:22 +01:00
spawn.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
status-table.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
stpcpy.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
sys-util.h core,w32: Improve handling of Unicode paths 2019-04-09 13:42:58 +02:00
tofupolicy.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
trust-item.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
trustlist.c core: Fix format string errors in trace macros 2018-11-16 16:57:09 +01:00
ttyname_r.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
util.h w32: Remove all support for WindowsCE 2018-10-31 12:35:14 +01:00
verify.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
version.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
versioninfo.rc.in doc: Update copyright years and change two URLs. 2018-04-18 19:30:50 +02:00
vfs-create.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
vfs-mount.c core: Simplify the trace maros by using variadics. 2018-11-16 16:25:49 +01:00
w32-glib-io.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
w32-io.c core: Replace the posix close notify mechanism by a new generic one. 2019-06-07 11:17:53 +02:00
w32-util.c core: Improve the debug messages even more. 2019-06-05 15:54:55 +02:00
wait.c core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00
wait.h core: Refactor the wait code utilizing the new fdtable. 2019-06-13 08:40:33 +02:00