Incorrect gpgme_wait behavior

Igor Belyi gpgme at katehok.ac93.org
Wed Mar 30 01:59:53 CEST 2005


Hello,

gpgme_wait(ctx, &status, 0) on timeout returns ctx instead of NULL which
makes it difficult to distinguish from a program return when ctx in not NULL.
Plus, on timeout status is unchanged instead of being forced into 0.
As a work around I set status to 0xFFFF (an impossible error code)
and check if it got changed during the call.

Attached is a small patch making it to follow the documented way:
returning NULL, status=0 on timeouts
returning NULL, status=<gpgme_wait_error> on gpgme_wait() failure
returning ctx,  status=<async_call_status> on an asynchornous progrem return.

Hope it helps,
Igor


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpgme1.0-gpgme_wait.patch
Type: text/x-patch
Size: 451 bytes
Desc: not available
Url : /pipermail/attachments/20050329/c29020f3/gpgme1.0-gpgme_wait.bin


More information about the Gnupg-devel mailing list