diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-15 18:53:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-15 18:53:41 +0000 |
commit | a8b91d0bcb4a97b20a838f2007249cf37f0f22d8 (patch) | |
tree | d9200cee5b17aeb977235177bec4821e00b4f727 /src/hostlist/hostlist-client.c | |
parent | 1122dc4f084dafd390a81eda0b8739d873229202 (diff) | |
download | gnunet-a8b91d0bcb4a97b20a838f2007249cf37f0f22d8.tar.gz gnunet-a8b91d0bcb4a97b20a838f2007249cf37f0f22d8.zip |
fix
Diffstat (limited to 'src/hostlist/hostlist-client.c')
-rw-r--r-- | src/hostlist/hostlist-client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index fc100a84c..8e6850d7e 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c | |||
@@ -1049,9 +1049,10 @@ load_hostlist_file () | |||
1049 | (GNUNET_OK == GNUNET_BIO_read_int64 (rh, &created)) && | 1049 | (GNUNET_OK == GNUNET_BIO_read_int64 (rh, &created)) && |
1050 | (GNUNET_OK == GNUNET_BIO_read_int32 (rh, &hellos_returned)) ) | 1050 | (GNUNET_OK == GNUNET_BIO_read_int32 (rh, &hellos_returned)) ) |
1051 | { | 1051 | { |
1052 | hostlist = GNUNET_malloc ( sizeof (struct Hostlist)); | 1052 | hostlist = GNUNET_malloc (sizeof (struct Hostlist) + strlen (uri) + 1); |
1053 | hostlist->hello_count = hellos_returned; | 1053 | hostlist->hello_count = hellos_returned; |
1054 | strcpy(hostlist->hostlist_uri, uri); | 1054 | hostlist->hostlist_uri = (const char *) &hostlist[1]; |
1055 | memcpy (&hostlist[1], uri, strlen(uri)+1); | ||
1055 | hostlist->quality = quality; | 1056 | hostlist->quality = quality; |
1056 | hostlist->time_creation.value = created; | 1057 | hostlist->time_creation.value = created; |
1057 | hostlist->time_last_usage.value = last_used; | 1058 | hostlist->time_last_usage.value = last_used; |