View Issue Details

IDProjectCategoryView StatusLast Update
0001607GNUnethostlist daemonpublic2010-10-21 15:47
ReportervminkoAssigned ToMatthias Wachs 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001607: Need to $-expand HOSTLISTFILE
DescriptionAccording to the default value of HOSTLISTFILE, it may contain $-variables:

HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data

So its value should be fetched using GNUNET_CONFIGURATION_get_value_filename rather than GNUNET_CONFIGURATION_get_value_string.
Additional InformationProposed fix is attached.
TagsNo tags attached.

Activities

2010-10-03 20:35

 

gnunet-0.9.0pre1_expand-hostlistfile.patch (2,475 bytes)
diff -ur gnunet-0.9.0pre1/src/hostlist/hostlist-client.c gnunet-0.9.0pre1.patched/src/hostlist/hostlist-client.c
--- gnunet-0.9.0pre1/src/hostlist/hostlist-client.c	2010-07-03 00:19:47.000000000 +0400
+++ gnunet-0.9.0pre1.patched/src/hostlist/hostlist-client.c	2010-09-18 15:38:07.000000000 +0400
@@ -1345,10 +1345,10 @@
   uint32_t counter;
 
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (cfg,
-                                             "HOSTLIST",
-                                             "HOSTLISTFILE",
-                                             &filename))
+      GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                               "HOSTLIST",
+                                               "HOSTLISTFILE",
+                                               &filename))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _("No `%s' specified in `%s' configuration, cannot load hostlists from file.\n"),
@@ -1435,10 +1435,10 @@
   uint32_t counter;
 
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (cfg,
-                                             "HOSTLIST",
-                                             "HOSTLISTFILE",
-                                             &filename))
+      GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                               "HOSTLIST",
+                                               "HOSTLISTFILE",
+                                               &filename))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _("No `%s' specified in `%s' configuration, cannot save hostlists to file.\n"),
@@ -1571,10 +1571,10 @@
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               _("Learning is not enabled on this peer\n"));
     *msgh = NULL;
-    if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (cfg,
-                                                            "HOSTLIST",
-                                                            "HOSTLISTFILE",
-                                                            &filename))
+    if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                                              "HOSTLIST",
+                                                              "HOSTLISTFILE",
+                                                              &filename))
     {
     if ( GNUNET_YES == GNUNET_DISK_file_test (filename) )
       {

Matthias Wachs

2010-10-04 10:21

manager   ~0004126

Bug acknowledged
Commited patch to svn

Matthias Wachs

2010-10-04 10:22

manager   ~0004127

Applied patch

Issue History

Date Modified Username Field Change
2010-10-03 20:35 vminko New Issue
2010-10-03 20:35 vminko Status new => assigned
2010-10-03 20:35 vminko Assigned To => Matthias Wachs
2010-10-03 20:35 vminko File Added: gnunet-0.9.0pre1_expand-hostlistfile.patch
2010-10-04 10:21 Matthias Wachs Note Added: 0004126
2010-10-04 10:22 Matthias Wachs Note Added: 0004127
2010-10-04 10:23 Matthias Wachs Status assigned => resolved
2010-10-04 10:23 Matthias Wachs Resolution open => fixed
2010-10-21 15:47 Christian Grothoff Status resolved => closed