From: Christian Grothoff Date: Sun, 9 Feb 2020 14:57:39 +0000 (+0100) Subject: use NULL value in load_path_suffix to NOT load any files X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f375b3ea7d53dab21a74b6e08b378bcaab69187;p=oweals%2Fgnunet.git use NULL value in load_path_suffix to NOT load any files --- diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index a119a6632..f3325a064 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -789,7 +789,8 @@ typedef int (*GNUNET_CONTAINER_MulitHashMapIteratorCallback) ( * @return NULL on error */ struct GNUNET_CONTAINER_MultiHashMap * -GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys); +GNUNET_CONTAINER_multihashmap_create (unsigned int len, + int do_not_copy_keys); /** @@ -800,8 +801,8 @@ GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys); * @param map the map */ void -GNUNET_CONTAINER_multihashmap_destroy ( - struct GNUNET_CONTAINER_MultiHashMap *map); +GNUNET_CONTAINER_multihashmap_destroy (struct + GNUNET_CONTAINER_MultiHashMap *map); /** diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index 090e81331..12ec19d7e 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.h @@ -756,7 +756,7 @@ GNUNET_PQ_connect (const char *config_str, struct GNUNET_PQ_Context * GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, - const char *load_path, + const char *load_path_suffix, const struct GNUNET_PQ_ExecuteStatement *es, const struct GNUNET_PQ_PreparedStatement *ps); diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index cc064f48d..6875e9866 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c @@ -317,11 +317,12 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, conninfo = NULL; load_path = NULL; sp = NULL; - if (GNUNET_OK == - GNUNET_CONFIGURATION_get_value_filename (cfg, - section, - "SQL_DIR", - &sp)) + if ( (NULL != load_path_suffix) && + (GNUNET_OK == + GNUNET_CONFIGURATION_get_value_filename (cfg, + section, + "SQL_DIR", + &sp)) ) GNUNET_asprintf (&load_path, "%s%s", sp,