<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src, branch wk/new-wait</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=wk%2Fnew-wait</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=wk%2Fnew-wait'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2019-06-14T11:53:43Z</updated>
<entry>
<title>core: Make the refactored user event loop work.</title>
<updated>2019-06-14T11:53:43Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-14T11:53:43Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=b2749d77da7d55992ee7811b3a86ef031f91b7ce'/>
<id>urn:sha1:b2749d77da7d55992ee7811b3a86ef031f91b7ce</id>
<content type='text'>
* src/wait.c (user_io_cb_handler): Set FD signaled.
--

With this patch the regression test suite now passes.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Make the refactored global wait work.</title>
<updated>2019-06-14T09:10:40Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-14T09:10:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=0378250846b77e3d5d14ac55f98d7e83bd621df9'/>
<id>urn:sha1:0378250846b77e3d5d14ac55f98d7e83bd621df9</id>
<content type='text'>
* src/fdtable.h (FDTABLE_FLAG_NOT_DONE): New flag.
* src/fdtable.c (_gpgme_fdtable_io_cb_count): Rename to ...
(_gpgme_fdtable_get_count): this and add arg 'flags'.
(_gpgme_fdtable_run_io_cbs): Add return arg 'r_owner'.
* src/wait.c (gpgme_wait_ext): Improve tracing.  Act upon error codes
from running the callbacks.
* tests/gpg/t-wait.c (main): Remove the sleep.
--

Now t-wait works again.  There are still problems with the user
defined events but it is another step in our refactoring work.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Use a better name for the internal synchronous wait.</title>
<updated>2019-06-14T08:16:06Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-14T08:12:56Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=153f1128f81a934868a4175e73342b1adb9a969e'/>
<id>urn:sha1:153f1128f81a934868a4175e73342b1adb9a969e</id>
<content type='text'>
* src/wait.c (_gpgme_wait_on_condition): Rename to ...
(_gpgme_sync_wait): this.  Small code refactoring.
(_gpgme_wait_one, _gpgme_wait_one_ext): Remove and change all callers
to use _gpgme_sync_wait.

* src/fdtable.c (_gpgme_fdtable_run_io_cbs): Move TRACE up.
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Refactor the wait code utilizing the new fdtable.</title>
<updated>2019-06-13T06:40:33Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-13T06:40:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=28e620fa169dcbfc2301ae9bea58ebe3ccc3504a'/>
<id>urn:sha1:28e620fa169dcbfc2301ae9bea58ebe3ccc3504a</id>
<content type='text'>
* 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 &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Use fully correct command args for gpg --verify.</title>
<updated>2019-06-12T10:54:11Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-12T10:54:11Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=ef50bffc710300eb6445d1fde790f57f74668b49'/>
<id>urn:sha1:ef50bffc710300eb6445d1fde790f57f74668b49</id>
<content type='text'>
* src/engine-gpg.c (gpg_verify): Supply --verify for fixed gpg
versions.
--

With 2.1.something we print a warning if no explict command was
given.  Since 2.1.16 this has been fixed to also allow the combination
of --verify and --output.  Thus we now always use "--verify".

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: At debug levels up to 9 print only an ascii dump.</title>
<updated>2019-06-12T10:31:44Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-12T10:31:44Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=3b32f7a97f974f552483f58a56e3032055d8dd28'/>
<id>urn:sha1:3b32f7a97f974f552483f58a56e3032055d8dd28</id>
<content type='text'>
* src/debug.c (_gpgme_debug_buffer): Switch between two output
formats.
--

The new format is much more practical than the bunch of hex digits
followed by just 16 ascii chars.  To get the old behaviour use a debug
level of 10.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Improve code by using strconcat at two places.</title>
<updated>2019-06-12T08:50:35Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-12T08:05:17Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=2a3cdb3e819d5ff6da5e7839440c5ad91ca6d61b'/>
<id>urn:sha1:2a3cdb3e819d5ff6da5e7839440c5ad91ca6d61b</id>
<content type='text'>
* src/engine-gpgsm.c (gpgsm_export): Use _gpgme_strconcat.
(gpgsm_keylist): Ditto.
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Link all context objects and add _gpgme_get_ctx.</title>
<updated>2019-06-12T08:50:30Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-12T08:49:34Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5cfdf878fbc60328bbbc0b0c302a85dea679ad81'/>
<id>urn:sha1:5cfdf878fbc60328bbbc0b0c302a85dea679ad81</id>
<content type='text'>
* src/context.h (struct gpgme_context): Add field 'next_ctx'.
* src/gpgme.c (def_lc_lock): Replace by ...
(context_list_lock): new.
(context_list): New variable.
(gpgme_new): Add new context object to the list.
(gpgme_release): Remove context object from the list.
(_gpgme_get_ctx): New function.
--

To allow mapping a context serial number back to a context object and
to check whether a serialno has still a context object, we need to
link them all together.  We already take a lock to setup the locale
and thus the only overhead is in freeing the context.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Introduce a context serial number.</title>
<updated>2019-06-07T10:10:40Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-07T10:10:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=92883efe7176c2022e25e913c1d2f40c35a0754a'/>
<id>urn:sha1:92883efe7176c2022e25e913c1d2f40c35a0754a</id>
<content type='text'>
* src/context.h: Include stdint.h.
(struct gpgme_context): Add field 'serial'.
(CTXSERIAL): New.
* src/gpgme.c: (last_ctx_serial): New.
(gpgme_new): Set serial.

* src/gpgme.c: Change trace calls to use the serial.
* src/wait.c (_gpgme_add_io_cb): Ditto
(_gpgme_remove_io_cb): Ditto.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Replace the posix close notify mechanism by a new generic one.</title>
<updated>2019-06-07T09:17:53Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-06-07T09:17:53Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=52d8ed8dfb91a2b302c20bee27e9a28b7cb6a518'/>
<id>urn:sha1:52d8ed8dfb91a2b302c20bee27e9a28b7cb6a518</id>
<content type='text'>
* src/fdtable.c, src/fdtable.h: New.
* src/posix-io.c (notify_table_item_s): Remove.
(notify_table, notify_table_size, notify_table_lock): Remove.
(_gpgme_io_pipe): Put new fds into the table.
(_gpgme_io_dup): Ditto.
(_gpgme_io_close): Replace notify stuff by a call to the fdtable.
(_gpgme_io_set_close_notify): Remove.  Change all callers to to use
_gpgme_fdtable_add_close_notify.
* src/Makefile.am (main_sources): Add new files.
--

This is the first part or a larger change to unify the tracking of
file descriptors.  Right now this has only been implemented for
Posix and thus the code will not yet build for Windows.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
</feed>
