1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

The big Assuan error code removal.

This commit is contained in:
Werner Koch 2006-09-06 16:35:52 +00:00
parent 7b9fa9da99
commit eef036df23
54 changed files with 671 additions and 603 deletions

View file

@ -1,3 +1,9 @@
2006-09-06 Werner Koch <wk@g10code.com>
* maperror.c: Removed.
* util.h (out_of_core): New.
2006-09-04 Werner Koch <wk@g10code.com>
* http.c (http_get_header): New.

View file

@ -34,7 +34,6 @@ libcommon_a_SOURCES = \
keyserver.h \
sexp-parse.h \
sexputil.c \
maperror.c \
sysutils.c sysutils.h \
homedir.c \
gettime.c \

View file

@ -47,10 +47,7 @@ send_one_option (assuan_context_t ctx, gpg_err_source_t errsource,
err = gpg_error_from_errno (errno);
else
{
assuan_error_t ae;
ae = assuan_transact (ctx, optstr, NULL, NULL, NULL, NULL, NULL, NULL);
err = ae? map_assuan_err_with_source (errsource, ae) : 0;
err = assuan_transact (ctx, optstr, NULL, NULL, NULL, NULL, NULL, NULL);
free (optstr);
}

View file

@ -19,6 +19,8 @@
* USA.
*/
#error This file is not anymore used.
#include <config.h>
#include <errno.h>
#include <stdio.h>
@ -33,6 +35,7 @@
#include "errors.h"
/* Map Assuan error code ERR to an GPG_ERR_ code. We need to
distinguish between genuine (and legacy) Assuan error codes and
application error codes shared with all GnuPG modules. The rule is

View file

@ -24,7 +24,8 @@
#include <gcrypt.h> /* We need this for the memory function protos. */
#include <time.h> /* We need time_t. */
#include <gpg-error.h> /* we need gpg-error_t. */
#include <errno.h> /* We need errno. */
#include <gpg-error.h> /* We need gpg_error_t. */
/* Common GNUlib includes (-I ../gl/). */
#include "strpbrk.h"
@ -64,17 +65,22 @@
#define xmalloc_clear(a) gcry_xcalloc (1, (a))
#define xmalloc_secure_clear(a) gcry_xcalloc_secure (1, (a))
/* Convenience function to return a gpg-error code for memory
allocation failures. This function makes sure that an error will
be returned even if accidently ERRNO is not set. */
static inline gpg_error_t
out_of_core (void)
{
return gpg_error (errno
? gpg_err_code_from_errno(errno)
: GPG_ERR_MISSING_ERRNO);
}
/* A type to hold the ISO time. Note that this this is the same as
the the KSBA type ksba_isotime_t. */
typedef char gnupg_isotime_t[16];
/*-- maperror.c --*/
int map_kbx_err (int err);
gpg_error_t map_assuan_err_with_source (int source, int err);
int map_to_assuan_status (int rc);
/*-- gettime.c --*/
time_t gnupg_get_time (void);
void gnupg_get_isotime (gnupg_isotime_t timebuf);