Made gpgme_cancel work - at least a little bit.
This commit is contained in:
parent
6e9b15d7ed
commit
1316aed172
@ -113,6 +113,8 @@ _gpgme_release_result ( GpgmeCtx c )
|
||||
void
|
||||
gpgme_cancel (GpgmeCtx c)
|
||||
{
|
||||
return_if_fail (c);
|
||||
|
||||
c->cancel = 1;
|
||||
}
|
||||
|
||||
|
@ -638,7 +638,7 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds )
|
||||
count++;
|
||||
}
|
||||
}
|
||||
code = WaitForMultipleObjects ( nwait, waitbuf, 0, any_write? 0:1000);
|
||||
code = WaitForMultipleObjects ( nwait, waitbuf, 0, any_write? 200:1000);
|
||||
if ( code >= WAIT_OBJECT_0 && code < WAIT_OBJECT_0 + nwait ) {
|
||||
/* This WFMO is a really silly function: It does return either
|
||||
* the index of the signaled object or if 2 objects have been
|
||||
|
@ -213,7 +213,8 @@ _gpgme_wait_on_condition ( GpgmeCtx c, int hang, volatile int *cond )
|
||||
}
|
||||
if (hang)
|
||||
run_idle ();
|
||||
} while (hang);
|
||||
} while (hang && !c->cancel );
|
||||
c->cancel = 0; /* fixme: fix all functions, to return a cancel error */
|
||||
return c;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user