From 1126181ab98fd7e9e6cca0786939020b161fcb94 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Jan 2020 00:25:55 +0100 Subject: [PATCH] include buffer in main util header --- contrib/build-common | 2 +- src/cadet/gnunet-service-cadet_channel.c | 2 +- src/cadet/gnunet-service-cadet_tunnels.c | 17 +++++------------ src/curl/curl.c | 4 +++- src/gnsrecord/gnsrecord_crypto.c | 2 +- src/include/gnunet_util_lib.h | 1 + 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/contrib/build-common b/contrib/build-common index d81bbfabc..1915a74bb 160000 --- a/contrib/build-common +++ b/contrib/build-common @@ -1 +1 @@ -Subproject commit d81bbfabc2538932f631d3946bd6a9b95182b4f2 +Subproject commit 1915a74bbb4cd2ae9bc541a382dfebc37064a2fd diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index a2c710cbc..5c8103c5e 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c @@ -2026,4 +2026,4 @@ GCCH_debug (struct CadetChannel *ch, enum GNUNET_ErrorType level) } -/* end of gnunet-service-cadet-new_channel.c */ +/* end of gnunet-service-cadet_channel.c */ diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c index a1098d757..ae201ed2d 100644 --- a/src/cadet/gnunet-service-cadet_tunnels.c +++ b/src/cadet/gnunet-service-cadet_tunnels.c @@ -544,29 +544,22 @@ estate2s (enum CadetTunnelEState es) { case CADET_TUNNEL_KEY_UNINITIALIZED: return "CADET_TUNNEL_KEY_UNINITIALIZED"; - case CADET_TUNNEL_KEY_AX_RECV: return "CADET_TUNNEL_KEY_AX_RECV"; - case CADET_TUNNEL_KEY_AX_SENT: return "CADET_TUNNEL_KEY_AX_SENT"; - case CADET_TUNNEL_KEY_AX_SENT_AND_RECV: return "CADET_TUNNEL_KEY_AX_SENT_AND_RECV"; - case CADET_TUNNEL_KEY_AX_AUTH_SENT: return "CADET_TUNNEL_KEY_AX_AUTH_SENT"; - case CADET_TUNNEL_KEY_OK: return "CADET_TUNNEL_KEY_OK"; - - default: - GNUNET_snprintf (buf, - sizeof(buf), - "%u (UNKNOWN STATE)", - es); - return buf; } + GNUNET_snprintf (buf, + sizeof(buf), + "%u (UNKNOWN STATE)", + es); + return buf; } diff --git a/src/curl/curl.c b/src/curl/curl.c index 82eb28ed9..01c7c5fca 100644 --- a/src/curl/curl.c +++ b/src/curl/curl.c @@ -556,7 +556,9 @@ GNUNET_CURL_download_get_result_ (struct GNUNET_CURL_DownloadBuffer *db, } if (0 != db->buf_size) GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Did NOT detect response as JSON\n"); + "Did NOT detect response `%.*s' as JSON\n", + (int) db->buf_size, + (const char *) db->buf); return NULL; } json = NULL; diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c index b27688019..ea8baa77d 100644 --- a/src/gnsrecord/gnsrecord_crypto.c +++ b/src/gnsrecord/gnsrecord_crypto.c @@ -80,7 +80,7 @@ derive_block_aes_key (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, * @param rd_count number of records * @return NULL on error (block too large) */ -struct GNUNET_GNSRECORD_Block * +static struct GNUNET_GNSRECORD_Block * block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey, struct GNUNET_TIME_Absolute expire, diff --git a/src/include/gnunet_util_lib.h b/src/include/gnunet_util_lib.h index 24ad4e4e5..5e790550f 100644 --- a/src/include/gnunet_util_lib.h +++ b/src/include/gnunet_util_lib.h @@ -64,6 +64,7 @@ extern "C" #include "gnunet_crypto_lib.h" #include "gnunet_bandwidth_lib.h" #include "gnunet_bio_lib.h" +#include "gnunet_buffer_lib.h" #include "gnunet_client_lib.h" #include "gnunet_container_lib.h" #include "gnunet_getopt_lib.h" -- 2.25.1