aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-service-namestore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/gnunet-service-namestore.c')
-rw-r--r--src/namestore/gnunet-service-namestore.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 8251a41fa..ef200a8f4 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -260,7 +260,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
260 * @param client identification of the client 260 * @param client identification of the client
261 */ 261 */
262static void 262static void
263client_disconnect_notification (void *cls, 263client_disconnect_notification (void *cls,
264 struct GNUNET_SERVER_Client *client) 264 struct GNUNET_SERVER_Client *client)
265{ 265{
266 struct ZoneIteration *no; 266 struct ZoneIteration *no;
@@ -269,8 +269,8 @@ client_disconnect_notification (void *cls,
269 269
270 if (NULL == client) 270 if (NULL == client)
271 return; 271 return;
272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 272 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
273 "Client %p disconnected\n", 273 "Client %p disconnected\n",
274 client); 274 client);
275 if (NULL == (nc = GNUNET_SERVER_client_get_user_context (client, struct NamestoreClient))) 275 if (NULL == (nc = GNUNET_SERVER_client_get_user_context (client, struct NamestoreClient)))
276 return; 276 return;
@@ -315,7 +315,7 @@ client_lookup (struct GNUNET_SERVER_Client *client)
315 nc = GNUNET_SERVER_client_get_user_context (client, struct NamestoreClient); 315 nc = GNUNET_SERVER_client_get_user_context (client, struct NamestoreClient);
316 if (NULL != nc) 316 if (NULL != nc)
317 return nc; 317 return nc;
318 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 318 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
319 "Client %p connected\n", 319 "Client %p connected\n",
320 client); 320 client);
321 nc = GNUNET_new (struct NamestoreClient); 321 nc = GNUNET_new (struct NamestoreClient);
@@ -361,7 +361,7 @@ handle_lookup_block_it (void *cls,
361 size_t esize; 361 size_t esize;
362 362
363 esize = ntohl (block->purpose.size) 363 esize = ntohl (block->purpose.size)
364 - sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) 364 - sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose)
365 - sizeof (struct GNUNET_TIME_AbsoluteNBO); 365 - sizeof (struct GNUNET_TIME_AbsoluteNBO);
366 r = GNUNET_malloc (sizeof (struct LookupBlockResponseMessage) + esize); 366 r = GNUNET_malloc (sizeof (struct LookupBlockResponseMessage) + esize);
367 r->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_BLOCK_RESPONSE); 367 r->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_BLOCK_RESPONSE);
@@ -369,15 +369,15 @@ handle_lookup_block_it (void *cls,
369 r->gns_header.r_id = htonl (lnc->request_id); 369 r->gns_header.r_id = htonl (lnc->request_id);
370 r->expire = block->expiration_time; 370 r->expire = block->expiration_time;
371 r->signature = block->signature; 371 r->signature = block->signature;
372 r->derived_key = block->derived_key; 372 r->derived_key = block->derived_key;
373 memcpy (&r[1], &block[1], esize); 373 memcpy (&r[1], &block[1], esize);
374 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 374 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
375 "Sending `%s' message with expiration time %s\n", 375 "Sending `%s' message with expiration time %s\n",
376 "NAMESTORE_LOOKUP_BLOCK_RESPONSE", 376 "NAMESTORE_LOOKUP_BLOCK_RESPONSE",
377 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (r->expire))); 377 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (r->expire)));
378 GNUNET_SERVER_notification_context_unicast (snc, 378 GNUNET_SERVER_notification_context_unicast (snc,
379 lnc->nc->client, 379 lnc->nc->client,
380 &r->gns_header.header, 380 &r->gns_header.header,
381 GNUNET_NO); 381 GNUNET_NO);
382 GNUNET_free (r); 382 GNUNET_free (r);
383} 383}
@@ -401,38 +401,38 @@ handle_lookup_block (void *cls,
401 struct LookupBlockResponseMessage zir_end; 401 struct LookupBlockResponseMessage zir_end;
402 int ret; 402 int ret;
403 403
404 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 404 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
405 "Received `%s' message\n", 405 "Received `%s' message\n",
406 "NAMESTORE_LOOKUP_BLOCK"); 406 "NAMESTORE_LOOKUP_BLOCK");
407 nc = client_lookup(client); 407 nc = client_lookup(client);
408 ln_msg = (const struct LookupBlockMessage *) message; 408 ln_msg = (const struct LookupBlockMessage *) message;
409 lnc.request_id = ntohl (ln_msg->gns_header.r_id); 409 lnc.request_id = ntohl (ln_msg->gns_header.r_id);
410 lnc.nc = nc; 410 lnc.nc = nc;
411 if (GNUNET_SYSERR == 411 if (GNUNET_SYSERR ==
412 (ret = GSN_database->lookup_block (GSN_database->cls, 412 (ret = GSN_database->lookup_block (GSN_database->cls,
413 &ln_msg->query, 413 &ln_msg->query,
414 &handle_lookup_block_it, &lnc))) 414 &handle_lookup_block_it, &lnc)))
415 { 415 {
416 /* internal error (in database plugin); might be best to just hang up on 416 /* internal error (in database plugin); might be best to just hang up on
417 plugin rather than to signal that there are 'no' results, which 417 plugin rather than to signal that there are 'no' results, which
418 might also be false... */ 418 might also be false... */
419 GNUNET_break (0); 419 GNUNET_break (0);
420 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 420 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
421 return; 421 return;
422 } 422 }
423 if (0 == ret) 423 if (0 == ret)
424 { 424 {
425 /* no records match at all, generate empty response */ 425 /* no records match at all, generate empty response */
426 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 426 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
427 "Sending empty `%s' message\n", 427 "Sending empty `%s' message\n",
428 "NAMESTORE_LOOKUP_BLOCK_RESPONSE"); 428 "NAMESTORE_LOOKUP_BLOCK_RESPONSE");
429 memset (&zir_end, 0, sizeof (zir_end)); 429 memset (&zir_end, 0, sizeof (zir_end));
430 zir_end.gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_BLOCK_RESPONSE); 430 zir_end.gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_BLOCK_RESPONSE);
431 zir_end.gns_header.header.size = htons (sizeof (struct LookupBlockResponseMessage)); 431 zir_end.gns_header.header.size = htons (sizeof (struct LookupBlockResponseMessage));
432 zir_end.gns_header.r_id = ln_msg->gns_header.r_id; 432 zir_end.gns_header.r_id = ln_msg->gns_header.r_id;
433 GNUNET_SERVER_notification_context_unicast (snc, 433 GNUNET_SERVER_notification_context_unicast (snc,
434 client, 434 client,
435 &zir_end.gns_header.header, 435 &zir_end.gns_header.header,
436 GNUNET_NO); 436 GNUNET_NO);
437 437
438 } 438 }
@@ -453,7 +453,7 @@ handle_block_cache (void *cls,
453 const struct GNUNET_MessageHeader *message) 453 const struct GNUNET_MessageHeader *message)
454{ 454{
455 struct NamestoreClient *nc; 455 struct NamestoreClient *nc;
456 const struct BlockCacheMessage *rp_msg; 456 const struct BlockCacheMessage *rp_msg;
457 struct BlockCacheResponseMessage rpr_msg; 457 struct BlockCacheResponseMessage rpr_msg;
458 struct GNUNET_NAMESTORE_Block *block; 458 struct GNUNET_NAMESTORE_Block *block;
459 size_t esize; 459 size_t esize;
@@ -475,7 +475,7 @@ handle_block_cache (void *cls,
475 sizeof (struct GNUNET_TIME_AbsoluteNBO) + 475 sizeof (struct GNUNET_TIME_AbsoluteNBO) +
476 esize); 476 esize);
477 block->expiration_time = rp_msg->expire; 477 block->expiration_time = rp_msg->expire;
478 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 478 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
479 "Received `%s' message with expiration time %s\n", 479 "Received `%s' message with expiration time %s\n",
480 "NAMESTORE_BLOCK_CACHE", 480 "NAMESTORE_BLOCK_CACHE",
481 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (block->expiration_time))); 481 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (block->expiration_time)));
@@ -488,9 +488,9 @@ handle_block_cache (void *cls,
488 rpr_msg.gns_header.header.size = htons (sizeof (struct BlockCacheResponseMessage)); 488 rpr_msg.gns_header.header.size = htons (sizeof (struct BlockCacheResponseMessage));
489 rpr_msg.gns_header.r_id = rp_msg->gns_header.r_id; 489 rpr_msg.gns_header.r_id = rp_msg->gns_header.r_id;
490 rpr_msg.op_result = htonl (res); 490 rpr_msg.op_result = htonl (res);
491 GNUNET_SERVER_notification_context_unicast (snc, 491 GNUNET_SERVER_notification_context_unicast (snc,
492 nc->client, 492 nc->client,
493 &rpr_msg.gns_header.header, 493 &rpr_msg.gns_header.header,
494 GNUNET_NO); 494 GNUNET_NO);
495 GNUNET_SERVER_receive_done (client, GNUNET_OK); 495 GNUNET_SERVER_receive_done (client, GNUNET_OK);
496} 496}
@@ -525,7 +525,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
525 char *rd_ser; 525 char *rd_ser;
526 526
527 name_len = strlen (name) + 1; 527 name_len = strlen (name) + 1;
528 rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); 528 rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd);
529 msg_size = sizeof (struct RecordResultMessage) + name_len + rd_ser_len; 529 msg_size = sizeof (struct RecordResultMessage) + name_len + rd_ser_len;
530 530
531 zir_msg = GNUNET_malloc (msg_size); 531 zir_msg = GNUNET_malloc (msg_size);
@@ -540,13 +540,13 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
540 memcpy (name_tmp, name, name_len); 540 memcpy (name_tmp, name, name_len);
541 rd_ser = &name_tmp[name_len]; 541 rd_ser = &name_tmp[name_len];
542 GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser); 542 GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser);
543 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 543 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
544 "Sending `%s' message with %u records and size %u\n", 544 "Sending `%s' message with %u records and size %u\n",
545 "RECORD_RESULT", 545 "RECORD_RESULT",
546 rd_count, 546 rd_count,
547 msg_size); 547 msg_size);
548 GNUNET_SERVER_notification_context_unicast (nc, 548 GNUNET_SERVER_notification_context_unicast (nc,
549 client, 549 client,
550 &zir_msg->gns_header.header, 550 &zir_msg->gns_header.header,
551 GNUNET_NO); 551 GNUNET_NO);
552 GNUNET_free (zir_msg); 552 GNUNET_free (zir_msg);
@@ -569,7 +569,7 @@ refresh_block (const struct GNUNET_CRYPTO_EccPrivateKey *zone_key,
569 const struct GNUNET_NAMESTORE_RecordData *rd) 569 const struct GNUNET_NAMESTORE_RecordData *rd)
570{ 570{
571 struct GNUNET_NAMESTORE_Block *block; 571 struct GNUNET_NAMESTORE_Block *block;
572 572
573 if (0 == rd_count) 573 if (0 == rd_count)
574 block = GNUNET_NAMESTORE_block_create (zone_key, 574 block = GNUNET_NAMESTORE_block_create (zone_key,
575 GNUNET_TIME_UNIT_ZERO_ABS, 575 GNUNET_TIME_UNIT_ZERO_ABS,
@@ -589,7 +589,7 @@ refresh_block (const struct GNUNET_CRYPTO_EccPrivateKey *zone_key,
589 _("Failed to cache encrypted block of my own zone!\n")); 589 _("Failed to cache encrypted block of my own zone!\n"));
590 } 590 }
591 GNUNET_free (block); 591 GNUNET_free (block);
592} 592}
593 593
594 594
595/** 595/**
@@ -620,8 +620,8 @@ handle_record_store (void *cls,
620 struct GNUNET_CRYPTO_EccPublicSignKey pubkey; 620 struct GNUNET_CRYPTO_EccPublicSignKey pubkey;
621 struct ZoneMonitor *zm; 621 struct ZoneMonitor *zm;
622 622
623 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 623 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
624 "Received `%s' message\n", 624 "Received `%s' message\n",
625 "NAMESTORE_RECORD_STORE"); 625 "NAMESTORE_RECORD_STORE");
626 if (ntohs (message->size) < sizeof (struct RecordStoreMessage)) 626 if (ntohs (message->size) < sizeof (struct RecordStoreMessage))
627 { 627 {
@@ -686,9 +686,9 @@ handle_record_store (void *cls,
686 conv_name, 686 conv_name,
687 GNUNET_NAMESTORE_z2s (&pubkey)); 687 GNUNET_NAMESTORE_z2s (&pubkey));
688 688
689 if ( (0 == rd_count) && 689 if ( (0 == rd_count) &&
690 (GNUNET_NO == 690 (GNUNET_NO ==
691 GSN_database->iterate_records (GSN_database->cls, 691 GSN_database->iterate_records (GSN_database->cls,
692 &rp_msg->private_key, 0, NULL, 0)) ) 692 &rp_msg->private_key, 0, NULL, 0)) )
693 { 693 {
694 /* This name does not exist, so cannot be removed */ 694 /* This name does not exist, so cannot be removed */
@@ -701,15 +701,15 @@ handle_record_store (void *cls,
701 { 701 {
702 res = GSN_database->store_records (GSN_database->cls, 702 res = GSN_database->store_records (GSN_database->cls,
703 &rp_msg->private_key, 703 &rp_msg->private_key,
704 conv_name, 704 conv_name,
705 rd_count, rd); 705 rd_count, rd);
706 if (GNUNET_OK == res) 706 if (GNUNET_OK == res)
707 { 707 {
708 refresh_block (&rp_msg->private_key, 708 refresh_block (&rp_msg->private_key,
709 conv_name, 709 conv_name,
710 rd_count, rd); 710 rd_count, rd);
711 711
712 for (zm = monitor_head; NULL != zm; zm = zm->next) 712 for (zm = monitor_head; NULL != zm; zm = zm->next)
713 if (0 == memcmp (&rp_msg->private_key, &zm->zone, 713 if (0 == memcmp (&rp_msg->private_key, &zm->zone,
714 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 714 sizeof (struct GNUNET_CRYPTO_EccPrivateKey)))
715 send_lookup_response (monitor_nc, 715 send_lookup_response (monitor_nc,
@@ -722,10 +722,10 @@ handle_record_store (void *cls,
722 GNUNET_free (conv_name); 722 GNUNET_free (conv_name);
723 } 723 }
724 } 724 }
725 725
726 /* Send response */ 726 /* Send response */
727 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 727 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
728 "Sending `%s' message\n", 728 "Sending `%s' message\n",
729 "RECORD_STORE_RESPONSE"); 729 "RECORD_STORE_RESPONSE");
730 rcr_msg.gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE); 730 rcr_msg.gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE);
731 rcr_msg.gns_header.header.size = htons (sizeof (struct RecordStoreResponseMessage)); 731 rcr_msg.gns_header.header.size = htons (sizeof (struct RecordStoreResponseMessage));
@@ -788,8 +788,8 @@ handle_zone_to_name_it (void *cls,
788 char *name_tmp; 788 char *name_tmp;
789 char *rd_tmp; 789 char *rd_tmp;
790 790
791 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 791 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
792 "Found result for zone-to-name lookup: `%s'\n", 792 "Found result for zone-to-name lookup: `%s'\n",
793 name); 793 name);
794 res = GNUNET_YES; 794 res = GNUNET_YES;
795 name_len = (NULL == name) ? 0 : strlen (name) + 1; 795 name_len = (NULL == name) ? 0 : strlen (name) + 1;
@@ -840,7 +840,7 @@ handle_zone_to_name (void *cls,
840 struct ZoneToNameCtx ztn_ctx; 840 struct ZoneToNameCtx ztn_ctx;
841 struct ZoneToNameResponseMessage ztnr_msg; 841 struct ZoneToNameResponseMessage ztnr_msg;
842 842
843 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 843 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
844 "Received `%s' message\n", 844 "Received `%s' message\n",
845 "ZONE_TO_NAME"); 845 "ZONE_TO_NAME");
846 ztn_msg = (const struct ZoneToNameMessage *) message; 846 ztn_msg = (const struct ZoneToNameMessage *) message;
@@ -849,7 +849,7 @@ handle_zone_to_name (void *cls,
849 ztn_ctx.nc = nc; 849 ztn_ctx.nc = nc;
850 ztn_ctx.success = GNUNET_NO; 850 ztn_ctx.success = GNUNET_NO;
851 if (GNUNET_SYSERR == 851 if (GNUNET_SYSERR ==
852 GSN_database->zone_to_name (GSN_database->cls, 852 GSN_database->zone_to_name (GSN_database->cls,
853 &ztn_msg->zone, 853 &ztn_msg->zone,
854 &ztn_msg->value_zone, 854 &ztn_msg->value_zone,
855 &handle_zone_to_name_it, &ztn_ctx)) 855 &handle_zone_to_name_it, &ztn_ctx))
@@ -858,7 +858,7 @@ handle_zone_to_name (void *cls,
858 that might be wrong */ 858 that might be wrong */
859 GNUNET_break (0); 859 GNUNET_break (0);
860 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 860 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
861 return; 861 return;
862 } 862 }
863 if (GNUNET_NO == ztn_ctx.success) 863 if (GNUNET_NO == ztn_ctx.success)
864 { 864 {
@@ -945,17 +945,17 @@ zone_iteraterate_proc (void *cls,
945 945
946 if ((NULL == zone_key) && (NULL == name)) 946 if ((NULL == zone_key) && (NULL == name))
947 { 947 {
948 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 948 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
949 "Iteration done\n"); 949 "Iteration done\n");
950 proc->res_iteration_finished = IT_SUCCESS_NOT_MORE_RESULTS_AVAILABLE; 950 proc->res_iteration_finished = IT_SUCCESS_NOT_MORE_RESULTS_AVAILABLE;
951 return; 951 return;
952 } 952 }
953 if ((NULL == zone_key) || (NULL == name)) 953 if ((NULL == zone_key) || (NULL == name))
954 { 954 {
955 /* what is this!? should never happen */ 955 /* what is this!? should never happen */
956 proc->res_iteration_finished = IT_START; 956 proc->res_iteration_finished = IT_START;
957 GNUNET_break (0); 957 GNUNET_break (0);
958 return; 958 return;
959 } 959 }
960 proc->res_iteration_finished = IT_SUCCESS_MORE_AVAILABLE; 960 proc->res_iteration_finished = IT_SUCCESS_MORE_AVAILABLE;
961 send_lookup_response (snc, 961 send_lookup_response (snc,
@@ -1001,11 +1001,11 @@ run_zone_iteration_round (struct ZoneIteration *zi)
1001 while (IT_START == proc.res_iteration_finished) 1001 while (IT_START == proc.res_iteration_finished)
1002 { 1002 {
1003 if (GNUNET_SYSERR == 1003 if (GNUNET_SYSERR ==
1004 (ret = GSN_database->iterate_records (GSN_database->cls, 1004 (ret = GSN_database->iterate_records (GSN_database->cls,
1005 (0 == memcmp (&zi->zone, &zero, sizeof (zero))) 1005 (0 == memcmp (&zi->zone, &zero, sizeof (zero)))
1006 ? NULL 1006 ? NULL
1007 : &zi->zone, 1007 : &zi->zone,
1008 zi->offset, 1008 zi->offset,
1009 &zone_iteraterate_proc, &proc))) 1009 &zone_iteraterate_proc, &proc)))
1010 { 1010 {
1011 GNUNET_break (0); 1011 GNUNET_break (0);
@@ -1027,10 +1027,10 @@ run_zone_iteration_round (struct ZoneIteration *zi)
1027 rrm.gns_header.header.size = htons (sizeof (rrm)); 1027 rrm.gns_header.header.size = htons (sizeof (rrm));
1028 rrm.gns_header.r_id = htonl (zi->request_id); 1028 rrm.gns_header.r_id = htonl (zi->request_id);
1029 GNUNET_SERVER_notification_context_unicast (snc, 1029 GNUNET_SERVER_notification_context_unicast (snc,
1030 zi->client->client, 1030 zi->client->client,
1031 &rrm.gns_header.header, 1031 &rrm.gns_header.header,
1032 GNUNET_NO); 1032 GNUNET_NO);
1033 GNUNET_CONTAINER_DLL_remove (zi->client->op_head, 1033 GNUNET_CONTAINER_DLL_remove (zi->client->op_head,
1034 zi->client->op_tail, 1034 zi->client->op_tail,
1035 zi); 1035 zi);
1036 GNUNET_free (zi); 1036 GNUNET_free (zi);
@@ -1159,7 +1159,7 @@ handle_iteration_next (void *cls,
1159 * Send 'sync' message to zone monitor, we're now in sync. 1159 * Send 'sync' message to zone monitor, we're now in sync.
1160 * 1160 *
1161 * @param zm monitor that is now in sync 1161 * @param zm monitor that is now in sync
1162 */ 1162 */
1163static void 1163static void
1164monitor_sync (struct ZoneMonitor *zm) 1164monitor_sync (struct ZoneMonitor *zm)
1165{ 1165{
@@ -1234,8 +1234,8 @@ handle_monitor_start (void *cls,
1234{ 1234{
1235 const struct ZoneMonitorStartMessage *zis_msg; 1235 const struct ZoneMonitorStartMessage *zis_msg;
1236 struct ZoneMonitor *zm; 1236 struct ZoneMonitor *zm;
1237 1237
1238 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1238 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1239 "Received `%s' message\n", 1239 "Received `%s' message\n",
1240 "ZONE_MONITOR_START"); 1240 "ZONE_MONITOR_START");
1241 zis_msg = (const struct ZoneMonitorStartMessage *) message; 1241 zis_msg = (const struct ZoneMonitorStartMessage *) message;
@@ -1249,7 +1249,7 @@ handle_monitor_start (void *cls,
1249 GNUNET_SERVER_disable_receive_done_warning (client); 1249 GNUNET_SERVER_disable_receive_done_warning (client);
1250 GNUNET_SERVER_notification_context_add (monitor_nc, 1250 GNUNET_SERVER_notification_context_add (monitor_nc,
1251 client); 1251 client);
1252 zm->task = GNUNET_SCHEDULER_add_now (&monitor_next, zm); 1252 zm->task = GNUNET_SCHEDULER_add_now (&monitor_next, zm);
1253} 1253}
1254 1254
1255 1255
@@ -1265,7 +1265,7 @@ monitor_next (void *cls,
1265{ 1265{
1266 struct ZoneMonitor *zm = cls; 1266 struct ZoneMonitor *zm = cls;
1267 int ret; 1267 int ret;
1268 1268
1269 zm->task = GNUNET_SCHEDULER_NO_TASK; 1269 zm->task = GNUNET_SCHEDULER_NO_TASK;
1270 ret = GSN_database->iterate_records (GSN_database->cls, 1270 ret = GSN_database->iterate_records (GSN_database->cls,
1271 &zm->zone, 1271 &zm->zone,
@@ -1332,7 +1332,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1332 GNUNET_free (database); 1332 GNUNET_free (database);
1333 if (NULL == GSN_database) 1333 if (NULL == GSN_database)
1334 { 1334 {
1335 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1335 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1336 "Could not load database backend `%s'\n", 1336 "Could not load database backend `%s'\n",
1337 db_lib_name); 1337 db_lib_name);
1338 GNUNET_SCHEDULER_add_now (&cleanup_task, NULL); 1338 GNUNET_SCHEDULER_add_now (&cleanup_task, NULL);