2002-08-29 Marcus Brinkmann <marcus@g10code.de>
* passphrase.c (_gpgme_passphrase_status_handler): Reset CTX->result.passphrase->no_passphrase if passphrase is given (good or bad). Submitted by Jean DIRAISON <jean.diraison@free.fr>.
This commit is contained in:
parent
61aa194762
commit
f01df10760
@ -1,3 +1,9 @@
|
||||
2002-08-29 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* passphrase.c (_gpgme_passphrase_status_handler): Reset
|
||||
CTX->result.passphrase->no_passphrase if passphrase is given (good
|
||||
or bad). Submitted by Jean DIRAISON <jean.diraison@free.fr>.
|
||||
|
||||
2002-08-28 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* posix-io.c (_gpgme_io_spawn): Use a double-fork approach.
|
||||
|
@ -68,10 +68,12 @@ _gpgme_passphrase_status_handler (GpgmeCtx ctx, GpgmeStatusCode code, char *args
|
||||
|
||||
case GPGME_STATUS_BAD_PASSPHRASE:
|
||||
ctx->result.passphrase->bad_passphrase++;
|
||||
ctx->result.passphrase->no_passphrase = 0;
|
||||
break;
|
||||
|
||||
case GPGME_STATUS_GOOD_PASSPHRASE:
|
||||
ctx->result.passphrase->bad_passphrase = 0;
|
||||
ctx->result.passphrase->no_passphrase = 0;
|
||||
break;
|
||||
|
||||
case GPGME_STATUS_NEED_PASSPHRASE:
|
||||
|
@ -26,6 +26,19 @@ Boston, MA 02111-1307, USA. */
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
#ifndef va_copy
|
||||
#if defined (__GNUC__) && defined (__PPC__) \
|
||||
&& (defined (_CALL_SYSV) || defined (_WIN32))
|
||||
#define va_copy(d, s) (*(d) = *(s))
|
||||
#elif defined (MUST_COPY_VA_BYVAL)
|
||||
#define va_copy(d, s) ((d) = (s))
|
||||
#else
|
||||
#define va_copy(d, s) memcpy ((d), (s), sizeof (va_list))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TEST
|
||||
int global_total_width;
|
||||
#endif
|
||||
@ -44,8 +57,7 @@ int_vasprintf (result, format, args)
|
||||
int total_width = strlen (format) + 1;
|
||||
va_list ap;
|
||||
|
||||
/* FIXME: use va_copy() */
|
||||
memcpy (&ap, args, sizeof (va_list));
|
||||
va_copy (ap, *args);
|
||||
|
||||
while (*p != '\0')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user