aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-11-08 21:04:18 +0000
committerChristian Grothoff <christian@grothoff.org>2009-11-08 21:04:18 +0000
commit74ae43d6c88f18a795ee9e5aee6a7e211e6ba964 (patch)
tree9b8bd0a701a78e0888d6095d289793810c648794 /src/fs
parent423523a8c32a35988f83dda2c3c362178e7e0c2f (diff)
downloadgnunet-74ae43d6c88f18a795ee9e5aee6a7e211e6ba964.tar.gz
gnunet-74ae43d6c88f18a795ee9e5aee6a7e211e6ba964.zip
reducing leaks, fixing shutdown bug, increasing timeouts
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs_file_information.c7
-rw-r--r--src/fs/fs_tree.c11
-rw-r--r--src/fs/test_fs_download.c2
-rw-r--r--src/fs/test_fs_list_indexed.c2
-rw-r--r--src/fs/test_fs_publish.c2
-rw-r--r--src/fs/test_fs_search.c2
-rw-r--r--src/fs/test_fs_unindex.c2
7 files changed, 21 insertions, 7 deletions
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c
index 2f8bbbdc9..c28635198 100644
--- a/src/fs/fs_file_information.c
+++ b/src/fs/fs_file_information.c
@@ -32,6 +32,7 @@
32#include <extractor.h> 32#include <extractor.h>
33#include "gnunet_fs_service.h" 33#include "gnunet_fs_service.h"
34#include "fs.h" 34#include "fs.h"
35#include "fs_tree.h"
35 36
36 37
37/** 38/**
@@ -849,6 +850,12 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
849 GNUNET_FS_uri_destroy (fi->keywords); 850 GNUNET_FS_uri_destroy (fi->keywords);
850 GNUNET_CONTAINER_meta_data_destroy (fi->meta); 851 GNUNET_CONTAINER_meta_data_destroy (fi->meta);
851 GNUNET_free_non_null (fi->serialization); 852 GNUNET_free_non_null (fi->serialization);
853 if (fi->te != NULL)
854 {
855 GNUNET_FS_tree_encoder_finish (fi->te,
856 NULL, NULL);
857 fi->te = NULL;
858 }
852 GNUNET_free (fi); 859 GNUNET_free (fi);
853} 860}
854 861
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index 4d15d78f3..07f78eea7 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -385,8 +385,15 @@ void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder * te,
385 struct GNUNET_FS_Uri **uri, 385 struct GNUNET_FS_Uri **uri,
386 char **emsg) 386 char **emsg)
387{ 387{
388 *uri = te->uri; 388 if (uri != NULL)
389 *emsg = te->emsg; 389 *uri = te->uri;
390 else
391 if (NULL != te->uri)
392 GNUNET_FS_uri_destroy (te->uri);
393 if (emsg != NULL)
394 *emsg = te->emsg;
395 else
396 GNUNET_free_non_null (te->emsg);
390 GNUNET_free (te->chk_tree); 397 GNUNET_free (te->chk_tree);
391 GNUNET_free (te); 398 GNUNET_free (te);
392} 399}
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c
index f3ecfaba0..4b940e8dc 100644
--- a/src/fs/test_fs_download.c
+++ b/src/fs/test_fs_download.c
@@ -41,7 +41,7 @@
41/** 41/**
42 * How long until we give up on transmitting the message? 42 * How long until we give up on transmitting the message?
43 */ 43 */
44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) 44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
45 45
46/** 46/**
47 * How long should our test-content live? 47 * How long should our test-content live?
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c
index f9225e3ce..ba0906c81 100644
--- a/src/fs/test_fs_list_indexed.c
+++ b/src/fs/test_fs_list_indexed.c
@@ -45,7 +45,7 @@
45/** 45/**
46 * How long until we give up on transmitting the message? 46 * How long until we give up on transmitting the message?
47 */ 47 */
48#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) 48#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
49 49
50/** 50/**
51 * How long should our test-content live? 51 * How long should our test-content live?
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c
index a7bcd48d9..46a2dc3da 100644
--- a/src/fs/test_fs_publish.c
+++ b/src/fs/test_fs_publish.c
@@ -42,7 +42,7 @@
42/** 42/**
43 * How long until we give up on transmitting the message? 43 * How long until we give up on transmitting the message?
44 */ 44 */
45#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) 45#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
46 46
47/** 47/**
48 * How long should our test-content live? 48 * How long should our test-content live?
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c
index e0961c4a7..2ef323317 100644
--- a/src/fs/test_fs_search.c
+++ b/src/fs/test_fs_search.c
@@ -41,7 +41,7 @@
41/** 41/**
42 * How long until we give up on transmitting the message? 42 * How long until we give up on transmitting the message?
43 */ 43 */
44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) 44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
45 45
46/** 46/**
47 * How long should our test-content live? 47 * How long should our test-content live?
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c
index af9db7400..4c751c9a6 100644
--- a/src/fs/test_fs_unindex.c
+++ b/src/fs/test_fs_unindex.c
@@ -41,7 +41,7 @@
41/** 41/**
42 * How long until we give up on transmitting the message? 42 * How long until we give up on transmitting the message?
43 */ 43 */
44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) 44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
45 45
46/** 46/**
47 * How long should our test-content live? 47 * How long should our test-content live?