aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-17 07:47:07 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-17 07:47:07 +0000
commitf785d87b274d383727af27f15e077e67900a2c9b (patch)
tree359fe3b4bba33911417eda33fe08813d8ee8fc09 /src
parent37c9580896ed4b977bc407d618d443a78ff5584a (diff)
downloadgnunet-f785d87b274d383727af27f15e077e67900a2c9b.tar.gz
gnunet-f785d87b274d383727af27f15e077e67900a2c9b.zip
-start namecache as well, perform NC registration for client during lookup handling
Diffstat (limited to 'src')
-rw-r--r--src/namestore/gnunet-service-namestore.c7
-rw-r--r--src/namestore/test_namestore_api_lookup_public.c11
-rw-r--r--src/namestore/test_namestore_api_monitoring.c9
-rw-r--r--src/namestore/test_namestore_api_monitoring_existing.c9
-rw-r--r--src/namestore/test_namestore_api_put.c9
-rw-r--r--src/namestore/test_namestore_api_store.c9
-rw-r--r--src/namestore/test_namestore_api_store_update.c9
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c9
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c9
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c9
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c9
11 files changed, 45 insertions, 54 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 40a7ac790..de6f6eaec 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -422,7 +422,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
422 name_len = strlen (name) + 1; 422 name_len = strlen (name) + 1;
423 rd_ser_len = GNUNET_GNSRECORD_records_get_size (rd_count, rd); 423 rd_ser_len = GNUNET_GNSRECORD_records_get_size (rd_count, rd);
424 msg_size = sizeof (struct RecordResultMessage) + name_len + rd_ser_len; 424 msg_size = sizeof (struct RecordResultMessage) + name_len + rd_ser_len;
425 425 (void) client_lookup (client);
426 zir_msg = GNUNET_malloc (msg_size); 426 zir_msg = GNUNET_malloc (msg_size);
427 zir_msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT); 427 zir_msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT);
428 zir_msg->gns_header.header.size = htons (msg_size); 428 zir_msg->gns_header.header.size = htons (msg_size);
@@ -539,7 +539,8 @@ refresh_block (struct GNUNET_SERVER_Client *client,
539 rd), 539 rd),
540 name, 540 name,
541 rd, rd_count); 541 rd, rd_count);
542 542 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
543 "Caching block in namecache\n");
543 cop = GNUNET_new (struct CacheOperation); 544 cop = GNUNET_new (struct CacheOperation);
544 cop->client = client; 545 cop->client = client;
545 cop->rid = rid; 546 cop->rid = rid;
@@ -1180,7 +1181,7 @@ monitor_iterate_cb (void *cls,
1180 * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START message 1181 * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START message
1181 * 1182 *
1182 * @param cls unused 1183 * @param cls unused
1183 * @param client GNUNET_SERVER_Client sending the message 1184 * @param client the client sending the message
1184 * @param message message of type 'struct ZoneMonitorStartMessage' 1185 * @param message message of type 'struct ZoneMonitorStartMessage'
1185 */ 1186 */
1186static void 1187static void
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c
index 10bfefbed..a119e34d6 100644
--- a/src/namestore/test_namestore_api_lookup_public.c
+++ b/src/namestore/test_namestore_api_lookup_public.c
@@ -233,14 +233,13 @@ main (int argc, char *argv[])
233{ 233{
234 res = 1; 234 res = 1;
235 if (0 != 235 if (0 !=
236 GNUNET_TESTING_service_run ("test-namestore-api", 236 GNUNET_TESTING_peer_run ("test-namestore-api",
237 "namestore", 237 "test_namestore_api.conf",
238 "test_namestore_api.conf", 238 &run,
239 &run, 239 NULL))
240 NULL))
241 return 1; 240 return 1;
242 return res; 241 return res;
243} 242}
244 243
245 244
246/* end of test_namestore_api.c */ 245/* end of test_namestore_api_lookup_public.c */
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index 4ccb425a2..0bd1e1350 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -335,11 +335,10 @@ main (int argc, char *argv[])
335{ 335{
336 res = 1; 336 res = 1;
337 if (0 != 337 if (0 !=
338 GNUNET_TESTING_service_run ("test-namestore-api-monitoring", 338 GNUNET_TESTING_peer_run ("test-namestore-api-monitoring",
339 "namestore", 339 "test_namestore_api.conf",
340 "test_namestore_api.conf", 340 &run,
341 &run, 341 NULL))
342 NULL))
343 return 1; 342 return 1;
344 return res; 343 return res;
345} 344}
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c
index b8ac7a729..bab857def 100644
--- a/src/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/namestore/test_namestore_api_monitoring_existing.c
@@ -340,11 +340,10 @@ main (int argc, char *argv[])
340{ 340{
341 res = 1; 341 res = 1;
342 if (0 != 342 if (0 !=
343 GNUNET_TESTING_service_run ("test-namestore-api-monitoring", 343 GNUNET_TESTING_peer_run ("test-namestore-api-monitoring",
344 "namestore", 344 "test_namestore_api.conf",
345 "test_namestore_api.conf", 345 &run,
346 &run, 346 NULL))
347 NULL))
348 return 1; 347 return 1;
349 return res; 348 return res;
350} 349}
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c
index c0e04e98e..4f06283c1 100644
--- a/src/namestore/test_namestore_api_put.c
+++ b/src/namestore/test_namestore_api_put.c
@@ -175,11 +175,10 @@ int
175main (int argc, char *argv[]) 175main (int argc, char *argv[])
176{ 176{
177 res = 1; 177 res = 1;
178 if (0 != GNUNET_TESTING_service_run ("test-namestore-api-put", 178 if (0 != GNUNET_TESTING_peer_run ("test-namestore-api-put",
179 "namestore", 179 "test_namestore_api.conf",
180 "test_namestore_api.conf", 180 &run,
181 &run, 181 NULL))
182 NULL))
183 return 1; 182 return 1;
184 return res; 183 return res;
185} 184}
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c
index 711a160d6..d5583862c 100644
--- a/src/namestore/test_namestore_api_store.c
+++ b/src/namestore/test_namestore_api_store.c
@@ -153,11 +153,10 @@ main (int argc, char *argv[])
153{ 153{
154 res = 1; 154 res = 1;
155 if (0 != 155 if (0 !=
156 GNUNET_TESTING_service_run ("test-namestore-api", 156 GNUNET_TESTING_peer_run ("test-namestore-api",
157 "namestore", 157 "test_namestore_api.conf",
158 "test_namestore_api.conf", 158 &run,
159 &run, 159 NULL))
160 NULL))
161 return 1; 160 return 1;
162 return res; 161 return res;
163} 162}
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c
index 1440addbe..b2506f874 100644
--- a/src/namestore/test_namestore_api_store_update.c
+++ b/src/namestore/test_namestore_api_store_update.c
@@ -271,11 +271,10 @@ main (int argc, char *argv[])
271 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); 271 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
272 res = 1; 272 res = 1;
273 if (0 != 273 if (0 !=
274 GNUNET_TESTING_service_run ("test-namestore-api-store-update", 274 GNUNET_TESTING_peer_run ("test-namestore-api-store-update",
275 "namestore", 275 "test_namestore_api.conf",
276 "test_namestore_api.conf", 276 &run,
277 &run, 277 NULL))
278 NULL))
279 return 1; 278 return 1;
280 return res; 279 return res;
281} 280}
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index f7e4fe489..cfeceabe0 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -441,11 +441,10 @@ main (int argc, char *argv[])
441{ 441{
442 res = 1; 442 res = 1;
443 if (0 != 443 if (0 !=
444 GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration", 444 GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration",
445 "namestore", 445 "test_namestore_api.conf",
446 "test_namestore_api.conf", 446 &run,
447 &run, 447 NULL))
448 NULL))
449 return 1; 448 return 1;
450 return res; 449 return res;
451} 450}
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 1554d5673..fdaef8d90 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -419,11 +419,10 @@ main (int argc, char *argv[])
419 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); 419 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
420 res = 1; 420 res = 1;
421 if (0 != 421 if (0 !=
422 GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration", 422 GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration",
423 "namestore", 423 "test_namestore_api.conf",
424 "test_namestore_api.conf", 424 &run,
425 &run, 425 NULL))
426 NULL))
427 return 1; 426 return 1;
428 return res; 427 return res;
429} 428}
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index f7fd4203d..f2a3f7940 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -452,11 +452,10 @@ main (int argc, char *argv[])
452 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); 452 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
453 res = 1; 453 res = 1;
454 if (0 != 454 if (0 !=
455 GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration-stop", 455 GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-stop",
456 "namestore", 456 "test_namestore_api.conf",
457 "test_namestore_api.conf", 457 &run,
458 &run, 458 NULL))
459 NULL))
460 return 1; 459 return 1;
461 return res; 460 return res;
462} 461}
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index 83e7de458..5c5eff87c 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -208,11 +208,10 @@ main (int argc, char *argv[])
208{ 208{
209 res = 1; 209 res = 1;
210 if (0 != 210 if (0 !=
211 GNUNET_TESTING_service_run ("test-namestore-api-zone-to-name", 211 GNUNET_TESTING_peer_run ("test-namestore-api-zone-to-name",
212 "namestore", 212 "test_namestore_api.conf",
213 "test_namestore_api.conf", 213 &run,
214 &run, 214 NULL))
215 NULL))
216 return 1; 215 return 1;
217 return res; 216 return res;
218} 217}