diff options
Diffstat (limited to 'src/peerstore/gnunet-service-peerstore.c')
-rw-r--r-- | src/peerstore/gnunet-service-peerstore.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c index 06333afeb..4c05a14fc 100644 --- a/src/peerstore/gnunet-service-peerstore.c +++ b/src/peerstore/gnunet-service-peerstore.c | |||
@@ -536,7 +536,7 @@ handle_store (void *cls, const struct StoreRecordMessage *srm) | |||
536 | static void | 536 | static void |
537 | store_hello_continuation (void *cls, int success) | 537 | store_hello_continuation (void *cls, int success) |
538 | { | 538 | { |
539 | (void *) cls; | 539 | (void) cls; |
540 | 540 | ||
541 | if (GNUNET_OK != success) | 541 | if (GNUNET_OK != success) |
542 | { | 542 | { |
@@ -550,7 +550,7 @@ store_hello_continuation (void *cls, int success) | |||
550 | static int | 550 | static int |
551 | hosts_directory_scan_callback (void *cls, const char *fullname) | 551 | hosts_directory_scan_callback (void *cls, const char *fullname) |
552 | { | 552 | { |
553 | (void *) cls; | 553 | (void) cls; |
554 | const char *filename; | 554 | const char *filename; |
555 | ssize_t size_total; | 555 | ssize_t size_total; |
556 | char buffer[GNUNET_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN; | 556 | char buffer[GNUNET_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN; |
@@ -568,7 +568,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname) | |||
568 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 568 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
569 | "2 hosts_directory_scan_callback filename %s\n", | 569 | "2 hosts_directory_scan_callback filename %s\n", |
570 | fullname); | 570 | fullname); |
571 | 571 | ||
572 | /* filename = strrchr (fullname, DIR_SEPARATOR); */ | 572 | /* filename = strrchr (fullname, DIR_SEPARATOR); */ |
573 | /* if ((NULL == filename) || (1 > strlen (filename))) */ | 573 | /* if ((NULL == filename) || (1 > strlen (filename))) */ |
574 | /* filename = fullname; */ | 574 | /* filename = fullname; */ |
@@ -578,7 +578,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname) | |||
578 | /* GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, */ | 578 | /* GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, */ |
579 | /* "3 hosts_directory_scan_callback filename %s\n", */ | 579 | /* "3 hosts_directory_scan_callback filename %s\n", */ |
580 | /* filename); */ | 580 | /* filename); */ |
581 | 581 | ||
582 | /* if (GNUNET_YES != GNUNET_DISK_file_test (filename)) */ | 582 | /* if (GNUNET_YES != GNUNET_DISK_file_test (filename)) */ |
583 | /* return GNUNET_OK; */ | 583 | /* return GNUNET_OK; */ |
584 | size_total = GNUNET_DISK_fn_read (fullname, buffer, sizeof(buffer)); | 584 | size_total = GNUNET_DISK_fn_read (fullname, buffer, sizeof(buffer)); |
@@ -604,7 +604,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname) | |||
604 | pid, | 604 | pid, |
605 | "", | 605 | "", |
606 | hello, | 606 | hello, |
607 | sizeof (hello), | 607 | size_total, |
608 | GNUNET_TIME_UNIT_FOREVER_ABS, | 608 | GNUNET_TIME_UNIT_FOREVER_ABS, |
609 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, | 609 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, |
610 | &store_hello_continuation, | 610 | &store_hello_continuation, |
@@ -613,6 +613,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname) | |||
613 | GNUNET_break (0); | 613 | GNUNET_break (0); |
614 | } | 614 | } |
615 | GNUNET_HELLO_builder_free (builder); | 615 | GNUNET_HELLO_builder_free (builder); |
616 | return GNUNET_OK; | ||
616 | } | 617 | } |
617 | 618 | ||
618 | 619 | ||
@@ -636,7 +637,7 @@ run (void *cls, | |||
636 | in_shutdown = GNUNET_NO; | 637 | in_shutdown = GNUNET_NO; |
637 | num_clients = 0; | 638 | num_clients = 0; |
638 | cfg = c; | 639 | cfg = c; |
639 | 640 | ||
640 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, | 641 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, |
641 | "peerstore", | 642 | "peerstore", |
642 | "DATABASE", | 643 | "DATABASE", |