View Issue Details

IDProjectCategoryView StatusLast Update
0001607GNUnethostlist daemonpublic2010-10-21 13:47
Reportervminko Assigned ToMatthias Wachs Due Date
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
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.
Attached Files
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) )
       {

Activities

Matthias Wachs

2010-10-04 08:21

reporter   ~0004126

Bug acknowledged
Commited patch to svn

Matthias Wachs

2010-10-04 08:22

reporter   ~0004127

Applied patch

Issue History

Date ModifiedUsernameFieldChange
2010-10-03 18:35vminkoNew Issue
2010-10-03 18:35vminkoStatusnew => assigned
2010-10-03 18:35vminkoAssigned To => Matthias Wachs
2010-10-03 18:35vminkoFile Added: gnunet-0.9.0pre1_expand-hostlistfile.patch
2010-10-04 08:21Matthias WachsNote Added: 0004126
2010-10-04 08:22Matthias WachsNote Added: 0004127
2010-10-04 08:23Matthias WachsStatusassigned => resolved
2010-10-04 08:23Matthias WachsResolutionopen => fixed
2010-10-21 13:47Christian GrothoffStatusresolved => closed