aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/hostlist-client.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-04-16 15:57:19 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-04-16 15:57:19 +0000
commit28115ddf012cb57b6c7e76cf5d48ef640caf73b2 (patch)
tree0b871b345d61ed1f4aeac02a95d99ecb46f4b014 /src/hostlist/hostlist-client.c
parent78c6654d9807e45719d5de73bf42e664e40e7efa (diff)
downloadgnunet-28115ddf012cb57b6c7e76cf5d48ef640caf73b2.tar.gz
gnunet-28115ddf012cb57b6c7e76cf5d48ef640caf73b2.zip
Diffstat (limited to 'src/hostlist/hostlist-client.c')
-rw-r--r--src/hostlist/hostlist-client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c
index ecdd578af..181f9da14 100644
--- a/src/hostlist/hostlist-client.c
+++ b/src/hostlist/hostlist-client.c
@@ -1053,7 +1053,7 @@ load_hostlist_file ()
1053 return; 1053 return;
1054 } 1054 }
1055 1055
1056 1056 counter = 0;
1057 while ( (GNUNET_OK == GNUNET_BIO_read_string (rh, "url" , &uri, MAX_URL_LEN)) && 1057 while ( (GNUNET_OK == GNUNET_BIO_read_string (rh, "url" , &uri, MAX_URL_LEN)) &&
1058 (GNUNET_OK == GNUNET_BIO_read_int32 (rh, &times_used)) && 1058 (GNUNET_OK == GNUNET_BIO_read_int32 (rh, &times_used)) &&
1059 (GNUNET_OK == GNUNET_BIO_read_int64 (rh, &quality)) && 1059 (GNUNET_OK == GNUNET_BIO_read_int64 (rh, &quality)) &&
@@ -1072,6 +1072,7 @@ load_hostlist_file ()
1072 linked_list_size++; 1072 linked_list_size++;
1073 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1073 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1074 "Added hostlist entry eith URI `%s' \n", hostlist->hostlist_uri); 1074 "Added hostlist entry eith URI `%s' \n", hostlist->hostlist_uri);
1075 GNUNET_free (uri);
1075 uri = NULL; 1076 uri = NULL;
1076 counter++; 1077 counter++;
1077 if ( counter >= MAX_NUMBER_HOSTLISTS ) break; 1078 if ( counter >= MAX_NUMBER_HOSTLISTS ) break;
@@ -1114,6 +1115,7 @@ static void save_hostlist_file ( int shutdown )
1114 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1115 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1115 _("No `%s' specified in `%s' configuration, cannot save hostlists to file.\n"), 1116 _("No `%s' specified in `%s' configuration, cannot save hostlists to file.\n"),
1116 "HOSTLISTFILE", "HOSTLIST"); 1117 "HOSTLISTFILE", "HOSTLIST");
1118 GNUNET_free (filename);
1117 return; 1119 return;
1118 } 1120 }
1119 wh = GNUNET_BIO_write_open (filename); 1121 wh = GNUNET_BIO_write_open (filename);
@@ -1123,6 +1125,7 @@ static void save_hostlist_file ( int shutdown )
1123 _("Could not open file `%s' for writing to save hostlists: %s\n"), 1125 _("Could not open file `%s' for writing to save hostlists: %s\n"),
1124 filename, 1126 filename,
1125 STRERROR (errno)); 1127 STRERROR (errno));
1128 GNUNET_free (filename);
1126 return; 1129 return;
1127 } 1130 }
1128 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1131 GNUNET_log (GNUNET_ERROR_TYPE_INFO,