diff options
Diffstat (limited to 'src/namestore')
19 files changed, 175 insertions, 197 deletions
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index 8b8d7c60f..4ba178e68 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -237,14 +237,6 @@ test_namestore_api_lookup_shadow_filter_LDADD = \ | |||
237 | $(top_builddir)/src/namecache/libgnunetnamecache.la \ | 237 | $(top_builddir)/src/namecache/libgnunetnamecache.la \ |
238 | $(top_builddir)/src/namestore/libgnunetnamestore.la | 238 | $(top_builddir)/src/namestore/libgnunetnamestore.la |
239 | 239 | ||
240 | test_namestore_api_put_SOURCES = \ | ||
241 | test_namestore_api_put.c | ||
242 | test_namestore_api_put_LDADD = \ | ||
243 | $(top_builddir)/src/testing/libgnunettesting.la \ | ||
244 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
245 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
246 | $(top_builddir)/src/namestore/libgnunetnamestore.la | ||
247 | |||
248 | test_namestore_api_remove_SOURCES = \ | 240 | test_namestore_api_remove_SOURCES = \ |
249 | test_namestore_api_remove.c | 241 | test_namestore_api_remove.c |
250 | test_namestore_api_remove_LDADD = \ | 242 | test_namestore_api_remove_LDADD = \ |
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 034352bd9..a700f3c03 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -266,8 +266,9 @@ handle_record_store_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
266 | const char *emsg; | 266 | const char *emsg; |
267 | 267 | ||
268 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 268 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
269 | "Received `%s'\n", | 269 | "Received `%s' with result %i\n", |
270 | "RECORD_STORE_RESPONSE"); | 270 | "RECORD_STORE_RESPONSE", |
271 | ntohl (msg->op_result)); | ||
271 | /* TODO: add actual error message from namestore to response... */ | 272 | /* TODO: add actual error message from namestore to response... */ |
272 | res = ntohl (msg->op_result); | 273 | res = ntohl (msg->op_result); |
273 | if (GNUNET_SYSERR == res) | 274 | if (GNUNET_SYSERR == res) |
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 99f5822f9..9cefc8a13 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -52,6 +52,8 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
52 | //static const char * name = "dummy.dummy.gnunet"; | 52 | //static const char * name = "dummy.dummy.gnunet"; |
53 | static const char * name = "d"; | 53 | static const char * name = "d"; |
54 | 54 | ||
55 | static char *directory; | ||
56 | |||
55 | static void | 57 | static void |
56 | cleanup () | 58 | cleanup () |
57 | { | 59 | { |
@@ -66,6 +68,11 @@ cleanup () | |||
66 | GNUNET_free (privkey); | 68 | GNUNET_free (privkey); |
67 | privkey = NULL; | 69 | privkey = NULL; |
68 | } | 70 | } |
71 | if (NULL != directory) | ||
72 | { | ||
73 | GNUNET_DISK_directory_remove (directory); | ||
74 | GNUNET_free (directory); | ||
75 | } | ||
69 | GNUNET_SCHEDULER_shutdown (); | 76 | GNUNET_SCHEDULER_shutdown (); |
70 | } | 77 | } |
71 | 78 | ||
@@ -267,6 +274,9 @@ run (void *cls, | |||
267 | { | 274 | { |
268 | char *hostkey_file; | 275 | char *hostkey_file; |
269 | 276 | ||
277 | directory = NULL; | ||
278 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
279 | |||
270 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 280 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
271 | &endbadly, NULL); | 281 | &endbadly, NULL); |
272 | GNUNET_asprintf (&hostkey_file, | 282 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_lookup_private.c b/src/namestore/test_namestore_api_lookup_private.c index 3b997ed0e..398d31475 100644 --- a/src/namestore/test_namestore_api_lookup_private.c +++ b/src/namestore/test_namestore_api_lookup_private.c | |||
@@ -48,6 +48,8 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
48 | //static const char * name = "dummy.dummy.gnunet"; | 48 | //static const char * name = "dummy.dummy.gnunet"; |
49 | static const char * name = "d"; | 49 | static const char * name = "d"; |
50 | 50 | ||
51 | static char *directory; | ||
52 | |||
51 | static void | 53 | static void |
52 | cleanup () | 54 | cleanup () |
53 | { | 55 | { |
@@ -61,6 +63,11 @@ cleanup () | |||
61 | GNUNET_free (privkey); | 63 | GNUNET_free (privkey); |
62 | privkey = NULL; | 64 | privkey = NULL; |
63 | } | 65 | } |
66 | if (NULL != directory) | ||
67 | { | ||
68 | GNUNET_DISK_directory_remove (directory); | ||
69 | GNUNET_free (directory); | ||
70 | } | ||
64 | GNUNET_SCHEDULER_shutdown (); | 71 | GNUNET_SCHEDULER_shutdown (); |
65 | } | 72 | } |
66 | 73 | ||
@@ -170,6 +177,9 @@ run (void *cls, | |||
170 | struct GNUNET_GNSRECORD_Data rd; | 177 | struct GNUNET_GNSRECORD_Data rd; |
171 | char *hostkey_file; | 178 | char *hostkey_file; |
172 | 179 | ||
180 | directory = NULL; | ||
181 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
182 | |||
173 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 183 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
174 | &endbadly, NULL); | 184 | &endbadly, NULL); |
175 | GNUNET_asprintf (&hostkey_file, | 185 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index a0678ddc4..096e5e055 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -51,6 +51,7 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
51 | 51 | ||
52 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; | 52 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; |
53 | 53 | ||
54 | static char *directory; | ||
54 | 55 | ||
55 | static void | 56 | static void |
56 | cleanup () | 57 | cleanup () |
@@ -70,6 +71,11 @@ cleanup () | |||
70 | GNUNET_free (privkey); | 71 | GNUNET_free (privkey); |
71 | privkey = NULL; | 72 | privkey = NULL; |
72 | } | 73 | } |
74 | if (NULL != directory) | ||
75 | { | ||
76 | GNUNET_DISK_directory_remove (directory); | ||
77 | GNUNET_free (directory); | ||
78 | } | ||
73 | GNUNET_SCHEDULER_shutdown (); | 79 | GNUNET_SCHEDULER_shutdown (); |
74 | } | 80 | } |
75 | 81 | ||
@@ -193,6 +199,9 @@ run (void *cls, | |||
193 | char *hostkey_file; | 199 | char *hostkey_file; |
194 | const char * name = "dummy.dummy.gnunet"; | 200 | const char * name = "dummy.dummy.gnunet"; |
195 | 201 | ||
202 | directory = NULL; | ||
203 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
204 | |||
196 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 205 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
197 | &endbadly, NULL); | 206 | &endbadly, NULL); |
198 | GNUNET_asprintf (&hostkey_file, | 207 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c index 442d3eb1c..e77e9f2df 100644 --- a/src/namestore/test_namestore_api_lookup_shadow.c +++ b/src/namestore/test_namestore_api_lookup_shadow.c | |||
@@ -53,6 +53,7 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
53 | 53 | ||
54 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; | 54 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; |
55 | 55 | ||
56 | static char *directory; | ||
56 | 57 | ||
57 | static void | 58 | static void |
58 | cleanup () | 59 | cleanup () |
@@ -72,6 +73,11 @@ cleanup () | |||
72 | GNUNET_free (privkey); | 73 | GNUNET_free (privkey); |
73 | privkey = NULL; | 74 | privkey = NULL; |
74 | } | 75 | } |
76 | if (NULL != directory) | ||
77 | { | ||
78 | GNUNET_DISK_directory_remove (directory); | ||
79 | GNUNET_free (directory); | ||
80 | } | ||
75 | GNUNET_SCHEDULER_shutdown (); | 81 | GNUNET_SCHEDULER_shutdown (); |
76 | } | 82 | } |
77 | 83 | ||
@@ -225,6 +231,9 @@ run (void *cls, | |||
225 | char *hostkey_file; | 231 | char *hostkey_file; |
226 | const char * name = "dummy.dummy.gnunet"; | 232 | const char * name = "dummy.dummy.gnunet"; |
227 | 233 | ||
234 | directory = NULL; | ||
235 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
236 | |||
228 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 237 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
229 | &endbadly, NULL); | 238 | &endbadly, NULL); |
230 | GNUNET_asprintf (&hostkey_file, | 239 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_lookup_shadow_filter.c b/src/namestore/test_namestore_api_lookup_shadow_filter.c index 232b0133d..34d997819 100644 --- a/src/namestore/test_namestore_api_lookup_shadow_filter.c +++ b/src/namestore/test_namestore_api_lookup_shadow_filter.c | |||
@@ -66,6 +66,8 @@ static struct GNUNET_HashCode derived_hash; | |||
66 | 66 | ||
67 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 67 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
68 | 68 | ||
69 | static char *directory; | ||
70 | |||
69 | static void | 71 | static void |
70 | cleanup () | 72 | cleanup () |
71 | { | 73 | { |
@@ -84,6 +86,11 @@ cleanup () | |||
84 | GNUNET_free (privkey); | 86 | GNUNET_free (privkey); |
85 | privkey = NULL; | 87 | privkey = NULL; |
86 | } | 88 | } |
89 | if (NULL != directory) | ||
90 | { | ||
91 | GNUNET_DISK_directory_remove (directory); | ||
92 | GNUNET_free (directory); | ||
93 | } | ||
87 | GNUNET_SCHEDULER_shutdown (); | 94 | GNUNET_SCHEDULER_shutdown (); |
88 | } | 95 | } |
89 | 96 | ||
@@ -291,6 +298,9 @@ run (void *cls, | |||
291 | { | 298 | { |
292 | char *hostkey_file; | 299 | char *hostkey_file; |
293 | 300 | ||
301 | directory = NULL; | ||
302 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
303 | |||
294 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 304 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
295 | &endbadly, NULL); | 305 | &endbadly, NULL); |
296 | GNUNET_asprintf (&hostkey_file, | 306 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index 6a2418e46..895313d1b 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -56,6 +56,7 @@ static struct GNUNET_GNSRECORD_Data *s_rd_3; | |||
56 | 56 | ||
57 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; | 57 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; |
58 | 58 | ||
59 | static char *directory; | ||
59 | 60 | ||
60 | static void | 61 | static void |
61 | do_shutdown () | 62 | do_shutdown () |
@@ -118,6 +119,11 @@ do_shutdown () | |||
118 | GNUNET_free (privkey2); | 119 | GNUNET_free (privkey2); |
119 | privkey2 = NULL; | 120 | privkey2 = NULL; |
120 | } | 121 | } |
122 | if (NULL != directory) | ||
123 | { | ||
124 | GNUNET_DISK_directory_remove (directory); | ||
125 | GNUNET_free (directory); | ||
126 | } | ||
121 | } | 127 | } |
122 | 128 | ||
123 | 129 | ||
@@ -269,6 +275,9 @@ run (void *cls, | |||
269 | 275 | ||
270 | res = 1; | 276 | res = 1; |
271 | 277 | ||
278 | directory = NULL; | ||
279 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
280 | |||
272 | GNUNET_asprintf(&hostkey_file, | 281 | GNUNET_asprintf(&hostkey_file, |
273 | "zonefiles%s%s", | 282 | "zonefiles%s%s", |
274 | DIR_SEPARATOR_STR, | 283 | DIR_SEPARATOR_STR, |
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c index 51cd1205d..9051a8d89 100644 --- a/src/namestore/test_namestore_api_monitoring_existing.c +++ b/src/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -57,6 +57,7 @@ static struct GNUNET_GNSRECORD_Data *s_rd_3; | |||
57 | 57 | ||
58 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; | 58 | struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; |
59 | 59 | ||
60 | static char *directory; | ||
60 | 61 | ||
61 | static void | 62 | static void |
62 | do_shutdown () | 63 | do_shutdown () |
@@ -119,6 +120,11 @@ do_shutdown () | |||
119 | GNUNET_free (privkey2); | 120 | GNUNET_free (privkey2); |
120 | privkey2 = NULL; | 121 | privkey2 = NULL; |
121 | } | 122 | } |
123 | if (NULL != directory) | ||
124 | { | ||
125 | GNUNET_DISK_directory_remove (directory); | ||
126 | GNUNET_free (directory); | ||
127 | } | ||
122 | } | 128 | } |
123 | 129 | ||
124 | 130 | ||
@@ -280,6 +286,9 @@ run (void *cls, | |||
280 | { | 286 | { |
281 | char *hostkey_file; | 287 | char *hostkey_file; |
282 | 288 | ||
289 | directory = NULL; | ||
290 | GNUNET_CONFIGURATION_get_value_string(mycfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
291 | |||
283 | res = 1; | 292 | res = 1; |
284 | 293 | ||
285 | GNUNET_asprintf(&hostkey_file, | 294 | GNUNET_asprintf(&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c deleted file mode 100644 index 53a702a32..000000000 --- a/src/namestore/test_namestore_api_put.c +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2009, 2012 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | /** | ||
21 | * @file namestore/test_namestore_api.c | ||
22 | * @brief testcase for namestore_api.c | ||
23 | */ | ||
24 | #include "platform.h" | ||
25 | #include "gnunet_namestore_service.h" | ||
26 | #include "gnunet_testing_lib.h" | ||
27 | #include "namestore.h" | ||
28 | |||
29 | #define RECORDS 5 | ||
30 | |||
31 | #define TEST_RECORD_TYPE 1234 | ||
32 | |||
33 | #define TEST_RECORD_DATALEN 123 | ||
34 | |||
35 | #define TEST_RECORD_DATA 'a' | ||
36 | |||
37 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) | ||
38 | |||
39 | |||
40 | static struct GNUNET_NAMESTORE_Handle * nsh; | ||
41 | |||
42 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | ||
43 | |||
44 | static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; | ||
45 | |||
46 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | ||
47 | |||
48 | static struct GNUNET_GNSRECORD_Data *s_rd; | ||
49 | |||
50 | static int res; | ||
51 | |||
52 | |||
53 | /** | ||
54 | * Re-establish the connection to the service. | ||
55 | * | ||
56 | * @param cls handle to use to re-connect. | ||
57 | * @param tc scheduler context | ||
58 | */ | ||
59 | static void | ||
60 | endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
61 | { | ||
62 | if (nsh != NULL) | ||
63 | GNUNET_NAMESTORE_disconnect (nsh); | ||
64 | nsh = NULL; | ||
65 | |||
66 | if (privkey != NULL) | ||
67 | { | ||
68 | GNUNET_free (privkey); | ||
69 | privkey = NULL; | ||
70 | } | ||
71 | GNUNET_SCHEDULER_shutdown (); | ||
72 | res = 1; | ||
73 | } | ||
74 | |||
75 | |||
76 | static void | ||
77 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
78 | { | ||
79 | if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) | ||
80 | { | ||
81 | GNUNET_SCHEDULER_cancel (endbadly_task); | ||
82 | endbadly_task = GNUNET_SCHEDULER_NO_TASK; | ||
83 | } | ||
84 | |||
85 | if (privkey != NULL) | ||
86 | { | ||
87 | GNUNET_free (privkey); | ||
88 | privkey = NULL; | ||
89 | } | ||
90 | if (nsh != NULL) | ||
91 | { | ||
92 | GNUNET_NAMESTORE_disconnect (nsh); | ||
93 | nsh = NULL; | ||
94 | } | ||
95 | } | ||
96 | |||
97 | |||
98 | static void | ||
99 | put_cont (void *cls, int32_t success, const char *emsg) | ||
100 | { | ||
101 | const char * name = cls; | ||
102 | |||
103 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
104 | "Name store added record for `%s': %s\n", | ||
105 | name, (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | ||
106 | if (success == GNUNET_OK) | ||
107 | res = 0; | ||
108 | else | ||
109 | res = 1; | ||
110 | GNUNET_SCHEDULER_add_now (&end, NULL); | ||
111 | } | ||
112 | |||
113 | |||
114 | static struct GNUNET_GNSRECORD_Data * | ||
115 | create_record (unsigned int count) | ||
116 | { | ||
117 | unsigned int c; | ||
118 | struct GNUNET_GNSRECORD_Data * rd; | ||
119 | |||
120 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); | ||
121 | for (c = 0; c < count; c++) | ||
122 | { | ||
123 | rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | ||
124 | rd[c].record_type = TEST_RECORD_TYPE; | ||
125 | rd[c].data_size = TEST_RECORD_DATALEN; | ||
126 | rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN); | ||
127 | rd[c].flags = 0; | ||
128 | memset ((char *) rd[c].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN); | ||
129 | } | ||
130 | return rd; | ||
131 | } | ||
132 | |||
133 | |||
134 | static void | ||
135 | run (void *cls, | ||
136 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
137 | struct GNUNET_TESTING_Peer *peer) | ||
138 | { | ||
139 | struct GNUNET_CRYPTO_EcdsaSignature *signature; | ||
140 | char * s_name; | ||
141 | int c; | ||
142 | char *hostkey_file; | ||
143 | struct GNUNET_TIME_Absolute et; | ||
144 | |||
145 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); | ||
146 | /* load privat key */ | ||
147 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | ||
148 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | ||
149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | ||
150 | privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file); | ||
151 | GNUNET_assert (privkey != NULL); | ||
152 | GNUNET_free (hostkey_file); | ||
153 | /* get public key */ | ||
154 | GNUNET_CRYPTO_ecdsa_key_get_public(privkey, &pubkey); | ||
155 | nsh = GNUNET_NAMESTORE_connect (cfg); | ||
156 | GNUNET_break (NULL != nsh); | ||
157 | /* create record */ | ||
158 | s_name = GNUNET_GNSRECORD_string_to_lowercase ("DUMMY.dummy.gnunet"); | ||
159 | s_rd = create_record (RECORDS); | ||
160 | et.abs_value_us = s_rd[0].expiration_time; | ||
161 | signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); | ||
162 | GNUNET_break (s_rd != NULL); | ||
163 | GNUNET_break (s_name != NULL); | ||
164 | GNUNET_NAMESTORE_record_put (nsh, &pubkey, s_name, | ||
165 | GNUNET_TIME_UNIT_FOREVER_ABS, | ||
166 | RECORDS, s_rd, signature, &put_cont, (void*) s_name); | ||
167 | GNUNET_free (signature); | ||
168 | for (c = 0; c < RECORDS; c++) | ||
169 | GNUNET_free_non_null((void *) s_rd[c].data); | ||
170 | GNUNET_free (s_rd); | ||
171 | GNUNET_free (s_name); | ||
172 | } | ||
173 | |||
174 | |||
175 | int | ||
176 | main (int argc, char *argv[]) | ||
177 | { | ||
178 | res = 1; | ||
179 | if (0 != GNUNET_TESTING_peer_run ("test-namestore-api-put", | ||
180 | "test_namestore_api.conf", | ||
181 | &run, | ||
182 | NULL)) | ||
183 | return 1; | ||
184 | return res; | ||
185 | } | ||
186 | |||
187 | /* end of test_namestore_api_put.c */ | ||
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 7c8f47f5d..5ae82b1ef 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -48,6 +48,7 @@ static int removed; | |||
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | 49 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; |
50 | 50 | ||
51 | static char *directory; | ||
51 | 52 | ||
52 | static void | 53 | static void |
53 | cleanup () | 54 | cleanup () |
@@ -62,6 +63,11 @@ cleanup () | |||
62 | GNUNET_free (privkey); | 63 | GNUNET_free (privkey); |
63 | privkey = NULL; | 64 | privkey = NULL; |
64 | } | 65 | } |
66 | if (NULL != directory) | ||
67 | { | ||
68 | GNUNET_DISK_directory_remove (directory); | ||
69 | GNUNET_free (directory); | ||
70 | } | ||
65 | GNUNET_SCHEDULER_shutdown (); | 71 | GNUNET_SCHEDULER_shutdown (); |
66 | } | 72 | } |
67 | 73 | ||
@@ -153,6 +159,9 @@ run (void *cls, | |||
153 | char *hostkey_file; | 159 | char *hostkey_file; |
154 | const char * name = "dummy.dummy.gnunet"; | 160 | const char * name = "dummy.dummy.gnunet"; |
155 | 161 | ||
162 | directory = NULL; | ||
163 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
164 | |||
156 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 165 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
157 | &endbadly, NULL); | 166 | &endbadly, NULL); |
158 | GNUNET_asprintf (&hostkey_file, | 167 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index d1a664b17..c3afee6ff 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -46,6 +46,7 @@ static int res; | |||
46 | 46 | ||
47 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | 47 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; |
48 | 48 | ||
49 | static char *directory; | ||
49 | 50 | ||
50 | static void | 51 | static void |
51 | cleanup () | 52 | cleanup () |
@@ -60,6 +61,11 @@ cleanup () | |||
60 | GNUNET_free (privkey); | 61 | GNUNET_free (privkey); |
61 | privkey = NULL; | 62 | privkey = NULL; |
62 | } | 63 | } |
64 | if (NULL != directory) | ||
65 | { | ||
66 | GNUNET_DISK_directory_remove (directory); | ||
67 | GNUNET_free (directory); | ||
68 | } | ||
63 | GNUNET_SCHEDULER_shutdown (); | 69 | GNUNET_SCHEDULER_shutdown (); |
64 | } | 70 | } |
65 | 71 | ||
@@ -133,6 +139,9 @@ run (void *cls, | |||
133 | char *hostkey_file; | 139 | char *hostkey_file; |
134 | const char * name = "dummy.dummy.gnunet"; | 140 | const char * name = "dummy.dummy.gnunet"; |
135 | 141 | ||
142 | directory = NULL; | ||
143 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
144 | |||
136 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 145 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
137 | &endbadly, NULL); | 146 | &endbadly, NULL); |
138 | GNUNET_asprintf (&hostkey_file, | 147 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index 85c4a2806..c44d24809 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.c | |||
@@ -46,6 +46,7 @@ static int res; | |||
46 | 46 | ||
47 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | 47 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; |
48 | 48 | ||
49 | static char *directory; | ||
49 | 50 | ||
50 | static void | 51 | static void |
51 | cleanup () | 52 | cleanup () |
@@ -60,6 +61,11 @@ cleanup () | |||
60 | GNUNET_free (privkey); | 61 | GNUNET_free (privkey); |
61 | privkey = NULL; | 62 | privkey = NULL; |
62 | } | 63 | } |
64 | if (NULL != directory) | ||
65 | { | ||
66 | GNUNET_DISK_directory_remove (directory); | ||
67 | GNUNET_free (directory); | ||
68 | } | ||
63 | GNUNET_SCHEDULER_shutdown (); | 69 | GNUNET_SCHEDULER_shutdown (); |
64 | } | 70 | } |
65 | 71 | ||
@@ -117,6 +123,9 @@ run (void *cls, | |||
117 | char *hostkey_file; | 123 | char *hostkey_file; |
118 | const char * name = "dummy.dummy.gnunet"; | 124 | const char * name = "dummy.dummy.gnunet"; |
119 | 125 | ||
126 | directory = NULL; | ||
127 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
128 | |||
120 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 129 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
121 | &endbadly, NULL); | 130 | &endbadly, NULL); |
122 | GNUNET_asprintf (&hostkey_file, | 131 | GNUNET_asprintf (&hostkey_file, |
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index b68d59a6b..213d934bf 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -63,6 +63,7 @@ static struct GNUNET_NAMECACHE_QueueEntry *ncqe; | |||
63 | 63 | ||
64 | static const char *name = "dummy"; | 64 | static const char *name = "dummy"; |
65 | 65 | ||
66 | static char *directory; | ||
66 | 67 | ||
67 | static void | 68 | static void |
68 | cleanup () | 69 | cleanup () |
@@ -82,6 +83,11 @@ cleanup () | |||
82 | GNUNET_free (privkey); | 83 | GNUNET_free (privkey); |
83 | privkey = NULL; | 84 | privkey = NULL; |
84 | } | 85 | } |
86 | if (NULL != directory) | ||
87 | { | ||
88 | GNUNET_DISK_directory_remove (directory); | ||
89 | GNUNET_free (directory); | ||
90 | } | ||
85 | GNUNET_SCHEDULER_shutdown (); | 91 | GNUNET_SCHEDULER_shutdown (); |
86 | } | 92 | } |
87 | 93 | ||
@@ -231,6 +237,9 @@ run (void *cls, | |||
231 | struct GNUNET_GNSRECORD_Data rd; | 237 | struct GNUNET_GNSRECORD_Data rd; |
232 | char *hostkey_file; | 238 | char *hostkey_file; |
233 | 239 | ||
240 | directory = NULL; | ||
241 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
242 | |||
234 | update_performed = GNUNET_NO; | 243 | update_performed = GNUNET_NO; |
235 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 244 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
236 | &endbadly, NULL); | 245 | &endbadly, NULL); |
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index f2eb1d17b..9c9be53c7 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -56,6 +56,8 @@ static char * s_name_3; | |||
56 | 56 | ||
57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | static char *directory; | ||
60 | |||
59 | 61 | ||
60 | /** | 62 | /** |
61 | * Re-establish the connection to the service. | 63 | * Re-establish the connection to the service. |
@@ -103,6 +105,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | if (privkey2 != NULL) | 105 | if (privkey2 != NULL) |
104 | GNUNET_free (privkey2); | 106 | GNUNET_free (privkey2); |
105 | privkey2 = NULL; | 107 | privkey2 = NULL; |
108 | if (NULL != directory) | ||
109 | { | ||
110 | GNUNET_DISK_directory_remove (directory); | ||
111 | GNUNET_free (directory); | ||
112 | } | ||
106 | res = 1; | 113 | res = 1; |
107 | } | 114 | } |
108 | 115 | ||
@@ -149,6 +156,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
149 | } | 156 | } |
150 | if (nsh != NULL) | 157 | if (nsh != NULL) |
151 | GNUNET_NAMESTORE_disconnect (nsh); | 158 | GNUNET_NAMESTORE_disconnect (nsh); |
159 | if (NULL != directory) | ||
160 | { | ||
161 | GNUNET_DISK_directory_remove (directory); | ||
162 | GNUNET_free (directory); | ||
163 | } | ||
152 | nsh = NULL; | 164 | nsh = NULL; |
153 | } | 165 | } |
154 | 166 | ||
@@ -421,6 +433,9 @@ run (void *cls, | |||
421 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 433 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
422 | struct GNUNET_TESTING_Peer *peer) | 434 | struct GNUNET_TESTING_Peer *peer) |
423 | { | 435 | { |
436 | directory = NULL; | ||
437 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
438 | |||
424 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 439 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
425 | nsh = GNUNET_NAMESTORE_connect (cfg); | 440 | nsh = GNUNET_NAMESTORE_connect (cfg); |
426 | GNUNET_break (NULL != nsh); | 441 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 5328e40a1..8a1b18cbf 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -60,6 +60,8 @@ static struct GNUNET_GNSRECORD_Data *s_rd_3; | |||
60 | 60 | ||
61 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | 61 | static struct GNUNET_NAMESTORE_QueueEntry *nsqe; |
62 | 62 | ||
63 | static char *directory; | ||
64 | |||
63 | /** | 65 | /** |
64 | * Re-establish the connection to the service. | 66 | * Re-establish the connection to the service. |
65 | * | 67 | * |
@@ -105,6 +107,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | 107 | ||
106 | if (privkey2 != NULL) | 108 | if (privkey2 != NULL) |
107 | GNUNET_free (privkey2); | 109 | GNUNET_free (privkey2); |
110 | if (NULL != directory) | ||
111 | { | ||
112 | GNUNET_DISK_directory_remove (directory); | ||
113 | GNUNET_free (directory); | ||
114 | } | ||
108 | privkey2 = NULL; | 115 | privkey2 = NULL; |
109 | res = 1; | 116 | res = 1; |
110 | } | 117 | } |
@@ -153,6 +160,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
153 | if (nsh != NULL) | 160 | if (nsh != NULL) |
154 | GNUNET_NAMESTORE_disconnect (nsh); | 161 | GNUNET_NAMESTORE_disconnect (nsh); |
155 | nsh = NULL; | 162 | nsh = NULL; |
163 | if (NULL != directory) | ||
164 | { | ||
165 | GNUNET_DISK_directory_remove (directory); | ||
166 | GNUNET_free (directory); | ||
167 | } | ||
156 | } | 168 | } |
157 | 169 | ||
158 | static int | 170 | static int |
@@ -431,6 +443,9 @@ run (void *cls, | |||
431 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 443 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
432 | struct GNUNET_TESTING_Peer *peer) | 444 | struct GNUNET_TESTING_Peer *peer) |
433 | { | 445 | { |
446 | directory = NULL; | ||
447 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
448 | |||
434 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 449 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
435 | nsh = GNUNET_NAMESTORE_connect (cfg); | 450 | nsh = GNUNET_NAMESTORE_connect (cfg); |
436 | GNUNET_break (NULL != nsh); | 451 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index 6b131528e..bd4c5cc93 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -56,6 +56,7 @@ static char * s_name_3; | |||
56 | 56 | ||
57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | static char *directory; | ||
59 | 60 | ||
60 | /** | 61 | /** |
61 | * Re-establish the connection to the service. | 62 | * Re-establish the connection to the service. |
@@ -103,6 +104,12 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | if (privkey2 != NULL) | 104 | if (privkey2 != NULL) |
104 | GNUNET_free (privkey2); | 105 | GNUNET_free (privkey2); |
105 | privkey2 = NULL; | 106 | privkey2 = NULL; |
107 | |||
108 | if (NULL != directory) | ||
109 | { | ||
110 | GNUNET_DISK_directory_remove (directory); | ||
111 | GNUNET_free (directory); | ||
112 | } | ||
106 | res = 1; | 113 | res = 1; |
107 | } | 114 | } |
108 | 115 | ||
@@ -151,6 +158,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
151 | if (nsh != NULL) | 158 | if (nsh != NULL) |
152 | GNUNET_NAMESTORE_disconnect (nsh); | 159 | GNUNET_NAMESTORE_disconnect (nsh); |
153 | nsh = NULL; | 160 | nsh = NULL; |
161 | if (NULL != directory) | ||
162 | { | ||
163 | GNUNET_DISK_directory_remove (directory); | ||
164 | GNUNET_free (directory); | ||
165 | } | ||
154 | } | 166 | } |
155 | 167 | ||
156 | 168 | ||
@@ -397,6 +409,9 @@ run (void *cls, | |||
397 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 409 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
398 | struct GNUNET_TESTING_Peer *peer) | 410 | struct GNUNET_TESTING_Peer *peer) |
399 | { | 411 | { |
412 | directory = NULL; | ||
413 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
414 | |||
400 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 415 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
401 | nsh = GNUNET_NAMESTORE_connect (cfg); | 416 | nsh = GNUNET_NAMESTORE_connect (cfg); |
402 | GNUNET_break (NULL != nsh); | 417 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index 728a118eb..77a3d6a38 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -56,6 +56,8 @@ static char * s_name_3; | |||
56 | 56 | ||
57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; | 57 | static struct GNUNET_GNSRECORD_Data *s_rd_3; |
58 | 58 | ||
59 | static char *directory; | ||
60 | |||
59 | 61 | ||
60 | /** | 62 | /** |
61 | * Re-establish the connection to the service. | 63 | * Re-establish the connection to the service. |
@@ -103,6 +105,12 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | if (privkey2 != NULL) | 105 | if (privkey2 != NULL) |
104 | GNUNET_free (privkey2); | 106 | GNUNET_free (privkey2); |
105 | privkey2 = NULL; | 107 | privkey2 = NULL; |
108 | |||
109 | if (NULL != directory) | ||
110 | { | ||
111 | GNUNET_DISK_directory_remove (directory); | ||
112 | GNUNET_free (directory); | ||
113 | } | ||
106 | res = 1; | 114 | res = 1; |
107 | } | 115 | } |
108 | 116 | ||
@@ -431,6 +439,9 @@ run (void *cls, | |||
431 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 439 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
432 | struct GNUNET_TESTING_Peer *peer) | 440 | struct GNUNET_TESTING_Peer *peer) |
433 | { | 441 | { |
442 | directory = NULL; | ||
443 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
444 | |||
434 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 445 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
435 | nsh = GNUNET_NAMESTORE_connect (cfg); | 446 | nsh = GNUNET_NAMESTORE_connect (cfg); |
436 | GNUNET_break (NULL != nsh); | 447 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index c7cbe0ebe..26593547b 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -57,6 +57,7 @@ static struct GNUNET_CRYPTO_EcdsaSignature *s_signature; | |||
57 | 57 | ||
58 | static int res; | 58 | static int res; |
59 | 59 | ||
60 | static char *directory; | ||
60 | 61 | ||
61 | /** | 62 | /** |
62 | * Re-establish the connection to the service. | 63 | * Re-establish the connection to the service. |
@@ -72,6 +73,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
72 | nsh = NULL; | 73 | nsh = NULL; |
73 | if (privkey != NULL) | 74 | if (privkey != NULL) |
74 | GNUNET_free (privkey); | 75 | GNUNET_free (privkey); |
76 | if (NULL != directory) | ||
77 | { | ||
78 | GNUNET_DISK_directory_remove (directory); | ||
79 | GNUNET_free (directory); | ||
80 | } | ||
75 | privkey = NULL; | 81 | privkey = NULL; |
76 | res = 1; | 82 | res = 1; |
77 | } | 83 | } |
@@ -90,6 +96,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
90 | privkey = NULL; | 96 | privkey = NULL; |
91 | if (nsh != NULL) | 97 | if (nsh != NULL) |
92 | GNUNET_NAMESTORE_disconnect (nsh); | 98 | GNUNET_NAMESTORE_disconnect (nsh); |
99 | if (NULL != directory) | ||
100 | { | ||
101 | GNUNET_DISK_directory_remove (directory); | ||
102 | GNUNET_free (directory); | ||
103 | } | ||
93 | nsh = NULL; | 104 | nsh = NULL; |
94 | } | 105 | } |
95 | 106 | ||
@@ -167,6 +178,9 @@ run (void *cls, | |||
167 | { | 178 | { |
168 | struct GNUNET_TIME_Absolute et; | 179 | struct GNUNET_TIME_Absolute et; |
169 | 180 | ||
181 | directory = NULL; | ||
182 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
183 | |||
170 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); | 184 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT,endbadly, NULL); |
171 | GNUNET_asprintf (&s_name, "dummy"); | 185 | GNUNET_asprintf (&s_name, "dummy"); |
172 | /* load privat key */ | 186 | /* load privat key */ |