aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-04 15:12:21 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-04 15:12:21 +0000
commit8fee5bde3e7fd7655c514d4035d57550fa4e28f2 (patch)
tree837e00605dbe279448496711c11f6b367ee8e811 /src/fs
parentaf252789c772264032750979f5a6b1a23bdce02a (diff)
downloadgnunet-8fee5bde3e7fd7655c514d4035d57550fa4e28f2.tar.gz
gnunet-8fee5bde3e7fd7655c514d4035d57550fa4e28f2.zip
free active on download error
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs_download.c41
-rw-r--r--src/fs/fs_search.c1
-rw-r--r--src/fs/fs_tree.c4
3 files changed, 22 insertions, 24 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 29290756f..c3ab514d9 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -822,6 +822,24 @@ trigger_recursive_download (void *cls,
822 822
823 823
824/** 824/**
825 * Free entries in the map.
826 *
827 * @param cls unused (NULL)
828 * @param key unused
829 * @param entry entry of type "struct DownloadRequest" which is freed
830 * @return GNUNET_OK
831 */
832static int
833free_entry (void *cls,
834 const GNUNET_HashCode *key,
835 void *entry)
836{
837 GNUNET_free (entry);
838 return GNUNET_OK;
839}
840
841
842/**
825 * Iterator over entries in the pending requests in the 'active' map for the 843 * Iterator over entries in the pending requests in the 'active' map for the
826 * reply that we just got. 844 * reply that we just got.
827 * 845 *
@@ -1076,7 +1094,10 @@ process_result_with_request (void *cls,
1076 dc->th = NULL; 1094 dc->th = NULL;
1077 } 1095 }
1078 GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); 1096 GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
1079 /* FIXME: clean up dc->active / pending! */ 1097 GNUNET_CONTAINER_multihashmap_iterate (dc->active,
1098 &free_entry,
1099 NULL);
1100 dc->pending = NULL;
1080 dc->client = NULL; 1101 dc->client = NULL;
1081 GNUNET_free (sm); 1102 GNUNET_free (sm);
1082 GNUNET_FS_download_sync_ (dc); 1103 GNUNET_FS_download_sync_ (dc);
@@ -1387,24 +1408,6 @@ deactivate_fs_download (void *cls)
1387 1408
1388 1409
1389/** 1410/**
1390 * Free entries in the map.
1391 *
1392 * @param cls unused (NULL)
1393 * @param key unused
1394 * @param entry entry of type "struct DownloadRequest" which is freed
1395 * @return GNUNET_OK
1396 */
1397static int
1398free_entry (void *cls,
1399 const GNUNET_HashCode *key,
1400 void *entry)
1401{
1402 GNUNET_free (entry);
1403 return GNUNET_OK;
1404}
1405
1406
1407/**
1408 * Create SUSPEND event for the given download operation 1411 * Create SUSPEND event for the given download operation
1409 * and then clean up our state (without stop signal). 1412 * and then clean up our state (without stop signal).
1410 * 1413 *
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 6c4224d1e..8c324252f 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -24,7 +24,6 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 * 25 *
26 * TODO: 26 * TODO:
27 * - centralize code that sprintf's the 'pbuf[32]' strings
28 * - add support for pushing "already seen" information 27 * - add support for pushing "already seen" information
29 * to FS service for bloomfilter (can wait) 28 * to FS service for bloomfilter (can wait)
30 */ 29 */
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index c8cb8bab0..713594c45 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -23,10 +23,6 @@
23 * @see http://gnunet.org/encoding.php3 23 * @see http://gnunet.org/encoding.php3
24 * @author Krista Bennett 24 * @author Krista Bennett
25 * @author Christian Grothoff 25 * @author Christian Grothoff
26 *
27 * TODO:
28 * - decide if this API should be made public (gnunet_fs_service.h)
29 * or remain "internal" (but with exported symbols?)
30 */ 26 */
31#include "platform.h" 27#include "platform.h"
32#include "fs_tree.h" 28#include "fs_tree.h"