aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-08 09:20:41 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-08 09:20:41 +0000
commit53ad591c48993023756180abc724622b17331acc (patch)
tree901335a297692ce083f327dbb236e73581c2e6e0
parentfc7c9cc1cb89c536961b330e1180de69f6eb3358 (diff)
downloadgnunet-53ad591c48993023756180abc724622b17331acc.tar.gz
gnunet-53ad591c48993023756180abc724622b17331acc.zip
misc fixes
-rw-r--r--TODO4
-rw-r--r--src/datastore/datastore.h2
-rw-r--r--src/datastore/datastore_api.c4
-rw-r--r--src/fs/fs_unindex.c13
-rw-r--r--src/fs/test_fs_unindex_persistence.c16
5 files changed, 28 insertions, 11 deletions
diff --git a/TODO b/TODO
index 905d6a060..369528688 100644
--- a/TODO
+++ b/TODO
@@ -20,12 +20,10 @@
20* GNUNET-GTK: [CG] 20* GNUNET-GTK: [CG]
21 - bugs: 21 - bugs:
22 + handle 'lost parent' case for recursive downloads (need to move children!) 22 + handle 'lost parent' case for recursive downloads (need to move children!)
23 + clean up TreeStores in main_window_file_publish on dialog close
24 + clean up ListStores in main_window_adv_pseudonym
25 23
260.9.0pre3: 240.9.0pre3:
27* Determine RC bugs and fix those! 25* Determine RC bugs and fix those!
28* DATASTORE: [NN] 26* DATASTORE: [LT]
29 - GNUNET_DATASTORE_cancel method not tested [LT] 27 - GNUNET_DATASTORE_cancel method not tested [LT]
30* TESTING: [Nate] 28* TESTING: [Nate]
31 - test basic peer re-configure 29 - test basic peer re-configure
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h
index aa2646c0a..f827f8766 100644
--- a/src/datastore/datastore.h
+++ b/src/datastore/datastore.h
@@ -27,7 +27,7 @@
27#ifndef DATASTORE_H 27#ifndef DATASTORE_H
28#define DATASTORE_H 28#define DATASTORE_H
29 29
30#define DEBUG_DATASTORE GNUNET_NO 30#define DEBUG_DATASTORE GNUNET_YES
31 31
32#include "gnunet_util_lib.h" 32#include "gnunet_util_lib.h"
33 33
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index aaad7118f..21675b0b7 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -682,11 +682,11 @@ process_status_message (void *cls,
682 if (msg == NULL) 682 if (msg == NULL)
683 { 683 {
684 free_queue_entry (qe); 684 free_queue_entry (qe);
685 if (NULL == h->client)
686 return; /* forced disconnect */
685 rc.cont (rc.cont_cls, 687 rc.cont (rc.cont_cls,
686 GNUNET_SYSERR, 688 GNUNET_SYSERR,
687 _("Failed to receive response from database.")); 689 _("Failed to receive response from database."));
688 if (NULL == h->client)
689 return; /* forced disconnect */
690 if (was_transmitted == GNUNET_YES) 690 if (was_transmitted == GNUNET_YES)
691 do_disconnect (h); 691 do_disconnect (h);
692 return; 692 return;
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index 38e1073f0..375b833fb 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -31,6 +31,7 @@
31#include "fs.h" 31#include "fs.h"
32#include "fs_tree.h" 32#include "fs_tree.h"
33 33
34#define DEBUG_UNINDEX GNUNET_NO
34 35
35/** 36/**
36 * Function called by the tree encoder to obtain 37 * Function called by the tree encoder to obtain
@@ -172,6 +173,10 @@ process_cont (void *cls,
172 signal_unindex_error (uc); 173 signal_unindex_error (uc);
173 return; 174 return;
174 } 175 }
176#if DEBUG_UNINDEX
177 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
178 "Datastore REMOVE operation succeeded\n");
179#endif
175 GNUNET_FS_tree_encoder_next (uc->tc); 180 GNUNET_FS_tree_encoder_next (uc->tc);
176} 181}
177 182
@@ -214,6 +219,10 @@ unindex_process (void *cls,
214 odb.file_id = uc->file_id; 219 odb.file_id = uc->file_id;
215 data = &odb; 220 data = &odb;
216 } 221 }
222#if DEBUG_UNINDEX
223 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
224 "Sending REMOVE request to DATASTORE service\n");
225#endif
217 GNUNET_DATASTORE_remove (uc->dsh, 226 GNUNET_DATASTORE_remove (uc->dsh,
218 query, 227 query,
219 size, 228 size,
@@ -320,6 +329,10 @@ unindex_finish (void *cls,
320 signal_unindex_error (uc); 329 signal_unindex_error (uc);
321 return; 330 return;
322 } 331 }
332#if DEBUG_UNINDEX
333 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
334 "Sending UNINDEX message to FS service\n");
335#endif
323 req.header.size = htons (sizeof (struct UnindexMessage)); 336 req.header.size = htons (sizeof (struct UnindexMessage));
324 req.header.type = htons (GNUNET_MESSAGE_TYPE_FS_UNINDEX); 337 req.header.type = htons (GNUNET_MESSAGE_TYPE_FS_UNINDEX);
325 req.reserved = 0; 338 req.reserved = 0;
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c
index 43d03fcb6..3483b7e09 100644
--- a/src/fs/test_fs_unindex_persistence.c
+++ b/src/fs/test_fs_unindex_persistence.c
@@ -84,11 +84,17 @@ static void
84abort_unindex_task (void *cls, 84abort_unindex_task (void *cls,
85 const struct GNUNET_SCHEDULER_TaskContext *tc) 85 const struct GNUNET_SCHEDULER_TaskContext *tc)
86{ 86{
87 GNUNET_FS_unindex_stop (unindex); 87 if (unindex != NULL)
88 unindex = NULL; 88 {
89 GNUNET_DISK_directory_remove (fn); 89 GNUNET_FS_unindex_stop (unindex);
90 GNUNET_free (fn); 90 unindex = NULL;
91 fn = NULL; 91 }
92 if (fn != NULL)
93 {
94 GNUNET_DISK_directory_remove (fn);
95 GNUNET_free (fn);
96 fn = NULL;
97 }
92} 98}
93 99
94 100