exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 401745fc302370a983aab7eb347a6ea75b7d1e2e
parent 68a8c36f061853406f93312780162cdf57382d3f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  2 Jun 2015 12:52:05 +0200

-include wallet headers if compiling wallet library

Diffstat:
Msrc/include/taler_util_wallet.h | 1-
Msrc/mintdb/plugin_mintdb_postgres.c | 4++--
Msrc/util/crypto.c | 6++++++
Msrc/util/json.c | 25+++++++++++++++----------
Msrc/util/util.c | 6+++++-
5 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/src/include/taler_util_wallet.h b/src/include/taler_util_wallet.h @@ -20,7 +20,6 @@ */ #ifndef TALER_UTIL_H #define TALER_UTIL_H - #include <gnunet/gnunet_util_taler_wallet_lib.h> #include "taler_amount_lib.h" #include "taler_crypto_lib.h" diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c @@ -165,7 +165,7 @@ postgres_create_tables (void *cls, if (CONNECTION_OK != PQstatus (conn)) { TALER_LOG_ERROR ("Database connection failed: %s\n", - PQerrorMessage (conn)); + PQerrorMessage (conn)); GNUNET_break (0); PQfinish (conn); return GNUNET_SYSERR; @@ -1067,7 +1067,7 @@ postgres_reserves_in_insert (void *cls, if (PGRES_COMMAND_OK != PQresultStatus(result)) { const char *efield; - + efield = PQresultErrorField (result, PG_DIAG_SQLSTATE); if ( (PGRES_FATAL_ERROR == PQresultStatus(result)) && diff --git a/src/util/crypto.c b/src/util/crypto.c @@ -23,7 +23,13 @@ */ #include "platform.h" #include "taler_util.h" + +#if HAVE_GNUNET_GNUNET_UTIL_TALER_WALLET_LIB_H +#include <gnunet/gnunet_util_taler_wallet_lib.h> +#endif +#if HAVE_GNUNET_GNUNET_UTIL_LIB_H #include <gnunet/gnunet_util_lib.h> +#endif #include <gcrypt.h> diff --git a/src/util/json.c b/src/util/json.c @@ -19,7 +19,12 @@ * @author Sree Harsha Totakura <sreeharsha@totakura.in> */ #include "platform.h" +#if HAVE_GNUNET_GNUNET_UTIL_TALER_WALLET_LIB_H +#include <gnunet/gnunet_util_taler_wallet_lib.h> +#endif +#if HAVE_GNUNET_GNUNET_UTIL_LIB_H #include <gnunet/gnunet_util_lib.h> +#endif #include "taler_util.h" /** @@ -155,7 +160,7 @@ TALER_json_from_rsa_public_key (struct GNUNET_CRYPTO_rsa_PublicKey *pk) /** * Convert JSON to RSA public key. * - * @param pk JSON encoding to convert + * @param pk JSON encoding to convert * @return corresponding public key */ struct GNUNET_CRYPTO_rsa_PublicKey * @@ -172,10 +177,10 @@ TALER_json_to_rsa_public_key (json_t *json) len = strlen (enc); buf_len = (len * 5) / 8; buf = GNUNET_malloc (buf_len); - EXITIF (GNUNET_OK != - GNUNET_STRINGS_string_to_data (enc, - len, - buf, + EXITIF (GNUNET_OK != + GNUNET_STRINGS_string_to_data (enc, + len, + buf, buf_len)); EXITIF (NULL == (pk = GNUNET_CRYPTO_rsa_public_key_decode (buf, buf_len))); @@ -190,7 +195,7 @@ TALER_json_to_rsa_public_key (json_t *json) /** * Convert JSON to RSA signature. * - * @param pk JSON encoding to convert + * @param pk JSON encoding to convert * @return corresponding signature */ struct GNUNET_CRYPTO_rsa_Signature * @@ -207,10 +212,10 @@ TALER_json_to_rsa_signature (json_t *json) len = strlen (enc); buf_len = (len * 5) / 8; buf = GNUNET_malloc (buf_len); - EXITIF (GNUNET_OK != - GNUNET_STRINGS_string_to_data (enc, - len, - buf, + EXITIF (GNUNET_OK != + GNUNET_STRINGS_string_to_data (enc, + len, + buf, buf_len)); EXITIF (NULL == (sig = GNUNET_CRYPTO_rsa_signature_decode (buf, buf_len))); diff --git a/src/util/util.c b/src/util/util.c @@ -24,8 +24,12 @@ #include "platform.h" #include "taler_util.h" -#include <gnunet/gnunet_common.h> +#if HAVE_GNUNET_GNUNET_UTIL_TALER_WALLET_LIB_H +#include <gnunet/gnunet_util_taler_wallet_lib.h> +#endif +#if HAVE_GNUNET_GNUNET_UTIL_LIB_H #include <gnunet/gnunet_util_lib.h> +#endif #include <gcrypt.h>