aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_remove.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-02 11:40:00 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-02 11:40:00 +0000
commit88652b999ab006d0e863234395415edcbcddfbfe (patch)
treed470e8786ab77715f19056e3a109962c556890ab /src/namestore/test_namestore_api_remove.c
parent9200ed3857ac29d11d4947c5eb231e9e3ee5ecfc (diff)
downloadgnunet-88652b999ab006d0e863234395415edcbcddfbfe.tar.gz
gnunet-88652b999ab006d0e863234395415edcbcddfbfe.zip
-delete does not work in the strong sense due to caching of the encrypted blocks, adjusting tests to reflect this
Diffstat (limited to 'src/namestore/test_namestore_api_remove.c')
-rw-r--r--src/namestore/test_namestore_api_remove.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c
index 4c83cda63..568a0cd8b 100644
--- a/src/namestore/test_namestore_api_remove.c
+++ b/src/namestore/test_namestore_api_remove.c
@@ -94,16 +94,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
94 res = 0; 94 res = 0;
95} 95}
96 96
97static void
98name_lookup_proc (void *cls, const struct GNUNET_NAMESTORE_Block *block);
99
100 97
101static void 98static void
102remove_cont (void *cls, 99remove_cont (void *cls,
103 int32_t success, 100 int32_t success,
104 const char *emsg) 101 const char *emsg)
105{ 102{
106 const char *name = cls;
107 if (GNUNET_YES != success) 103 if (GNUNET_YES != success)
108 { 104 {
109 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 105 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -113,23 +109,12 @@ remove_cont (void *cls,
113 endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL); 109 endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
114 return; 110 return;
115 } 111 }
116
117 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 112 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
118 "Records were removed, perform lookup\n"); 113 "Records were removed, perform lookup\n");
119
120 removed = GNUNET_YES; 114 removed = GNUNET_YES;
121 nsqe = GNUNET_NAMESTORE_lookup_block (nsh, &derived_hash, 115 if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
122 &name_lookup_proc, (void *) name); 116 GNUNET_SCHEDULER_cancel (endbadly_task);
123 if (NULL == nsqe) 117 GNUNET_SCHEDULER_add_now (&end, NULL);
124 {
125 GNUNET_break (0);
126 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
127 _("Namestore cannot perform lookup for removed record\n"));
128 if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
129 GNUNET_SCHEDULER_cancel (endbadly_task);
130 endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
131 return;
132 }
133} 118}
134 119
135 120