aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-09 15:57:39 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-09 15:57:39 +0100
commit8f375b3ea7d53dab21a74b6e08b378bcaab69187 (patch)
tree7756eab549741765e82640161f94fe8b79f89450 /src
parent3039adb9578b01b3649c5c8ae5f4d6d8f8a7d51d (diff)
downloadgnunet-8f375b3ea7d53dab21a74b6e08b378bcaab69187.tar.gz
gnunet-8f375b3ea7d53dab21a74b6e08b378bcaab69187.zip
use NULL value in load_path_suffix to NOT load any files
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_container_lib.h7
-rw-r--r--src/include/gnunet_pq_lib.h2
-rw-r--r--src/pq/pq_connect.c11
3 files changed, 11 insertions, 9 deletions
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) (
789 * @return NULL on error 789 * @return NULL on error
790 */ 790 */
791struct GNUNET_CONTAINER_MultiHashMap * 791struct GNUNET_CONTAINER_MultiHashMap *
792GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys); 792GNUNET_CONTAINER_multihashmap_create (unsigned int len,
793 int do_not_copy_keys);
793 794
794 795
795/** 796/**
@@ -800,8 +801,8 @@ GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys);
800 * @param map the map 801 * @param map the map
801 */ 802 */
802void 803void
803GNUNET_CONTAINER_multihashmap_destroy ( 804GNUNET_CONTAINER_multihashmap_destroy (struct
804 struct GNUNET_CONTAINER_MultiHashMap *map); 805 GNUNET_CONTAINER_MultiHashMap *map);
805 806
806 807
807/** 808/**
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,
756struct GNUNET_PQ_Context * 756struct GNUNET_PQ_Context *
757GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, 757GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
758 const char *section, 758 const char *section,
759 const char *load_path, 759 const char *load_path_suffix,
760 const struct GNUNET_PQ_ExecuteStatement *es, 760 const struct GNUNET_PQ_ExecuteStatement *es,
761 const struct GNUNET_PQ_PreparedStatement *ps); 761 const struct GNUNET_PQ_PreparedStatement *ps);
762 762
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,
317 conninfo = NULL; 317 conninfo = NULL;
318 load_path = NULL; 318 load_path = NULL;
319 sp = NULL; 319 sp = NULL;
320 if (GNUNET_OK == 320 if ( (NULL != load_path_suffix) &&
321 GNUNET_CONFIGURATION_get_value_filename (cfg, 321 (GNUNET_OK ==
322 section, 322 GNUNET_CONFIGURATION_get_value_filename (cfg,
323 "SQL_DIR", 323 section,
324 &sp)) 324 "SQL_DIR",
325 &sp)) )
325 GNUNET_asprintf (&load_path, 326 GNUNET_asprintf (&load_path,
326 "%s%s", 327 "%s%s",
327 sp, 328 sp,