diff options
author | t3sserakt <t3ss@posteo.de> | 2020-07-21 12:30:37 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-07-21 12:30:37 +0200 |
commit | 5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7 (patch) | |
tree | c26167460724fea683ef51a88ffd93d1fa830412 /src | |
parent | 17d84245fdfeeb1a6da4ffb97898903cb55f702c (diff) | |
parent | 7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (diff) | |
download | gnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.tar.gz gnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.zip |
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src')
324 files changed, 1899 insertions, 1507 deletions
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c index f7e03fb4a..ff7dd09c5 100644 --- a/src/abd/gnunet-abd.c +++ b/src/abd/gnunet-abd.c | |||
@@ -513,8 +513,8 @@ get_existing_record (void *cls, | |||
513 | const struct GNUNET_GNSRECORD_Data *rd) | 513 | const struct GNUNET_GNSRECORD_Data *rd) |
514 | { | 514 | { |
515 | struct GNUNET_GNSRECORD_Data *rde; | 515 | struct GNUNET_GNSRECORD_Data *rde; |
516 | struct GNUNET_GNSRECORD_Data* rdn = | 516 | struct GNUNET_GNSRECORD_Data*rdn = |
517 | GNUNET_malloc(sizeof(*rdn)*(rd_count + 1)); | 517 | GNUNET_malloc (sizeof(*rdn) * (rd_count + 1)); |
518 | 518 | ||
519 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); | 519 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); |
520 | GNUNET_memcpy (&rdn[1], rd, | 520 | GNUNET_memcpy (&rdn[1], rd, |
@@ -541,7 +541,7 @@ get_existing_record (void *cls, | |||
541 | rde, | 541 | rde, |
542 | &add_continuation, | 542 | &add_continuation, |
543 | &add_qe); | 543 | &add_qe); |
544 | GNUNET_free(rdn); | 544 | GNUNET_free (rdn); |
545 | return; | 545 | return; |
546 | } | 546 | } |
547 | 547 | ||
@@ -604,13 +604,18 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
604 | if (GNUNET_OK != | 604 | if (GNUNET_OK != |
605 | GNUNET_GNSRECORD_string_to_value (type, subject, &data, &data_size)) | 605 | GNUNET_GNSRECORD_string_to_value (type, subject, &data, &data_size)) |
606 | { | 606 | { |
607 | if(typestring == NULL) { | 607 | if (typestring == NULL) |
608 | fputs("No value for unknown record type\n", stderr); | 608 | { |
609 | } else if(subject == NULL) { | 609 | fputs ("No value for unknown record type\n", stderr); |
610 | fprintf(stderr, | 610 | } |
611 | "No value for record type`%s'\n", | 611 | else if (subject == NULL) |
612 | typestring); | 612 | { |
613 | } else { | 613 | fprintf (stderr, |
614 | "No value for record type`%s'\n", | ||
615 | typestring); | ||
616 | } | ||
617 | else | ||
618 | { | ||
614 | fprintf (stderr, | 619 | fprintf (stderr, |
615 | "Value `%s' invalid for record type `%s'\n", | 620 | "Value `%s' invalid for record type `%s'\n", |
616 | subject, | 621 | subject, |
@@ -723,7 +728,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
723 | GNUNET_free (dele); | 728 | GNUNET_free (dele); |
724 | printf ("%s\n", res); | 729 | printf ("%s\n", res); |
725 | 730 | ||
726 | GNUNET_free_non_null (ego_name); | 731 | GNUNET_free (ego_name); |
727 | ego_name = NULL; | 732 | ego_name = NULL; |
728 | 733 | ||
729 | GNUNET_SCHEDULER_shutdown (); | 734 | GNUNET_SCHEDULER_shutdown (); |
@@ -927,8 +932,8 @@ run (void *cls, | |||
927 | int i; | 932 | int i; |
928 | while (NULL != (tok = strtok (NULL, ","))) | 933 | while (NULL != (tok = strtok (NULL, ","))) |
929 | count++; | 934 | count++; |
930 | struct GNUNET_ABD_Delegate* delegates = | 935 | struct GNUNET_ABD_Delegate*delegates = |
931 | GNUNET_malloc(sizeof(*delegates)*count); | 936 | GNUNET_malloc (sizeof(*delegates) * count); |
932 | struct GNUNET_ABD_Delegate *dele; | 937 | struct GNUNET_ABD_Delegate *dele; |
933 | GNUNET_free (tmp); | 938 | GNUNET_free (tmp); |
934 | tmp = GNUNET_strdup (subject_delegate); | 939 | tmp = GNUNET_strdup (subject_delegate); |
@@ -961,7 +966,7 @@ run (void *cls, | |||
961 | delegates[i].issuer_attribute = NULL; | 966 | delegates[i].issuer_attribute = NULL; |
962 | } | 967 | } |
963 | GNUNET_free (tmp); | 968 | GNUNET_free (tmp); |
964 | GNUNET_free(delegates); | 969 | GNUNET_free (delegates); |
965 | } | 970 | } |
966 | else | 971 | else |
967 | { | 972 | { |
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c index 36b0009ef..569d42295 100644 --- a/src/abd/gnunet-service-abd.c +++ b/src/abd/gnunet-service-abd.c | |||
@@ -364,14 +364,14 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text) | |||
364 | static void | 364 | static void |
365 | cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) | 365 | cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) |
366 | { | 366 | { |
367 | GNUNET_free_non_null (ds_entry->issuer_key); | 367 | GNUNET_free (ds_entry->issuer_key); |
368 | GNUNET_free_non_null (ds_entry->issuer_attribute); | 368 | GNUNET_free (ds_entry->issuer_attribute); |
369 | GNUNET_free_non_null (ds_entry->attr_trailer); | 369 | GNUNET_free (ds_entry->attr_trailer); |
370 | // those fields are only set/used in bw search | 370 | // those fields are only set/used in bw search |
371 | if (ds_entry->from_bw) | 371 | if (ds_entry->from_bw) |
372 | { | 372 | { |
373 | GNUNET_free_non_null (ds_entry->lookup_attribute); | 373 | GNUNET_free (ds_entry->lookup_attribute); |
374 | GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); | 374 | GNUNET_free (ds_entry->unresolved_attribute_delegation); |
375 | } | 375 | } |
376 | if (NULL != ds_entry->lookup_request) | 376 | if (NULL != ds_entry->lookup_request) |
377 | { | 377 | { |
@@ -380,9 +380,9 @@ cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) | |||
380 | } | 380 | } |
381 | if (NULL != ds_entry->delegation_chain_entry) | 381 | if (NULL != ds_entry->delegation_chain_entry) |
382 | { | 382 | { |
383 | GNUNET_free_non_null ( | 383 | GNUNET_free ( |
384 | ds_entry->delegation_chain_entry->subject_attribute); | 384 | ds_entry->delegation_chain_entry->subject_attribute); |
385 | GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); | 385 | GNUNET_free (ds_entry->delegation_chain_entry->issuer_attribute); |
386 | GNUNET_free (ds_entry->delegation_chain_entry); | 386 | GNUNET_free (ds_entry->delegation_chain_entry); |
387 | } | 387 | } |
388 | // Free DQ entries | 388 | // Free DQ entries |
@@ -423,11 +423,11 @@ cleanup_handle (struct VerifyRequestHandle *vrh) | |||
423 | GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head, | 423 | GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head, |
424 | vrh->del_chain_tail, | 424 | vrh->del_chain_tail, |
425 | del_entry); | 425 | del_entry); |
426 | GNUNET_free_non_null (del_entry->delegate); | 426 | GNUNET_free (del_entry->delegate); |
427 | GNUNET_free (del_entry); | 427 | GNUNET_free (del_entry); |
428 | } | 428 | } |
429 | } | 429 | } |
430 | GNUNET_free_non_null (vrh->issuer_attribute); | 430 | GNUNET_free (vrh->issuer_attribute); |
431 | GNUNET_free (vrh); | 431 | GNUNET_free (vrh); |
432 | } | 432 | } |
433 | 433 | ||
diff --git a/src/abd/plugin_gnsrecord_abd.c b/src/abd/plugin_gnsrecord_abd.c index 850fa9a45..272872e24 100644 --- a/src/abd/plugin_gnsrecord_abd.c +++ b/src/abd/plugin_gnsrecord_abd.c | |||
@@ -235,7 +235,8 @@ abd_string_to_value (void *cls, | |||
235 | (char *) &sets[1]); | 235 | (char *) &sets[1]); |
236 | for (i = 0; i < entries; i++) | 236 | for (i = 0; i < entries; i++) |
237 | { | 237 | { |
238 | if (0 != set[i].subject_attribute_len) { | 238 | if (0 != set[i].subject_attribute_len) |
239 | { | ||
239 | GNUNET_free_nz ((char *) set[i].subject_attribute); | 240 | GNUNET_free_nz ((char *) set[i].subject_attribute); |
240 | set[i].subject_attribute = NULL; | 241 | set[i].subject_attribute = NULL; |
241 | } | 242 | } |
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index 1c402a8e0..899b6f152 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -729,8 +729,7 @@ start_arm_service (struct GNUNET_ARM_Handle *h, | |||
729 | /* Means we are ONLY running locally */ | 729 | /* Means we are ONLY running locally */ |
730 | /* we're clearly running a test, don't daemonize */ | 730 | /* we're clearly running a test, don't daemonize */ |
731 | if (NULL == config) | 731 | if (NULL == config) |
732 | proc = GNUNET_OS_start_process_s (GNUNET_NO, | 732 | proc = GNUNET_OS_start_process_s (std_inheritance, |
733 | std_inheritance, | ||
734 | lsocks, | 733 | lsocks, |
735 | loprefix, | 734 | loprefix, |
736 | quotedbinary, | 735 | quotedbinary, |
@@ -738,8 +737,7 @@ start_arm_service (struct GNUNET_ARM_Handle *h, | |||
738 | lopostfix, | 737 | lopostfix, |
739 | NULL); | 738 | NULL); |
740 | else | 739 | else |
741 | proc = GNUNET_OS_start_process_s (GNUNET_NO, | 740 | proc = GNUNET_OS_start_process_s (std_inheritance, |
742 | std_inheritance, | ||
743 | lsocks, | 741 | lsocks, |
744 | loprefix, | 742 | loprefix, |
745 | quotedbinary, | 743 | quotedbinary, |
@@ -752,8 +750,7 @@ start_arm_service (struct GNUNET_ARM_Handle *h, | |||
752 | else | 750 | else |
753 | { | 751 | { |
754 | if (NULL == config) | 752 | if (NULL == config) |
755 | proc = GNUNET_OS_start_process_s (GNUNET_NO, | 753 | proc = GNUNET_OS_start_process_s (std_inheritance, |
756 | std_inheritance, | ||
757 | lsocks, | 754 | lsocks, |
758 | loprefix, | 755 | loprefix, |
759 | quotedbinary, | 756 | quotedbinary, |
@@ -761,8 +758,7 @@ start_arm_service (struct GNUNET_ARM_Handle *h, | |||
761 | lopostfix, | 758 | lopostfix, |
762 | NULL); | 759 | NULL); |
763 | else | 760 | else |
764 | proc = GNUNET_OS_start_process_s (GNUNET_NO, | 761 | proc = GNUNET_OS_start_process_s (std_inheritance, |
765 | std_inheritance, | ||
766 | lsocks, | 762 | lsocks, |
767 | loprefix, | 763 | loprefix, |
768 | quotedbinary, | 764 | quotedbinary, |
@@ -774,7 +770,7 @@ start_arm_service (struct GNUNET_ARM_Handle *h, | |||
774 | } | 770 | } |
775 | GNUNET_free (binary); | 771 | GNUNET_free (binary); |
776 | GNUNET_free (quotedbinary); | 772 | GNUNET_free (quotedbinary); |
777 | GNUNET_free_non_null (config); | 773 | GNUNET_free (config); |
778 | GNUNET_free (loprefix); | 774 | GNUNET_free (loprefix); |
779 | GNUNET_free (lopostfix); | 775 | GNUNET_free (lopostfix); |
780 | if (NULL == proc) | 776 | if (NULL == proc) |
@@ -976,10 +972,7 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h, | |||
976 | the above check should catch 99.99% of the cases where ARM | 972 | the above check should catch 99.99% of the cases where ARM |
977 | is already running. */LOG (GNUNET_ERROR_TYPE_DEBUG, | 973 | is already running. */LOG (GNUNET_ERROR_TYPE_DEBUG, |
978 | "Starting ARM service\n"); | 974 | "Starting ARM service\n"); |
979 | if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_NO, | 975 | if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE))) |
980 | GNUNET_NO, | ||
981 | GNUNET_NO, | ||
982 | GNUNET_YES))) | ||
983 | { | 976 | { |
984 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, | 977 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, |
985 | "pipe"); | 978 | "pipe"); |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 09d85ca89..263c99cc4 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -475,7 +475,7 @@ get_server_addresses (const char *service_name, | |||
475 | (EACCES == errno)) | 475 | (EACCES == errno)) |
476 | { | 476 | { |
477 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); | 477 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); |
478 | GNUNET_free_non_null (hostname); | 478 | GNUNET_free (hostname); |
479 | GNUNET_free (unixpath); | 479 | GNUNET_free (unixpath); |
480 | return GNUNET_SYSERR; | 480 | return GNUNET_SYSERR; |
481 | } | 481 | } |
@@ -504,7 +504,7 @@ get_server_addresses (const char *service_name, | |||
504 | _ ( | 504 | _ ( |
505 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 505 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
506 | service_name); | 506 | service_name); |
507 | GNUNET_free_non_null (hostname); | 507 | GNUNET_free (hostname); |
508 | return GNUNET_SYSERR; | 508 | return GNUNET_SYSERR; |
509 | } | 509 | } |
510 | if (0 == port) | 510 | if (0 == port) |
@@ -512,8 +512,8 @@ get_server_addresses (const char *service_name, | |||
512 | saddrs = GNUNET_new_array (2, struct sockaddr *); | 512 | saddrs = GNUNET_new_array (2, struct sockaddr *); |
513 | saddrlens = GNUNET_new_array (2, socklen_t); | 513 | saddrlens = GNUNET_new_array (2, socklen_t); |
514 | add_unixpath (saddrs, saddrlens, unixpath, abstract); | 514 | add_unixpath (saddrs, saddrlens, unixpath, abstract); |
515 | GNUNET_free_non_null (unixpath); | 515 | GNUNET_free (unixpath); |
516 | GNUNET_free_non_null (hostname); | 516 | GNUNET_free (hostname); |
517 | *addrs = saddrs; | 517 | *addrs = saddrs; |
518 | *addr_lens = saddrlens; | 518 | *addr_lens = saddrlens; |
519 | return 1; | 519 | return 1; |
@@ -537,7 +537,7 @@ get_server_addresses (const char *service_name, | |||
537 | hostname, | 537 | hostname, |
538 | gai_strerror (ret)); | 538 | gai_strerror (ret)); |
539 | GNUNET_free (hostname); | 539 | GNUNET_free (hostname); |
540 | GNUNET_free_non_null (unixpath); | 540 | GNUNET_free (unixpath); |
541 | return GNUNET_SYSERR; | 541 | return GNUNET_SYSERR; |
542 | } | 542 | } |
543 | next = res; | 543 | next = res; |
@@ -557,7 +557,7 @@ get_server_addresses (const char *service_name, | |||
557 | hostname); | 557 | hostname); |
558 | freeaddrinfo (res); | 558 | freeaddrinfo (res); |
559 | GNUNET_free (hostname); | 559 | GNUNET_free (hostname); |
560 | GNUNET_free_non_null (unixpath); | 560 | GNUNET_free (unixpath); |
561 | return GNUNET_SYSERR; | 561 | return GNUNET_SYSERR; |
562 | } | 562 | } |
563 | resi = i; | 563 | resi = i; |
@@ -664,7 +664,7 @@ get_server_addresses (const char *service_name, | |||
664 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 664 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
665 | } | 665 | } |
666 | } | 666 | } |
667 | GNUNET_free_non_null (unixpath); | 667 | GNUNET_free (unixpath); |
668 | *addrs = saddrs; | 668 | *addrs = saddrs; |
669 | *addr_lens = saddrlens; | 669 | *addr_lens = saddrlens; |
670 | return resi; | 670 | return resi; |
@@ -858,8 +858,10 @@ start_process (struct ServiceList *sl, | |||
858 | * of ''-quoted strings, escaping should be considered. */ | 858 | * of ''-quoted strings, escaping should be considered. */ |
859 | if (NULL != options) | 859 | if (NULL != options) |
860 | options = GNUNET_CONFIGURATION_expand_dollar (cfg, options); | 860 | options = GNUNET_CONFIGURATION_expand_dollar (cfg, options); |
861 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, | 861 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
862 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 862 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
863 | | GNUNET_OS_USE_PIPE_CONTROL | ||
864 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
863 | lsocks, | 865 | lsocks, |
864 | loprefix, | 866 | loprefix, |
865 | quotedbinary, | 867 | quotedbinary, |
@@ -880,7 +882,11 @@ start_process (struct ServiceList *sl, | |||
880 | if (GNUNET_YES == use_debug) | 882 | if (GNUNET_YES == use_debug) |
881 | { | 883 | { |
882 | if (NULL == sl->config) | 884 | if (NULL == sl->config) |
883 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, | 885 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
886 | ? | ||
887 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR | ||
888 | | GNUNET_OS_USE_PIPE_CONTROL | ||
889 | : | ||
884 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 890 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
885 | lsocks, | 891 | lsocks, |
886 | loprefix, | 892 | loprefix, |
@@ -890,7 +896,11 @@ start_process (struct ServiceList *sl, | |||
890 | options, | 896 | options, |
891 | NULL); | 897 | NULL); |
892 | else | 898 | else |
893 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, | 899 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
900 | ? | ||
901 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR | ||
902 | | GNUNET_OS_USE_PIPE_CONTROL | ||
903 | : | ||
894 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 904 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
895 | lsocks, | 905 | lsocks, |
896 | loprefix, | 906 | loprefix, |
@@ -905,7 +915,11 @@ start_process (struct ServiceList *sl, | |||
905 | else | 915 | else |
906 | { | 916 | { |
907 | if (NULL == sl->config) | 917 | if (NULL == sl->config) |
908 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, | 918 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
919 | ? | ||
920 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR | ||
921 | | GNUNET_OS_USE_PIPE_CONTROL | ||
922 | : | ||
909 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 923 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
910 | lsocks, | 924 | lsocks, |
911 | loprefix, | 925 | loprefix, |
@@ -913,7 +927,11 @@ start_process (struct ServiceList *sl, | |||
913 | options, | 927 | options, |
914 | NULL); | 928 | NULL); |
915 | else | 929 | else |
916 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, | 930 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
931 | ? | ||
932 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR | ||
933 | | GNUNET_OS_USE_PIPE_CONTROL | ||
934 | : | ||
917 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 935 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
918 | lsocks, | 936 | lsocks, |
919 | loprefix, | 937 | loprefix, |
@@ -1132,8 +1150,8 @@ free_service (struct ServiceList *sl) | |||
1132 | GNUNET_assert (GNUNET_YES == in_shutdown); | 1150 | GNUNET_assert (GNUNET_YES == in_shutdown); |
1133 | GNUNET_CONTAINER_DLL_remove (running_head, running_tail, sl); | 1151 | GNUNET_CONTAINER_DLL_remove (running_head, running_tail, sl); |
1134 | GNUNET_assert (NULL == sl->listen_head); | 1152 | GNUNET_assert (NULL == sl->listen_head); |
1135 | GNUNET_free_non_null (sl->config); | 1153 | GNUNET_free (sl->config); |
1136 | GNUNET_free_non_null (sl->binary); | 1154 | GNUNET_free (sl->binary); |
1137 | GNUNET_free (sl->name); | 1155 | GNUNET_free (sl->name); |
1138 | GNUNET_free (sl); | 1156 | GNUNET_free (sl); |
1139 | } | 1157 | } |
@@ -2152,7 +2170,7 @@ main (int argc, char *const *argv) | |||
2152 | GNUNET_MQ_handler_end () | 2170 | GNUNET_MQ_handler_end () |
2153 | }; | 2171 | }; |
2154 | 2172 | ||
2155 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); | 2173 | sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
2156 | GNUNET_assert (NULL != sigpipe); | 2174 | GNUNET_assert (NULL != sigpipe); |
2157 | shc_chld = | 2175 | shc_chld = |
2158 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, | 2176 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, |
diff --git a/src/ats-tests/Makefile.am b/src/ats-tests/Makefile.am index 1375d1505..cc30f660a 100644 --- a/src/ats-tests/Makefile.am +++ b/src/ats-tests/Makefile.am | |||
@@ -41,8 +41,10 @@ libgnunetatstesting_la_SOURCES = \ | |||
41 | ats-testing-experiment.c ats-testing-preferences.c | 41 | ats-testing-experiment.c ats-testing-preferences.c |
42 | libgnunetatstesting_la_LIBADD = \ | 42 | libgnunetatstesting_la_LIBADD = \ |
43 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 43 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
44 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | ||
44 | $(top_builddir)/src/core/libgnunetcore.la \ | 45 | $(top_builddir)/src/core/libgnunetcore.la \ |
45 | $(top_builddir)/src/transport/libgnunettransport.la \ | 46 | $(top_builddir)/src/transport/libgnunettransport.la \ |
47 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
46 | $(top_builddir)/src/ats/libgnunetats.la \ | 48 | $(top_builddir)/src/ats/libgnunetats.la \ |
47 | $(top_builddir)/src/util/libgnunetutil.la \ | 49 | $(top_builddir)/src/util/libgnunetutil.la \ |
48 | $(GN_LIBINTL) | 50 | $(GN_LIBINTL) |
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c index fa379200f..9f8db1be4 100644 --- a/src/ats-tests/ats-testing-experiment.c +++ b/src/ats-tests/ats-testing-experiment.c | |||
@@ -88,8 +88,8 @@ free_experiment (struct Experiment *e) | |||
88 | GNUNET_free (cur); | 88 | GNUNET_free (cur); |
89 | } | 89 | } |
90 | 90 | ||
91 | GNUNET_free_non_null (e->name); | 91 | GNUNET_free (e->name); |
92 | GNUNET_free_non_null (e->cfg_file); | 92 | GNUNET_free (e->cfg_file); |
93 | GNUNET_free (e); | 93 | GNUNET_free (e); |
94 | } | 94 | } |
95 | 95 | ||
@@ -332,7 +332,7 @@ load_episode (struct Experiment *e, | |||
332 | GNUNET_free (type); | 332 | GNUNET_free (type); |
333 | GNUNET_free (op_name); | 333 | GNUNET_free (op_name); |
334 | GNUNET_free (op); | 334 | GNUNET_free (op); |
335 | GNUNET_free_non_null (pref); | 335 | GNUNET_free (pref); |
336 | GNUNET_free (o); | 336 | GNUNET_free (o); |
337 | GNUNET_free (sec_name); | 337 | GNUNET_free (sec_name); |
338 | return GNUNET_SYSERR; | 338 | return GNUNET_SYSERR; |
@@ -350,7 +350,7 @@ load_episode (struct Experiment *e, | |||
350 | GNUNET_free (type); | 350 | GNUNET_free (type); |
351 | GNUNET_free (op_name); | 351 | GNUNET_free (op_name); |
352 | GNUNET_free (op); | 352 | GNUNET_free (op); |
353 | GNUNET_free_non_null (pref); | 353 | GNUNET_free (pref); |
354 | GNUNET_free (o); | 354 | GNUNET_free (o); |
355 | GNUNET_free (sec_name); | 355 | GNUNET_free (sec_name); |
356 | return GNUNET_SYSERR; | 356 | return GNUNET_SYSERR; |
@@ -384,7 +384,7 @@ load_episode (struct Experiment *e, | |||
384 | fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n", | 384 | fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n", |
385 | op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id); | 385 | op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id); |
386 | 386 | ||
387 | GNUNET_free_non_null (type); | 387 | GNUNET_free (type); |
388 | GNUNET_free (op); | 388 | GNUNET_free (op); |
389 | 389 | ||
390 | GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o); | 390 | GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o); |
diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c index c7969cdfe..c6ba8533d 100644 --- a/src/ats-tests/ats-testing.c +++ b/src/ats-tests/ats-testing.c | |||
@@ -110,7 +110,7 @@ do_shutdown (void *cls) | |||
110 | GNUNET_TESTBED_operation_done (p->comm_op); | 110 | GNUNET_TESTBED_operation_done (p->comm_op); |
111 | p->comm_op = NULL; | 111 | p->comm_op = NULL; |
112 | } | 112 | } |
113 | GNUNET_free_non_null (p->core_connect_ops); | 113 | GNUNET_free (p->core_connect_ops); |
114 | GNUNET_free (p->partners); | 114 | GNUNET_free (p->partners); |
115 | p->partners = NULL; | 115 | p->partners = NULL; |
116 | } | 116 | } |
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c index fb3014798..15cd52e2f 100644 --- a/src/ats-tests/gnunet-ats-sim.c +++ b/src/ats-tests/gnunet-ats-sim.c | |||
@@ -339,7 +339,7 @@ parse_args (int argc, char *argv[]) | |||
339 | { | 339 | { |
340 | if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e"))) | 340 | if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e"))) |
341 | { | 341 | { |
342 | GNUNET_free_non_null (opt_exp_file); | 342 | GNUNET_free (opt_exp_file); |
343 | opt_exp_file = GNUNET_strdup (argv[c + 1]); | 343 | opt_exp_file = GNUNET_strdup (argv[c + 1]); |
344 | } | 344 | } |
345 | if (0 == strcmp (argv[c], "-l")) | 345 | if (0 == strcmp (argv[c], "-l")) |
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c index 09ddd7b2d..7a3461bf7 100644 --- a/src/ats-tests/gnunet-solver-eval.c +++ b/src/ats-tests/gnunet-solver-eval.c | |||
@@ -94,8 +94,8 @@ free_experiment (struct Experiment *e) | |||
94 | GNUNET_free (cur); | 94 | GNUNET_free (cur); |
95 | } | 95 | } |
96 | 96 | ||
97 | GNUNET_free_non_null (e->name); | 97 | GNUNET_free (e->name); |
98 | GNUNET_free_non_null (e->cfg_file); | 98 | GNUNET_free (e->cfg_file); |
99 | GNUNET_free (e); | 99 | GNUNET_free (e); |
100 | } | 100 | } |
101 | 101 | ||
@@ -344,7 +344,7 @@ load_episode (struct Experiment *e, | |||
344 | GNUNET_free (op_name); | 344 | GNUNET_free (op_name); |
345 | GNUNET_free (op); | 345 | GNUNET_free (op); |
346 | GNUNET_free (sec_name); | 346 | GNUNET_free (sec_name); |
347 | GNUNET_free_non_null (pref); | 347 | GNUNET_free (pref); |
348 | GNUNET_free (o); | 348 | GNUNET_free (o); |
349 | return GNUNET_SYSERR; | 349 | return GNUNET_SYSERR; |
350 | } | 350 | } |
@@ -364,7 +364,7 @@ load_episode (struct Experiment *e, | |||
364 | GNUNET_free (op_name); | 364 | GNUNET_free (op_name); |
365 | GNUNET_free (op); | 365 | GNUNET_free (op); |
366 | GNUNET_free (sec_name); | 366 | GNUNET_free (sec_name); |
367 | GNUNET_free_non_null (pref); | 367 | GNUNET_free (pref); |
368 | GNUNET_free (o); | 368 | GNUNET_free (o); |
369 | return GNUNET_SYSERR; | 369 | return GNUNET_SYSERR; |
370 | } | 370 | } |
@@ -397,7 +397,7 @@ load_episode (struct Experiment *e, | |||
397 | fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n", | 397 | fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n", |
398 | op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id); | 398 | op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id); |
399 | 399 | ||
400 | GNUNET_free_non_null (type); | 400 | GNUNET_free (type); |
401 | GNUNET_free (op); | 401 | GNUNET_free (op); |
402 | 402 | ||
403 | GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o); | 403 | GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o); |
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index 947ed7798..169daa6f1 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c | |||
@@ -978,8 +978,8 @@ main (int argc, char *const *argv) | |||
978 | options, | 978 | options, |
979 | &run, | 979 | &run, |
980 | NULL); | 980 | NULL); |
981 | GNUNET_free_non_null (opt_pid_str); | 981 | GNUNET_free (opt_pid_str); |
982 | GNUNET_free_non_null (opt_type_str); | 982 | GNUNET_free (opt_type_str); |
983 | GNUNET_free_nz ((void *) argv); | 983 | GNUNET_free_nz ((void *) argv); |
984 | 984 | ||
985 | if (GNUNET_OK == res) | 985 | if (GNUNET_OK == res) |
diff --git a/src/ats/ats.conf.in b/src/ats/ats.conf.in index 53c0de0c5..7691f98c0 100644 --- a/src/ats/ats.conf.in +++ b/src/ats/ats.conf.in | |||
@@ -12,9 +12,11 @@ UNIX_MATCH_GID = YES | |||
12 | # Designated assignment mode: PROPORTIONAL / MLP / RIL | 12 | # Designated assignment mode: PROPORTIONAL / MLP / RIL |
13 | MODE = proportional | 13 | MODE = proportional |
14 | 14 | ||
15 | # IMPORTANT: Do not lower those quotas below 10 MiB | ||
16 | # Or your peer may not bootstrap correctly. | ||
15 | # Network specific inbound/outbound quotas | 17 | # Network specific inbound/outbound quotas |
16 | UNSPECIFIED_QUOTA_IN = 64 KiB | 18 | UNSPECIFIED_QUOTA_IN = 10 MiB |
17 | UNSPECIFIED_QUOTA_OUT = 64 KiB | 19 | UNSPECIFIED_QUOTA_OUT = 10 MiB |
18 | # LOOPBACK | 20 | # LOOPBACK |
19 | LOOPBACK_QUOTA_IN = unlimited | 21 | LOOPBACK_QUOTA_IN = unlimited |
20 | LOOPBACK_QUOTA_OUT = unlimited | 22 | LOOPBACK_QUOTA_OUT = unlimited |
@@ -22,14 +24,14 @@ LOOPBACK_QUOTA_OUT = unlimited | |||
22 | LAN_QUOTA_IN = unlimited | 24 | LAN_QUOTA_IN = unlimited |
23 | LAN_QUOTA_OUT = unlimited | 25 | LAN_QUOTA_OUT = unlimited |
24 | # WAN | 26 | # WAN |
25 | WAN_QUOTA_IN = 64 KiB | 27 | WAN_QUOTA_IN = 10 MiB |
26 | WAN_QUOTA_OUT = 64 KiB | 28 | WAN_QUOTA_OUT = 10 MiB |
27 | # WLAN | 29 | # WLAN |
28 | WLAN_QUOTA_IN = 1 MiB | 30 | WLAN_QUOTA_IN = 10 MiB |
29 | WLAN_QUOTA_OUT = 1 MiB | 31 | WLAN_QUOTA_OUT = 10 MiB |
30 | # BLUETOOTH | 32 | # BLUETOOTH |
31 | BLUETOOTH_QUOTA_IN = 128 KiB | 33 | BLUETOOTH_QUOTA_IN = 10 MiB |
32 | BLUETOOTH_QUOTA_OUT = 128 KiB | 34 | BLUETOOTH_QUOTA_OUT = 10 MiB |
33 | # ATS options | 35 | # ATS options |
34 | 36 | ||
35 | # Proportional specific settings | 37 | # Proportional specific settings |
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index 6a014357e..25b963532 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -1307,17 +1307,17 @@ free_experiment (struct Experiment *e) | |||
1307 | for (cur_o = next_o; NULL != cur_o; cur_o = next_o) | 1307 | for (cur_o = next_o; NULL != cur_o; cur_o = next_o) |
1308 | { | 1308 | { |
1309 | next_o = cur_o->next; | 1309 | next_o = cur_o->next; |
1310 | GNUNET_free_non_null (cur_o->address); | 1310 | GNUNET_free (cur_o->address); |
1311 | GNUNET_free_non_null (cur_o->plugin); | 1311 | GNUNET_free (cur_o->plugin); |
1312 | GNUNET_free (cur_o); | 1312 | GNUNET_free (cur_o); |
1313 | } | 1313 | } |
1314 | GNUNET_free (cur); | 1314 | GNUNET_free (cur); |
1315 | } | 1315 | } |
1316 | 1316 | ||
1317 | GNUNET_free_non_null (e->name); | 1317 | GNUNET_free (e->name); |
1318 | GNUNET_free_non_null (e->log_prefix); | 1318 | GNUNET_free (e->log_prefix); |
1319 | GNUNET_free_non_null (e->log_output_dir); | 1319 | GNUNET_free (e->log_output_dir); |
1320 | GNUNET_free_non_null (e->cfg_file); | 1320 | GNUNET_free (e->cfg_file); |
1321 | GNUNET_free (e); | 1321 | GNUNET_free (e); |
1322 | } | 1322 | } |
1323 | 1323 | ||
@@ -1967,7 +1967,7 @@ load_op_start_set_property (struct GNUNET_ATS_TEST_Operation *o, | |||
1967 | fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n", | 1967 | fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n", |
1968 | op_counter, op_name, e->id); | 1968 | op_counter, op_name, e->id); |
1969 | GNUNET_free (op_name); | 1969 | GNUNET_free (op_name); |
1970 | GNUNET_free_non_null (prop); | 1970 | GNUNET_free (prop); |
1971 | return GNUNET_SYSERR; | 1971 | return GNUNET_SYSERR; |
1972 | } | 1972 | } |
1973 | 1973 | ||
@@ -2038,7 +2038,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o, | |||
2038 | fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n", | 2038 | fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n", |
2039 | op_counter, "STOP_SET_PROPERTY", op_name); | 2039 | op_counter, "STOP_SET_PROPERTY", op_name); |
2040 | GNUNET_free (op_name); | 2040 | GNUNET_free (op_name); |
2041 | GNUNET_free_non_null (pref); | 2041 | GNUNET_free (pref); |
2042 | return GNUNET_SYSERR; | 2042 | return GNUNET_SYSERR; |
2043 | } | 2043 | } |
2044 | 2044 | ||
@@ -2047,7 +2047,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o, | |||
2047 | fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n", | 2047 | fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n", |
2048 | op_counter, op_name, e->id); | 2048 | op_counter, op_name, e->id); |
2049 | GNUNET_free (op_name); | 2049 | GNUNET_free (op_name); |
2050 | GNUNET_free_non_null (pref); | 2050 | GNUNET_free (pref); |
2051 | return GNUNET_SYSERR; | 2051 | return GNUNET_SYSERR; |
2052 | } | 2052 | } |
2053 | 2053 | ||
@@ -2419,7 +2419,7 @@ enforce_del_address (struct GNUNET_ATS_TEST_Operation *op) | |||
2419 | } | 2419 | } |
2420 | GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a); | 2420 | GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a); |
2421 | 2421 | ||
2422 | GNUNET_free_non_null (a->ats_addr->atsi); | 2422 | GNUNET_free (a->ats_addr->atsi); |
2423 | GNUNET_free (a->ats_addr); | 2423 | GNUNET_free (a->ats_addr); |
2424 | GNUNET_free (a); | 2424 | GNUNET_free (a); |
2425 | } | 2425 | } |
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c index 8e20f4454..2fbadef4d 100644 --- a/src/ats/perf_ats_solver.c +++ b/src/ats/perf_ats_solver.c | |||
@@ -325,8 +325,8 @@ end_now (int res) | |||
325 | ph.stat = NULL; | 325 | ph.stat = NULL; |
326 | } | 326 | } |
327 | 327 | ||
328 | GNUNET_free_non_null (ph.peers); | 328 | GNUNET_free (ph.peers); |
329 | GNUNET_free_non_null (ph.iterations_results); | 329 | GNUNET_free (ph.iterations_results); |
330 | 330 | ||
331 | GAS_normalization_stop (); | 331 | GAS_normalization_stop (); |
332 | GAS_preference_done (); | 332 | GAS_preference_done (); |
@@ -1090,13 +1090,13 @@ write_all_iterations (void) | |||
1090 | if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full))) | 1090 | if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full))) |
1091 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", | 1091 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", |
1092 | data_fn_full); | 1092 | data_fn_full); |
1093 | GNUNET_free_non_null (data_fn_full); | 1093 | GNUNET_free (data_fn_full); |
1094 | 1094 | ||
1095 | if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close ( | 1095 | if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close ( |
1096 | f_update))) | 1096 | f_update))) |
1097 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", | 1097 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", |
1098 | data_fn_update); | 1098 | data_fn_update); |
1099 | GNUNET_free_non_null (data_fn_update); | 1099 | GNUNET_free (data_fn_update); |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | 1102 | ||
@@ -1115,7 +1115,7 @@ do_delete_address (void *cls, | |||
1115 | pid, | 1115 | pid, |
1116 | cur)); | 1116 | cur)); |
1117 | ph.sf->s_del (ph.sf->cls, cur); | 1117 | ph.sf->s_del (ph.sf->cls, cur); |
1118 | GNUNET_free_non_null (cur->atsi); | 1118 | GNUNET_free (cur->atsi); |
1119 | GNUNET_free (cur); | 1119 | GNUNET_free (cur); |
1120 | return GNUNET_OK; | 1120 | return GNUNET_OK; |
1121 | } | 1121 | } |
@@ -1427,7 +1427,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1427 | if (0 == c2) | 1427 | if (0 == c2) |
1428 | continue; | 1428 | continue; |
1429 | if (ph.measure_updates) | 1429 | if (ph.measure_updates) |
1430 | GNUNET_free_non_null ( | 1430 | GNUNET_free ( |
1431 | ph.iterations_results[c].update_results_array[c2]); | 1431 | ph.iterations_results[c].update_results_array[c2]); |
1432 | GNUNET_free (ph.iterations_results[c].results_array[c2]); | 1432 | GNUNET_free (ph.iterations_results[c].results_array[c2]); |
1433 | } | 1433 | } |
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c index f4324d238..52476c825 100644 --- a/src/ats/plugin_ats_proportional.c +++ b/src/ats/plugin_ats_proportional.c | |||
@@ -218,6 +218,8 @@ is_bandwidth_available_in_network (struct Network *net, | |||
218 | if (((net->total_quota_in / na) > min_bw) && | 218 | if (((net->total_quota_in / na) > min_bw) && |
219 | ((net->total_quota_out / na) > min_bw)) | 219 | ((net->total_quota_out / na) > min_bw)) |
220 | return GNUNET_YES; | 220 | return GNUNET_YES; |
221 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
222 | "No bandwidth available in network\n"); | ||
221 | return GNUNET_NO; | 223 | return GNUNET_NO; |
222 | } | 224 | } |
223 | 225 | ||
@@ -1225,7 +1227,7 @@ libgnunet_plugin_ats_proportional_done (void *cls) | |||
1225 | GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head, | 1227 | GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head, |
1226 | s->network_entries[c].tail, | 1228 | s->network_entries[c].tail, |
1227 | cur); | 1229 | cur); |
1228 | GNUNET_free_non_null (cur->addr->solver_information); | 1230 | GNUNET_free (cur->addr->solver_information); |
1229 | GNUNET_free (cur); | 1231 | GNUNET_free (cur); |
1230 | } | 1232 | } |
1231 | GNUNET_free (s->network_entries[c].stat_total); | 1233 | GNUNET_free (s->network_entries[c].stat_total); |
diff --git a/src/ats/test_ats_api_proportional.conf b/src/ats/test_ats_api_proportional.conf index 21f8218ee..ee8f8f8e7 100644 --- a/src/ats/test_ats_api_proportional.conf +++ b/src/ats/test_ats_api_proportional.conf | |||
@@ -17,8 +17,8 @@ LOOPBACK_QUOTA_OUT = unlimited | |||
17 | LAN_QUOTA_IN = unlimited | 17 | LAN_QUOTA_IN = unlimited |
18 | LAN_QUOTA_OUT = unlimited | 18 | LAN_QUOTA_OUT = unlimited |
19 | # WAN | 19 | # WAN |
20 | WAN_QUOTA_IN = 64 KiB | 20 | WAN_QUOTA_IN = 5 MiB |
21 | WAN_QUOTA_OUT = 64 KiB | 21 | WAN_QUOTA_OUT = 5 MiB |
22 | # WLAN | 22 | # WLAN |
23 | WLAN_QUOTA_IN = 4096 | 23 | WLAN_QUOTA_IN = 4096 |
24 | WLAN_QUOTA_OUT = 4096 | 24 | WLAN_QUOTA_OUT = 4096 |
diff --git a/src/ats/test_ats_lib.c b/src/ats/test_ats_lib.c index 2c4d3f5ad..d19da0106 100644 --- a/src/ats/test_ats_lib.c +++ b/src/ats/test_ats_lib.c | |||
@@ -165,7 +165,7 @@ free_asd (void *cls, | |||
165 | GNUNET_CONTAINER_multipeermap_remove (p2asd, | 165 | GNUNET_CONTAINER_multipeermap_remove (p2asd, |
166 | key, | 166 | key, |
167 | asd)); | 167 | asd)); |
168 | GNUNET_free_non_null (asd->address); | 168 | GNUNET_free (asd->address); |
169 | GNUNET_free (asd); | 169 | GNUNET_free (asd); |
170 | return GNUNET_OK; | 170 | return GNUNET_OK; |
171 | } | 171 | } |
@@ -951,7 +951,7 @@ address_suggest_cb (void *cls, | |||
951 | asd->bandwidth_out = bandwidth_out; | 951 | asd->bandwidth_out = bandwidth_out; |
952 | asd->bandwidth_in = bandwidth_in; | 952 | asd->bandwidth_in = bandwidth_in; |
953 | asd->session = session; | 953 | asd->session = session; |
954 | GNUNET_free_non_null (asd->address); | 954 | GNUNET_free (asd->address); |
955 | asd->address = NULL; | 955 | asd->address = NULL; |
956 | if (NULL != address) | 956 | if (NULL != address) |
957 | asd->address = GNUNET_HELLO_address_copy (address); | 957 | asd->address = GNUNET_HELLO_address_copy (address); |
diff --git a/src/ats/test_ats_reservation_api.c b/src/ats/test_ats_reservation_api.c index 46658007b..f6a964df4 100644 --- a/src/ats/test_ats_reservation_api.c +++ b/src/ats/test_ats_reservation_api.c | |||
@@ -102,14 +102,14 @@ static struct Command test_commands[] = { | |||
102 | 102 | ||
103 | 103 | ||
104 | }, | 104 | }, |
105 | /* 6: reserve another 32k -- should now fail (if MAX_BANDWIDTH_CARRY_S | 105 | /* 6: reserve another 32M -- should now fail (if MAX_BANDWIDTH_CARRY_S |
106 | is precisely observed) */ | 106 | is precisely observed) */ |
107 | { | 107 | { |
108 | .code = CMD_RESERVE_BANDWIDTH, | 108 | .code = CMD_RESERVE_BANDWIDTH, |
109 | .label = "failing reservation", | 109 | .label = "failing reservation", |
110 | .details.reserve_bandwidth = { | 110 | .details.reserve_bandwidth = { |
111 | .pid = 0, | 111 | .pid = 0, |
112 | .amount = 32 * 1024, | 112 | .amount = 32 * 1024 * 1024, |
113 | .expected_result = GNUNET_SYSERR | 113 | .expected_result = GNUNET_SYSERR |
114 | } | 114 | } |
115 | 115 | ||
diff --git a/src/block/Makefile.am b/src/block/Makefile.am index dd596f6b4..ceeff4c66 100644 --- a/src/block/Makefile.am +++ b/src/block/Makefile.am | |||
@@ -23,41 +23,49 @@ libgnunet_plugin_block_template_la_SOURCES = \ | |||
23 | plugin_block_template.c | 23 | plugin_block_template.c |
24 | libgnunet_plugin_block_template_la_LIBADD = \ | 24 | libgnunet_plugin_block_template_la_LIBADD = \ |
25 | libgnunetblockgroup.la \ | 25 | libgnunetblockgroup.la \ |
26 | libgnunetblock.la \ | ||
26 | $(top_builddir)/src/util/libgnunetutil.la \ | 27 | $(top_builddir)/src/util/libgnunetutil.la \ |
27 | $(LTLIBINTL) | 28 | $(LTLIBINTL) |
29 | libgnunet_plugin_block_template_la_DEPENDENCIES = \ | ||
30 | libgnunetblockgroup.la \ | ||
31 | libgnunetblock.la \ | ||
32 | $(top_builddir)/src/util/libgnunetutil.la | ||
28 | libgnunet_plugin_block_template_la_LDFLAGS = \ | 33 | libgnunet_plugin_block_template_la_LDFLAGS = \ |
29 | $(GN_PLUGIN_LDFLAGS) | 34 | $(GN_PLUGIN_LDFLAGS) |
30 | 35 | ||
31 | libgnunet_plugin_block_test_la_SOURCES = \ | 36 | libgnunet_plugin_block_test_la_SOURCES = \ |
32 | plugin_block_test.c | 37 | plugin_block_test.c |
33 | libgnunet_plugin_block_test_la_LIBADD = \ | 38 | libgnunet_plugin_block_test_la_LIBADD = \ |
34 | libgnunetblockgroup.la \ | 39 | libgnunetblockgroup.la \ |
35 | $(top_builddir)/src/util/libgnunetutil.la \ | 40 | libgnunetblock.la \ |
41 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
36 | $(LTLIBINTL) | 42 | $(LTLIBINTL) |
43 | libgnunet_plugin_block_test_la_DEPENDENCIES = \ | ||
44 | libgnunetblockgroup.la \ | ||
45 | libgnunetblock.la \ | ||
46 | $(top_builddir)/src/util/libgnunetutil.la | ||
37 | libgnunet_plugin_block_test_la_LDFLAGS = \ | 47 | libgnunet_plugin_block_test_la_LDFLAGS = \ |
38 | $(GN_PLUGIN_LDFLAGS) | 48 | $(GN_PLUGIN_LDFLAGS) |
39 | |||
40 | 49 | ||
41 | libgnunetblock_la_SOURCES = \ | 50 | libgnunetblock_la_SOURCES = \ |
42 | block.c | 51 | block.c |
43 | libgnunetblock_la_LIBADD = \ | 52 | libgnunetblock_la_LIBADD = \ |
44 | $(top_builddir)/src/util/libgnunetutil.la | 53 | $(top_builddir)/src/util/libgnunetutil.la |
45 | libgnunetblock_la_DEPENDENCIES = \ | 54 | libgnunetblock_la_DEPENDENCIES = \ |
46 | $(top_builddir)/src/util/libgnunetutil.la | 55 | $(top_builddir)/src/util/libgnunetutil.la |
47 | libgnunetblock_la_LDFLAGS = \ | 56 | libgnunetblock_la_LDFLAGS = \ |
48 | $(GN_LIB_LDFLAGS) \ | 57 | $(GN_LIB_LDFLAGS) \ |
49 | $(GN_LIBINTL) \ | 58 | $(GN_LIBINTL) \ |
50 | -version-info 0:0:0 | 59 | -version-info 0:0:0 |
51 | 60 | ||
52 | |||
53 | libgnunetblockgroup_la_SOURCES = \ | 61 | libgnunetblockgroup_la_SOURCES = \ |
54 | bg_bf.c | 62 | bg_bf.c |
55 | libgnunetblockgroup_la_LIBADD = \ | 63 | libgnunetblockgroup_la_LIBADD = \ |
56 | libgnunetblock.la \ | 64 | libgnunetblock.la \ |
57 | $(top_builddir)/src/util/libgnunetutil.la | 65 | $(top_builddir)/src/util/libgnunetutil.la |
58 | libgnunetblockgroup_la_DEPENDENCIES = \ | 66 | libgnunetblockgroup_la_DEPENDENCIES = \ |
59 | libgnunetblock.la \ | 67 | libgnunetblock.la \ |
60 | $(top_builddir)/src/util/libgnunetutil.la | 68 | $(top_builddir)/src/util/libgnunetutil.la |
61 | libgnunetblockgroup_la_LDFLAGS = \ | 69 | libgnunetblockgroup_la_LDFLAGS = \ |
62 | $(GN_LIB_LDFLAGS) \ | 70 | $(GN_LIB_LDFLAGS) \ |
63 | $(GN_LIBINTL) \ | 71 | $(GN_LIBINTL) \ |
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h index d17eab1d6..31dad4117 100644 --- a/src/cadet/cadet.h +++ b/src/cadet/cadet.h | |||
@@ -325,7 +325,7 @@ struct GNUNET_CADET_RequestDropCadetMessage | |||
325 | * Type: #GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE | 325 | * Type: #GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE |
326 | */ | 326 | */ |
327 | struct GNUNET_MessageHeader header; | 327 | struct GNUNET_MessageHeader header; |
328 | 328 | ||
329 | /** | 329 | /** |
330 | * Type of the message this handler covers, in host byte order. | 330 | * Type of the message this handler covers, in host byte order. |
331 | */ | 331 | */ |
@@ -337,7 +337,7 @@ struct GNUNET_CADET_RequestDropCadetMessage | |||
337 | struct GNUNET_CADET_ClientChannelNumber ccn; | 337 | struct GNUNET_CADET_ClientChannelNumber ccn; |
338 | 338 | ||
339 | }; | 339 | }; |
340 | 340 | ||
341 | /** | 341 | /** |
342 | * Message to inform the client about channels in the service. | 342 | * Message to inform the client about channels in the service. |
343 | */ | 343 | */ |
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c index 45cb66c1d..45cc508a6 100644 --- a/src/cadet/cadet_api.c +++ b/src/cadet/cadet_api.c | |||
@@ -819,7 +819,7 @@ GNUNET_CADET_close_port (struct GNUNET_CADET_Port *p) | |||
819 | msg->port = p->id; | 819 | msg->port = p->id; |
820 | GNUNET_MQ_send (p->cadet->mq, env); | 820 | GNUNET_MQ_send (p->cadet->mq, env); |
821 | } | 821 | } |
822 | GNUNET_free_non_null (p->handlers); | 822 | GNUNET_free (p->handlers); |
823 | GNUNET_free (p); | 823 | GNUNET_free (p); |
824 | } | 824 | } |
825 | 825 | ||
@@ -1001,8 +1001,8 @@ GNUNET_CADET_open_port (struct GNUNET_CADET_Handle *h, | |||
1001 | p->window_changes = window_changes; | 1001 | p->window_changes = window_changes; |
1002 | p->disconnects = disconnects; | 1002 | p->disconnects = disconnects; |
1003 | p->handlers = (NULL == pd->agpl_url) | 1003 | p->handlers = (NULL == pd->agpl_url) |
1004 | ? GNUNET_MQ_copy_handlers (handlers) | 1004 | ? GNUNET_MQ_copy_handlers (handlers) |
1005 | : GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); | 1005 | : GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); |
1006 | 1006 | ||
1007 | GNUNET_assert (GNUNET_OK == open_port_cb (h, &p->id, p)); | 1007 | GNUNET_assert (GNUNET_OK == open_port_cb (h, &p->id, p)); |
1008 | return p; | 1008 | return p; |
diff --git a/src/cadet/cadet_api_drop_message.c b/src/cadet/cadet_api_drop_message.c index d9f7e003e..2b031b5c0 100644 --- a/src/cadet/cadet_api_drop_message.c +++ b/src/cadet/cadet_api_drop_message.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -35,8 +35,8 @@ | |||
35 | */ | 35 | */ |
36 | void | 36 | void |
37 | GNUNET_CADET_drop_message (struct GNUNET_MQ_Handle *mq, | 37 | GNUNET_CADET_drop_message (struct GNUNET_MQ_Handle *mq, |
38 | struct GNUNET_CADET_ClientChannelNumber ccn, | 38 | struct GNUNET_CADET_ClientChannelNumber ccn, |
39 | uint16_t type) | 39 | uint16_t type) |
40 | { | 40 | { |
41 | struct GNUNET_CADET_RequestDropCadetMessage *message; | 41 | struct GNUNET_CADET_RequestDropCadetMessage *message; |
42 | struct GNUNET_MQ_Envelope *env; | 42 | struct GNUNET_MQ_Envelope *env; |
@@ -45,15 +45,15 @@ GNUNET_CADET_drop_message (struct GNUNET_MQ_Handle *mq, | |||
45 | 45 | ||
46 | message->ccn = ccn; | 46 | message->ccn = ccn; |
47 | message->type = type; | 47 | message->type = type; |
48 | 48 | ||
49 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 49 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
50 | "Dropping message for channel of type %s (%d)\n", type == GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY ? "GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY" : "UNKNOWN", type); | 50 | "Dropping message for channel of type %s (%d)\n", type == |
51 | GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY ? | ||
52 | "GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY" : "UNKNOWN", type); | ||
51 | 53 | ||
52 | GNUNET_MQ_send (mq, env); | 54 | GNUNET_MQ_send (mq, env); |
53 | |||
54 | } | ||
55 | |||
56 | 55 | ||
56 | } | ||
57 | 57 | ||
58 | 58 | ||
59 | /* end of cadet_api_drop_message.c */ | 59 | /* end of cadet_api_drop_message.c */ |
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index 08298e224..117a7922e 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -85,11 +85,11 @@ struct GNUNET_CADET_ConnectionCreateMessage | |||
85 | uint32_t options GNUNET_PACKED; | 85 | uint32_t options GNUNET_PACKED; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * This flag indicates the peer sending the connection create | 88 | * This flag indicates the peer sending the connection create |
89 | * meassage likes to trigger a KX handshake. | 89 | * meassage likes to trigger a KX handshake. |
90 | */ | 90 | */ |
91 | int has_monotime; | 91 | int has_monotime; |
92 | 92 | ||
93 | /** | 93 | /** |
94 | * This monotonic time is set, if a peer likes to trigger a KX, but is not | 94 | * This monotonic time is set, if a peer likes to trigger a KX, but is not |
95 | * the peer that should start the KX. (xrs,t3ss) | 95 | * the peer that should start the KX. (xrs,t3ss) |
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c index 03af3d5c0..2d3b548dd 100644 --- a/src/cadet/gnunet-service-cadet.c +++ b/src/cadet/gnunet-service-cadet.c | |||
@@ -415,7 +415,7 @@ shutdown_rest () | |||
415 | } | 415 | } |
416 | GCD_shutdown (); | 416 | GCD_shutdown (); |
417 | GCH_shutdown (); | 417 | GCH_shutdown (); |
418 | GNUNET_free_non_null (my_private_key); | 418 | GNUNET_free (my_private_key); |
419 | my_private_key = NULL; | 419 | my_private_key = NULL; |
420 | } | 420 | } |
421 | 421 | ||
@@ -1010,6 +1010,7 @@ handle_info_tunnels (void *cls, | |||
1010 | GNUNET_SERVICE_client_continue (c->client); | 1010 | GNUNET_SERVICE_client_continue (c->client); |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | |||
1013 | /** | 1014 | /** |
1014 | * Handler for client's #GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE request. | 1015 | * Handler for client's #GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE request. |
1015 | * | 1016 | * |
@@ -1026,11 +1027,12 @@ handle_drop_message (void *cls, | |||
1026 | ch = lookup_channel (c, | 1027 | ch = lookup_channel (c, |
1027 | message->ccn); | 1028 | message->ccn); |
1028 | 1029 | ||
1029 | GCCH_assign_type_to_drop(ch, message); | 1030 | GCCH_assign_type_to_drop (ch, message); |
1030 | 1031 | ||
1031 | GNUNET_SERVICE_client_continue (c->client); | 1032 | GNUNET_SERVICE_client_continue (c->client); |
1032 | } | 1033 | } |
1033 | 1034 | ||
1035 | |||
1034 | /** | 1036 | /** |
1035 | * Callback called when a client connects to the service. | 1037 | * Callback called when a client connects to the service. |
1036 | * | 1038 | * |
@@ -1327,52 +1329,52 @@ run (void *cls, | |||
1327 | * Define "main" method using service macro. | 1329 | * Define "main" method using service macro. |
1328 | */ | 1330 | */ |
1329 | GNUNET_SERVICE_MAIN | 1331 | GNUNET_SERVICE_MAIN |
1330 | ("cadet", | 1332 | ("cadet", |
1331 | GNUNET_SERVICE_OPTION_NONE, | 1333 | GNUNET_SERVICE_OPTION_NONE, |
1332 | &run, | 1334 | &run, |
1333 | &client_connect_cb, | 1335 | &client_connect_cb, |
1334 | &client_disconnect_cb, | 1336 | &client_disconnect_cb, |
1335 | NULL, | 1337 | NULL, |
1336 | GNUNET_MQ_hd_fixed_size (port_open, | 1338 | GNUNET_MQ_hd_fixed_size (port_open, |
1337 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN, | 1339 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN, |
1338 | struct GNUNET_CADET_PortMessage, | 1340 | struct GNUNET_CADET_PortMessage, |
1339 | NULL), | 1341 | NULL), |
1340 | GNUNET_MQ_hd_fixed_size (port_close, | 1342 | GNUNET_MQ_hd_fixed_size (port_close, |
1341 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE, | 1343 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE, |
1342 | struct GNUNET_CADET_PortMessage, | 1344 | struct GNUNET_CADET_PortMessage, |
1343 | NULL), | 1345 | NULL), |
1344 | GNUNET_MQ_hd_fixed_size (channel_create, | 1346 | GNUNET_MQ_hd_fixed_size (channel_create, |
1345 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE, | 1347 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE, |
1346 | struct GNUNET_CADET_LocalChannelCreateMessage, | 1348 | struct GNUNET_CADET_LocalChannelCreateMessage, |
1347 | NULL), | 1349 | NULL), |
1348 | GNUNET_MQ_hd_fixed_size (channel_destroy, | 1350 | GNUNET_MQ_hd_fixed_size (channel_destroy, |
1349 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_DESTROY, | 1351 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_DESTROY, |
1350 | struct GNUNET_CADET_LocalChannelDestroyMessage, | 1352 | struct GNUNET_CADET_LocalChannelDestroyMessage, |
1351 | NULL), | 1353 | NULL), |
1352 | GNUNET_MQ_hd_var_size (local_data, | 1354 | GNUNET_MQ_hd_var_size (local_data, |
1353 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA, | 1355 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA, |
1354 | struct GNUNET_CADET_LocalData, | 1356 | struct GNUNET_CADET_LocalData, |
1355 | NULL), | 1357 | NULL), |
1356 | GNUNET_MQ_hd_fixed_size (local_ack, | 1358 | GNUNET_MQ_hd_fixed_size (local_ack, |
1357 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK, | 1359 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK, |
1358 | struct GNUNET_CADET_LocalAck, | 1360 | struct GNUNET_CADET_LocalAck, |
1359 | NULL), | 1361 | NULL), |
1360 | GNUNET_MQ_hd_fixed_size (get_peers, | 1362 | GNUNET_MQ_hd_fixed_size (get_peers, |
1361 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PEERS, | 1363 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PEERS, |
1362 | struct GNUNET_MessageHeader, | 1364 | struct GNUNET_MessageHeader, |
1363 | NULL), | 1365 | NULL), |
1364 | GNUNET_MQ_hd_fixed_size (show_path, | 1366 | GNUNET_MQ_hd_fixed_size (show_path, |
1365 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PATH, | 1367 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PATH, |
1366 | struct GNUNET_CADET_RequestPathInfoMessage, | 1368 | struct GNUNET_CADET_RequestPathInfoMessage, |
1367 | NULL), | 1369 | NULL), |
1368 | GNUNET_MQ_hd_fixed_size (info_tunnels, | 1370 | GNUNET_MQ_hd_fixed_size (info_tunnels, |
1369 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_TUNNELS, | 1371 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_TUNNELS, |
1370 | struct GNUNET_MessageHeader, | 1372 | struct GNUNET_MessageHeader, |
1371 | NULL), | 1373 | NULL), |
1372 | GNUNET_MQ_hd_fixed_size (drop_message, | 1374 | GNUNET_MQ_hd_fixed_size (drop_message, |
1373 | GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE, | 1375 | GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE, |
1374 | struct GNUNET_CADET_RequestDropCadetMessage, | 1376 | struct GNUNET_CADET_RequestDropCadetMessage, |
1375 | NULL), | 1377 | NULL), |
1376 | GNUNET_MQ_handler_end ()); | 1378 | GNUNET_MQ_handler_end ()); |
1377 | 1379 | ||
1378 | /* end of gnunet-service-cadet-new.c */ | 1380 | /* end of gnunet-service-cadet-new.c */ |
diff --git a/src/cadet/gnunet-service-cadet.h b/src/cadet/gnunet-service-cadet.h index ff216f8c3..6da0950f1 100644 --- a/src/cadet/gnunet-service-cadet.h +++ b/src/cadet/gnunet-service-cadet.h | |||
@@ -325,5 +325,4 @@ const char * | |||
325 | GSC_2s (struct CadetClient *c); | 325 | GSC_2s (struct CadetClient *c); |
326 | 326 | ||
327 | 327 | ||
328 | |||
329 | #endif | 328 | #endif |
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index e6fce562f..dab53b8c4 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -385,29 +385,32 @@ struct CadetChannel | |||
385 | * Type of message to be droped. See GCT_send. | 385 | * Type of message to be droped. See GCT_send. |
386 | */ | 386 | */ |
387 | uint16_t type GNUNET_PACKED; | 387 | uint16_t type GNUNET_PACKED; |
388 | 388 | ||
389 | }; | 389 | }; |
390 | 390 | ||
391 | /** | 391 | /** |
392 | * Assign type of message to drop. | 392 | * Assign type of message to drop. |
393 | * @param ch CadetChannel to assign type to drop. | 393 | * @param ch CadetChannel to assign type to drop. |
394 | * @param message GNUNET_CADET_RequestDropCadetMessage to get the type from. | 394 | * @param message GNUNET_CADET_RequestDropCadetMessage to get the type from. |
395 | */ | 395 | */ |
396 | void | 396 | void |
397 | GCCH_assign_type_to_drop(struct CadetChannel *ch, const struct GNUNET_CADET_RequestDropCadetMessage *message) | 397 | GCCH_assign_type_to_drop (struct CadetChannel *ch, const struct |
398 | GNUNET_CADET_RequestDropCadetMessage *message) | ||
398 | { | 399 | { |
399 | 400 | ||
400 | ch->type = message->type; | 401 | ch->type = message->type; |
401 | 402 | ||
402 | } | 403 | } |
403 | 404 | ||
405 | |||
404 | /** | 406 | /** |
405 | * Check if type of message is the one to drop. | 407 | * Check if type of message is the one to drop. |
406 | * @param ch CadetChannel to check for message type to drop. | 408 | * @param ch CadetChannel to check for message type to drop. |
407 | * @param message GNUNET_MessageHeader to compare the type with. | 409 | * @param message GNUNET_MessageHeader to compare the type with. |
408 | */ | 410 | */ |
409 | int | 411 | int |
410 | GCCH_is_type_to_drop(struct CadetChannel *ch, const struct GNUNET_MessageHeader *message) | 412 | GCCH_is_type_to_drop (struct CadetChannel *ch, const struct |
413 | GNUNET_MessageHeader *message) | ||
411 | { | 414 | { |
412 | 415 | ||
413 | if (ch->type == message->type) | 416 | if (ch->type == message->type) |
@@ -419,6 +422,7 @@ GCCH_is_type_to_drop(struct CadetChannel *ch, const struct GNUNET_MessageHeader | |||
419 | return GNUNET_NO; | 422 | return GNUNET_NO; |
420 | } | 423 | } |
421 | 424 | ||
425 | |||
422 | /** | 426 | /** |
423 | * Get the static string for identification of the channel. | 427 | * Get the static string for identification of the channel. |
424 | * | 428 | * |
@@ -854,7 +858,8 @@ send_channel_data_ack (struct CadetChannel *ch) | |||
854 | GCCH_2s (ch)); | 858 | GCCH_2s (ch)); |
855 | if (NULL != ch->last_control_qe) | 859 | if (NULL != ch->last_control_qe) |
856 | GCT_send_cancel (ch->last_control_qe); | 860 | GCT_send_cancel (ch->last_control_qe); |
857 | ch->last_control_qe = GCT_send (ch->t, &msg.header, &send_ack_cb, ch, &msg.ctn); | 861 | ch->last_control_qe = GCT_send (ch->t, &msg.header, &send_ack_cb, ch, |
862 | &msg.ctn); | ||
858 | } | 863 | } |
859 | 864 | ||
860 | 865 | ||
@@ -881,7 +886,8 @@ send_open_ack (void *cls) | |||
881 | msg.port = ch->port; | 886 | msg.port = ch->port; |
882 | if (NULL != ch->last_control_qe) | 887 | if (NULL != ch->last_control_qe) |
883 | GCT_send_cancel (ch->last_control_qe); | 888 | GCT_send_cancel (ch->last_control_qe); |
884 | ch->last_control_qe = GCT_send (ch->t, &msg.header, &send_ack_cb, ch, &msg.ctn); | 889 | ch->last_control_qe = GCT_send (ch->t, &msg.header, &send_ack_cb, ch, |
890 | &msg.ctn); | ||
885 | } | 891 | } |
886 | 892 | ||
887 | 893 | ||
@@ -1513,7 +1519,8 @@ retry_transmission (void *cls) | |||
1513 | "Retrying transmission on %s of message %u\n", | 1519 | "Retrying transmission on %s of message %u\n", |
1514 | GCCH_2s (ch), | 1520 | GCCH_2s (ch), |
1515 | (unsigned int) ntohl (crm->data_message->mid.mid)); | 1521 | (unsigned int) ntohl (crm->data_message->mid.mid)); |
1516 | crm->qe = GCT_send (ch->t, &crm->data_message->header, &data_sent_cb, crm, &crm->data_message->ctn); | 1522 | crm->qe = GCT_send (ch->t, &crm->data_message->header, &data_sent_cb, crm, |
1523 | &crm->data_message->ctn); | ||
1517 | GNUNET_assert (NULL == ch->retry_data_task); | 1524 | GNUNET_assert (NULL == ch->retry_data_task); |
1518 | } | 1525 | } |
1519 | 1526 | ||
@@ -1901,7 +1908,8 @@ GCCH_handle_local_data (struct CadetChannel *ch, | |||
1901 | GNUNET_SCHEDULER_cancel (ch->retry_data_task); | 1908 | GNUNET_SCHEDULER_cancel (ch->retry_data_task); |
1902 | ch->retry_data_task = NULL; | 1909 | ch->retry_data_task = NULL; |
1903 | } | 1910 | } |
1904 | crm->qe = GCT_send (ch->t, &crm->data_message->header, &data_sent_cb, crm, &crm->data_message->ctn); | 1911 | crm->qe = GCT_send (ch->t, &crm->data_message->header, &data_sent_cb, crm, |
1912 | &crm->data_message->ctn); | ||
1905 | GNUNET_assert (NULL == ch->retry_data_task); | 1913 | GNUNET_assert (NULL == ch->retry_data_task); |
1906 | return GNUNET_OK; | 1914 | return GNUNET_OK; |
1907 | } | 1915 | } |
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index a7c1d9fb0..3e1f779ad 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -614,6 +614,7 @@ set_monotime_sig (struct GNUNET_CADET_ConnectionCreateMessage *msg) | |||
614 | 614 | ||
615 | } | 615 | } |
616 | 616 | ||
617 | |||
617 | /** | 618 | /** |
618 | * Send a #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE message to the | 619 | * Send a #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE message to the |
619 | * first hop. | 620 | * first hop. |
@@ -641,7 +642,7 @@ send_create (void *cls) | |||
641 | 642 | ||
642 | // check for tunnel state and set signed monotime (xrs,t3ss) | 643 | // check for tunnel state and set signed monotime (xrs,t3ss) |
643 | t = GCP_get_tunnel (cc->destination, GNUNET_YES); | 644 | t = GCP_get_tunnel (cc->destination, GNUNET_YES); |
644 | if ((NULL != t)&& (GCT_get_estate (t) == CADET_TUNNEL_KEY_UNINITIALIZED) && | 645 | if ((NULL != t) && (GCT_get_estate (t) == CADET_TUNNEL_KEY_UNINITIALIZED) && |
645 | (GCT_alice_or_betty (GCP_get_id (cc->destination)) == GNUNET_NO)) | 646 | (GCT_alice_or_betty (GCP_get_id (cc->destination)) == GNUNET_NO)) |
646 | { | 647 | { |
647 | create_msg->has_monotime = GNUNET_YES; | 648 | create_msg->has_monotime = GNUNET_YES; |
diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c index 04847f906..9a83fa31d 100644 --- a/src/cadet/gnunet-service-cadet_core.c +++ b/src/cadet/gnunet-service-cadet_core.c | |||
@@ -822,13 +822,13 @@ handle_connection_create ( | |||
822 | GCP_2s (origin), | 822 | GCP_2s (origin), |
823 | GNUNET_sh2s (&msg->cid.connection_of_tunnel)); | 823 | GNUNET_sh2s (&msg->cid.connection_of_tunnel)); |
824 | path = GCPP_get_path_from_route (path_length - 1, pids); | 824 | path = GCPP_get_path_from_route (path_length - 1, pids); |
825 | t = GCP_get_tunnel (sender, GNUNET_YES); | 825 | t = GCP_get_tunnel (origin, GNUNET_YES); |
826 | 826 | ||
827 | // Check for CADET state in case the other side has lost the tunnel (xrs,t3ss) | 827 | // Check for CADET state in case the other side has lost the tunnel (xrs,t3ss) |
828 | if ((GNUNET_YES == msg->has_monotime) && | 828 | if ((GNUNET_YES == msg->has_monotime) && |
829 | (GNUNET_YES == GCP_check_and_update_monotime(origin, msg->monotime)) && | 829 | (GNUNET_YES == GCP_check_and_update_monotime (origin, msg->monotime)) && |
830 | ( GNUNET_OK == GCP_check_monotime_sig(origin, msg)) && | 830 | (GNUNET_OK == GCP_check_monotime_sig (origin, msg)) && |
831 | (CADET_TUNNEL_KEY_OK == GCT_get_estate(t))) | 831 | (CADET_TUNNEL_KEY_OK == GCT_get_estate (t))) |
832 | { | 832 | { |
833 | GCT_change_estate (t, CADET_TUNNEL_KEY_UNINITIALIZED); | 833 | GCT_change_estate (t, CADET_TUNNEL_KEY_UNINITIALIZED); |
834 | } | 834 | } |
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c index 21870a454..c7857032b 100644 --- a/src/cadet/gnunet-service-cadet_hello.c +++ b/src/cadet/gnunet-service-cadet_hello.c | |||
@@ -75,7 +75,7 @@ got_hello (void *cls, | |||
75 | if (0 == GNUNET_memcmp (id, | 75 | if (0 == GNUNET_memcmp (id, |
76 | &my_full_id)) | 76 | &my_full_id)) |
77 | { | 77 | { |
78 | GNUNET_free_non_null (mine); | 78 | GNUNET_free (mine); |
79 | mine = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (&hello->header); | 79 | mine = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (&hello->header); |
80 | GCD_hello_update (); | 80 | GCD_hello_update (); |
81 | return; | 81 | return; |
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 55800b88c..a2068b31b 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -345,8 +345,8 @@ destroy_peer (void *cls) | |||
345 | GNUNET_CONTAINER_multipeermap_remove (peers, | 345 | GNUNET_CONTAINER_multipeermap_remove (peers, |
346 | &cp->pid, | 346 | &cp->pid, |
347 | cp)); | 347 | cp)); |
348 | GNUNET_free_non_null (cp->path_heads); | 348 | GNUNET_free (cp->path_heads); |
349 | GNUNET_free_non_null (cp->path_tails); | 349 | GNUNET_free (cp->path_tails); |
350 | cp->path_dll_length = 0; | 350 | cp->path_dll_length = 0; |
351 | if (NULL != cp->search_h) | 351 | if (NULL != cp->search_h) |
352 | { | 352 | { |
@@ -376,7 +376,7 @@ destroy_peer (void *cls) | |||
376 | GNUNET_SCHEDULER_cancel (cp->heap_cleanup_task); | 376 | GNUNET_SCHEDULER_cancel (cp->heap_cleanup_task); |
377 | cp->heap_cleanup_task = NULL; | 377 | cp->heap_cleanup_task = NULL; |
378 | } | 378 | } |
379 | GNUNET_free_non_null (cp->hello); | 379 | GNUNET_free (cp->hello); |
380 | /* Peer should not be freed if paths exist; if there are no paths, | 380 | /* Peer should not be freed if paths exist; if there are no paths, |
381 | there ought to be no connections, and without connections, no | 381 | there ought to be no connections, and without connections, no |
382 | notifications. Thus we can assert that mqm_head is empty at this | 382 | notifications. Thus we can assert that mqm_head is empty at this |
@@ -1552,6 +1552,7 @@ GCP_send_ooo (struct CadetPeer *cp, | |||
1552 | env); | 1552 | env); |
1553 | } | 1553 | } |
1554 | 1554 | ||
1555 | |||
1555 | /** | 1556 | /** |
1556 | * Checking if a monotime value is newer than the last monotime value received from a peer. If the time value is newer it will be stored at the peer. | 1557 | * Checking if a monotime value is newer than the last monotime value received from a peer. If the time value is newer it will be stored at the peer. |
1557 | * | 1558 | * |
@@ -1574,6 +1575,7 @@ GCP_check_and_update_monotime (struct CadetPeer *peer, | |||
1574 | return GNUNET_NO; | 1575 | return GNUNET_NO; |
1575 | } | 1576 | } |
1576 | 1577 | ||
1578 | |||
1577 | /** | 1579 | /** |
1578 | * Checking the signature for a monotime of a GNUNET_CADET_ConnectionCreateMessage. | 1580 | * Checking the signature for a monotime of a GNUNET_CADET_ConnectionCreateMessage. |
1579 | * | 1581 | * |
diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c index 66e7d5b1e..2ca46b5aa 100644 --- a/src/cadet/gnunet-service-cadet_tunnels.c +++ b/src/cadet/gnunet-service-cadet_tunnels.c | |||
@@ -3476,7 +3476,7 @@ GCT_send (struct CadetTunnel *t, | |||
3476 | { | 3476 | { |
3477 | ch = lookup_channel (t, | 3477 | ch = lookup_channel (t, |
3478 | *ctn); | 3478 | *ctn); |
3479 | if ((NULL != ch)&& GCCH_is_type_to_drop (ch, message)) | 3479 | if ((NULL != ch) && GCCH_is_type_to_drop (ch, message)) |
3480 | { | 3480 | { |
3481 | GNUNET_break (0); | 3481 | GNUNET_break (0); |
3482 | return NULL; | 3482 | return NULL; |
diff --git a/src/cadet/gnunet-service-cadet_tunnels.h b/src/cadet/gnunet-service-cadet_tunnels.h index 147f2e56f..075cd03f8 100644 --- a/src/cadet/gnunet-service-cadet_tunnels.h +++ b/src/cadet/gnunet-service-cadet_tunnels.h | |||
@@ -235,7 +235,7 @@ GCT_send (struct CadetTunnel *t, | |||
235 | const struct GNUNET_MessageHeader *message, | 235 | const struct GNUNET_MessageHeader *message, |
236 | GCT_SendContinuation cont, | 236 | GCT_SendContinuation cont, |
237 | void *cont_cls, | 237 | void *cont_cls, |
238 | struct GNUNET_CADET_ChannelTunnelNumber *ctn); | 238 | struct GNUNET_CADET_ChannelTunnelNumber *ctn); |
239 | 239 | ||
240 | 240 | ||
241 | /** | 241 | /** |
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index 779d3bc9f..23f2ccbe3 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c | |||
@@ -550,6 +550,7 @@ get_from_p_ids () | |||
550 | } | 550 | } |
551 | } | 551 | } |
552 | 552 | ||
553 | |||
553 | static struct GNUNET_CADET_Handle * | 554 | static struct GNUNET_CADET_Handle * |
554 | get_from_cadets () | 555 | get_from_cadets () |
555 | { | 556 | { |
@@ -568,6 +569,7 @@ get_from_cadets () | |||
568 | 569 | ||
569 | } | 570 | } |
570 | 571 | ||
572 | |||
571 | static unsigned int | 573 | static unsigned int |
572 | get_peer_nr (int outgoing) | 574 | get_peer_nr (int outgoing) |
573 | { | 575 | { |
@@ -581,6 +583,7 @@ get_peer_nr (int outgoing) | |||
581 | } | 583 | } |
582 | } | 584 | } |
583 | 585 | ||
586 | |||
584 | /** | 587 | /** |
585 | * Task to reconnect to other peer. | 588 | * Task to reconnect to other peer. |
586 | * | 589 | * |
@@ -626,6 +629,7 @@ reconnect_op (void *cls) | |||
626 | send_test_message (outgoing_ch); | 629 | send_test_message (outgoing_ch); |
627 | } | 630 | } |
628 | 631 | ||
632 | |||
629 | void | 633 | void |
630 | reopen_channel () | 634 | reopen_channel () |
631 | { | 635 | { |
@@ -659,6 +663,7 @@ reopen_channel () | |||
659 | send_test_message (outgoing_ch); | 663 | send_test_message (outgoing_ch); |
660 | } | 664 | } |
661 | 665 | ||
666 | |||
662 | static void | 667 | static void |
663 | peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple); | 668 | peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple); |
664 | 669 | ||
@@ -676,6 +681,7 @@ get_peers (void *cls) | |||
676 | 681 | ||
677 | } | 682 | } |
678 | 683 | ||
684 | |||
679 | /** | 685 | /** |
680 | * Method called to retrieve information about all peers in CADET, called | 686 | * Method called to retrieve information about all peers in CADET, called |
681 | * once per peer. | 687 | * once per peer. |
@@ -712,7 +718,7 @@ peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple) | |||
712 | "p_id %s\n", | 718 | "p_id %s\n", |
713 | GNUNET_i2s_full (p_id)); | 719 | GNUNET_i2s_full (p_id)); |
714 | 720 | ||
715 | if ((0 == GNUNET_memcmp (&ple->peer, p_id))&& ple->have_tunnel) | 721 | if ((0 == GNUNET_memcmp (&ple->peer, p_id)) && ple->have_tunnel) |
716 | { | 722 | { |
717 | 723 | ||
718 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 724 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -733,6 +739,7 @@ peers_callback (void *cls, const struct GNUNET_CADET_PeerListEntry *ple) | |||
733 | } | 739 | } |
734 | } | 740 | } |
735 | 741 | ||
742 | |||
736 | /** | 743 | /** |
737 | * Function called whenever an MQ-channel is destroyed, unless the destruction | 744 | * Function called whenever an MQ-channel is destroyed, unless the destruction |
738 | * was requested by #GNUNET_CADET_channel_destroy. | 745 | * was requested by #GNUNET_CADET_channel_destroy. |
@@ -1169,7 +1176,7 @@ connect_handler (void *cls, | |||
1169 | 1176 | ||
1170 | if (peer == get_peer_nr (GNUNET_NO)) | 1177 | if (peer == get_peer_nr (GNUNET_NO)) |
1171 | { | 1178 | { |
1172 | if ((DESTROY != test)&&(NULL != incoming_ch)) | 1179 | if ((DESTROY != test) && (NULL != incoming_ch)) |
1173 | { | 1180 | { |
1174 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1181 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1175 | "Duplicate incoming channel for client %lu\n", | 1182 | "Duplicate incoming channel for client %lu\n", |
diff --git a/src/cadet/test_cadet.conf b/src/cadet/test_cadet.conf index 067dd5fb4..79c86bb59 100644 --- a/src/cadet/test_cadet.conf +++ b/src/cadet/test_cadet.conf | |||
@@ -66,7 +66,7 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-cadet/ | |||
66 | NO_IO = YES | 66 | NO_IO = YES |
67 | 67 | ||
68 | [nse] | 68 | [nse] |
69 | WORKBITS = 0 | 69 | WORKBITS = 2 |
70 | 70 | ||
71 | [hostlist] | 71 | [hostlist] |
72 | IMMEDIATE_START = NO | 72 | IMMEDIATE_START = NO |
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c index 160d352d7..13fa0d0e7 100644 --- a/src/consensus/gnunet-service-consensus.c +++ b/src/consensus/gnunet-service-consensus.c | |||
@@ -1347,7 +1347,7 @@ not_evil: | |||
1347 | evil->type = EVILNESS_NONE; | 1347 | evil->type = EVILNESS_NONE; |
1348 | cleanup: | 1348 | cleanup: |
1349 | GNUNET_free (evil_spec); | 1349 | GNUNET_free (evil_spec); |
1350 | /* no GNUNET_free_non_null since it wasn't | 1350 | /* no GNUNET_free since it wasn't |
1351 | * allocated with GNUNET_malloc */ | 1351 | * allocated with GNUNET_malloc */ |
1352 | if (NULL != evil_type_str) | 1352 | if (NULL != evil_type_str) |
1353 | free (evil_type_str); | 1353 | free (evil_type_str); |
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c index b908cd82c..7a2a727a5 100644 --- a/src/conversation/gnunet-conversation.c +++ b/src/conversation/gnunet-conversation.c | |||
@@ -359,7 +359,7 @@ start_phone () | |||
359 | else | 359 | else |
360 | { | 360 | { |
361 | GNUNET_CONVERSATION_phone_get_record (phone, &rd); | 361 | GNUNET_CONVERSATION_phone_get_record (phone, &rd); |
362 | GNUNET_free_non_null (address); | 362 | GNUNET_free (address); |
363 | address = | 363 | address = |
364 | GNUNET_GNSRECORD_value_to_string (rd.record_type, rd.data, rd.data_size); | 364 | GNUNET_GNSRECORD_value_to_string (rd.record_type, rd.data, rd.data_size); |
365 | fprintf ( | 365 | fprintf ( |
@@ -1035,7 +1035,7 @@ do_stop_task (void *cls) | |||
1035 | mic = NULL; | 1035 | mic = NULL; |
1036 | GNUNET_free (ego_name); | 1036 | GNUNET_free (ego_name); |
1037 | ego_name = NULL; | 1037 | ego_name = NULL; |
1038 | GNUNET_free_non_null (peer_name); | 1038 | GNUNET_free (peer_name); |
1039 | peer_name = NULL; | 1039 | peer_name = NULL; |
1040 | phone_state = PS_ERROR; | 1040 | phone_state = PS_ERROR; |
1041 | } | 1041 | } |
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c index dbb742d91..b51186dc8 100644 --- a/src/conversation/test_conversation_api.c +++ b/src/conversation/test_conversation_api.c | |||
@@ -402,7 +402,8 @@ namestore_put_cont (void *cls, int32_t success, const char *emsg) | |||
402 | GNUNET_assert (GNUNET_YES == success); | 402 | GNUNET_assert (GNUNET_YES == success); |
403 | GNUNET_assert (NULL == emsg); | 403 | GNUNET_assert (NULL == emsg); |
404 | GNUNET_assert (NULL == op); | 404 | GNUNET_assert (NULL == op); |
405 | op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont, NULL); | 405 | op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont, |
406 | NULL); | ||
406 | } | 407 | } |
407 | 408 | ||
408 | 409 | ||
@@ -483,7 +484,8 @@ run (void *cls, | |||
483 | cfg = c; | 484 | cfg = c; |
484 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL); | 485 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL); |
485 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); | 486 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); |
486 | op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont, NULL); | 487 | op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont, |
488 | NULL); | ||
487 | ns = GNUNET_NAMESTORE_connect (cfg); | 489 | ns = GNUNET_NAMESTORE_connect (cfg); |
488 | } | 490 | } |
489 | 491 | ||
diff --git a/src/conversation/test_conversation_api_reject.c b/src/conversation/test_conversation_api_reject.c index 855b21fd7..69fa9f1dc 100644 --- a/src/conversation/test_conversation_api_reject.c +++ b/src/conversation/test_conversation_api_reject.c | |||
@@ -255,7 +255,8 @@ namestore_put_cont (void *cls, int32_t success, const char *emsg) | |||
255 | GNUNET_assert (GNUNET_YES == success); | 255 | GNUNET_assert (GNUNET_YES == success); |
256 | GNUNET_assert (NULL == emsg); | 256 | GNUNET_assert (NULL == emsg); |
257 | GNUNET_assert (NULL == op); | 257 | GNUNET_assert (NULL == op); |
258 | op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont, NULL); | 258 | op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont, |
259 | NULL); | ||
259 | } | 260 | } |
260 | 261 | ||
261 | 262 | ||
@@ -336,7 +337,8 @@ run (void *cls, | |||
336 | cfg = c; | 337 | cfg = c; |
337 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL); | 338 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL); |
338 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); | 339 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); |
339 | op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont, NULL); | 340 | op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont, |
341 | NULL); | ||
340 | ns = GNUNET_NAMESTORE_connect (cfg); | 342 | ns = GNUNET_NAMESTORE_connect (cfg); |
341 | } | 343 | } |
342 | 344 | ||
diff --git a/src/conversation/test_conversation_api_twocalls.c b/src/conversation/test_conversation_api_twocalls.c index 6d434a3e1..83e8cb55a 100644 --- a/src/conversation/test_conversation_api_twocalls.c +++ b/src/conversation/test_conversation_api_twocalls.c | |||
@@ -524,7 +524,8 @@ namestore_put_cont (void *cls, int32_t success, const char *emsg) | |||
524 | GNUNET_assert (GNUNET_YES == success); | 524 | GNUNET_assert (GNUNET_YES == success); |
525 | GNUNET_assert (NULL == emsg); | 525 | GNUNET_assert (NULL == emsg); |
526 | GNUNET_assert (NULL == op); | 526 | GNUNET_assert (NULL == op); |
527 | op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont, NULL); | 527 | op = GNUNET_IDENTITY_create (id, "caller-ego", NULL, &caller_ego_create_cont, |
528 | NULL); | ||
528 | } | 529 | } |
529 | 530 | ||
530 | 531 | ||
@@ -613,7 +614,8 @@ run (void *cls, | |||
613 | timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL); | 614 | timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL); |
614 | GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); | 615 | GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); |
615 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); | 616 | id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL); |
616 | op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont, NULL); | 617 | op = GNUNET_IDENTITY_create (id, "phone-ego", NULL, &phone_ego_create_cont, |
618 | NULL); | ||
617 | ns = GNUNET_NAMESTORE_connect (cfg); | 619 | ns = GNUNET_NAMESTORE_connect (cfg); |
618 | } | 620 | } |
619 | 621 | ||
diff --git a/src/core/core_api.c b/src/core/core_api.c index d24378654..81118693d 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -745,7 +745,7 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle) | |||
745 | GNUNET_MQ_destroy (handle->mq); | 745 | GNUNET_MQ_destroy (handle->mq); |
746 | handle->mq = NULL; | 746 | handle->mq = NULL; |
747 | } | 747 | } |
748 | GNUNET_free_non_null (handle->handlers); | 748 | GNUNET_free (handle->handlers); |
749 | GNUNET_free (handle); | 749 | GNUNET_free (handle); |
750 | } | 750 | } |
751 | 751 | ||
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index dda60215d..064964292 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -251,8 +251,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
251 | 251 | ||
252 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 252 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
253 | p->cfg = GNUNET_CONFIGURATION_create (); | 253 | p->cfg = GNUNET_CONFIGURATION_create (); |
254 | p->arm_proc = GNUNET_OS_start_process (GNUNET_YES, | 254 | p->arm_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
255 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 255 | | GNUNET_OS_USE_PIPE_CONTROL, |
256 | NULL, | 256 | NULL, |
257 | NULL, | 257 | NULL, |
258 | NULL, | 258 | NULL, |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index b510e8993..debf808ca 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -384,7 +384,7 @@ process_hello (void *cls, | |||
384 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 384 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
385 | "Received (my) `%s' from transport service\n", "HELLO"); | 385 | "Received (my) `%s' from transport service\n", "HELLO"); |
386 | GNUNET_assert (message != NULL); | 386 | GNUNET_assert (message != NULL); |
387 | GNUNET_free_non_null (p->hello); | 387 | GNUNET_free (p->hello); |
388 | p->hello = GNUNET_copy_message (message); | 388 | p->hello = GNUNET_copy_message (message); |
389 | if ((p == &p1) && (NULL == p2.oh)) | 389 | if ((p == &p1) && (NULL == p2.oh)) |
390 | p2.oh = GNUNET_TRANSPORT_offer_hello (p2.cfg, | 390 | p2.oh = GNUNET_TRANSPORT_offer_hello (p2.cfg, |
@@ -419,8 +419,8 @@ setup_peer (struct PeerContext *p, | |||
419 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 419 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
420 | p->cfg = GNUNET_CONFIGURATION_create (); | 420 | p->cfg = GNUNET_CONFIGURATION_create (); |
421 | p->arm_proc | 421 | p->arm_proc |
422 | = GNUNET_OS_start_process (GNUNET_YES, | 422 | = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
423 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 423 | | GNUNET_OS_USE_PIPE_CONTROL, |
424 | NULL, NULL, NULL, | 424 | NULL, NULL, NULL, |
425 | binary, | 425 | binary, |
426 | "gnunet-service-arm", | 426 | "gnunet-service-arm", |
@@ -523,8 +523,8 @@ main (int argc, | |||
523 | &ok); | 523 | &ok); |
524 | stop_arm (&p1); | 524 | stop_arm (&p1); |
525 | stop_arm (&p2); | 525 | stop_arm (&p2); |
526 | GNUNET_free_non_null (p1.hello); | 526 | GNUNET_free (p1.hello); |
527 | GNUNET_free_non_null (p2.hello); | 527 | GNUNET_free (p2.hello); |
528 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); | 528 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); |
529 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2"); | 529 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2"); |
530 | 530 | ||
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index 3cbe50d72..007131134 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -118,8 +118,8 @@ setup_peer (struct PeerContext *p, | |||
118 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 118 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
119 | p->cfg = GNUNET_CONFIGURATION_create (); | 119 | p->cfg = GNUNET_CONFIGURATION_create (); |
120 | p->arm_proc = | 120 | p->arm_proc = |
121 | GNUNET_OS_start_process (GNUNET_YES, | 121 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
122 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 122 | | GNUNET_OS_USE_PIPE_CONTROL, |
123 | NULL, NULL, NULL, | 123 | NULL, NULL, NULL, |
124 | binary, | 124 | binary, |
125 | "gnunet-service-arm", | 125 | "gnunet-service-arm", |
diff --git a/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf b/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf index fa2d64474..766a2e73b 100644 --- a/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf +++ b/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf | |||
@@ -32,20 +32,20 @@ PORT = 12489 | |||
32 | PORT = 12491 | 32 | PORT = 12491 |
33 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-recv-p1-service-ats.sock | 33 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-recv-p1-service-ats.sock |
34 | # UNSPECIFIED | 34 | # UNSPECIFIED |
35 | UNSPECIFIED_QUOTA_IN = 1 MB | 35 | UNSPECIFIED_QUOTA_IN = 100 MiB |
36 | UNSPECIFIED_QUOTA_OUT = 1 MB | 36 | UNSPECIFIED_QUOTA_OUT = 100 MiB |
37 | # LOOPBACK | 37 | # LOOPBACK |
38 | LOOPBACK_QUOTA_IN = 1 MB | 38 | LOOPBACK_QUOTA_IN = 100 MiB |
39 | LOOPBACK_QUOTA_OUT = 1 MB | 39 | LOOPBACK_QUOTA_OUT = 100 MiB |
40 | # LAN | 40 | # LAN |
41 | LAN_QUOTA_IN = 1 MB | 41 | LAN_QUOTA_IN = 100 MiB |
42 | LAN_QUOTA_OUT = 1 MB | 42 | LAN_QUOTA_OUT = 100 MiB |
43 | # WAN | 43 | # WAN |
44 | WAN_QUOTA_IN = 1 MB | 44 | WAN_QUOTA_IN = 100 MiB |
45 | WAN_QUOTA_OUT = 1 MB | 45 | WAN_QUOTA_OUT = 100 MiB |
46 | # WLAN | 46 | # WLAN |
47 | WLAN_QUOTA_IN = 1 MB | 47 | WLAN_QUOTA_IN = 100 MiB |
48 | WLAN_QUOTA_OUT = 1 MB | 48 | WLAN_QUOTA_OUT = 100 MiB |
49 | 49 | ||
50 | 50 | ||
51 | [core] | 51 | [core] |
diff --git a/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf b/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf index b2a84f706..30c0bb81f 100644 --- a/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf +++ b/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf | |||
@@ -31,20 +31,20 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-recv-p2-service-core.sock | |||
31 | PORT = 22491 | 31 | PORT = 22491 |
32 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-recv-p2-service-ats.sock | 32 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-recv-p2-service-ats.sock |
33 | # UNSPECIFIED | 33 | # UNSPECIFIED |
34 | UNSPECIFIED_QUOTA_IN = 10240 | 34 | UNSPECIFIED_QUOTA_IN = 10 MiB |
35 | UNSPECIFIED_QUOTA_OUT = 10240 | 35 | UNSPECIFIED_QUOTA_OUT = 10 MiB |
36 | # LOOPBACK | 36 | # LOOPBACK |
37 | LOOPBACK_QUOTA_IN = 10240 | 37 | LOOPBACK_QUOTA_IN = 10 MiB |
38 | LOOPBACK_QUOTA_OUT = 10240 | 38 | LOOPBACK_QUOTA_OUT = 10 MiB |
39 | # LAN | 39 | # LAN |
40 | LAN_QUOTA_IN = 10240 | 40 | LAN_QUOTA_IN = 10 MiB |
41 | LAN_QUOTA_OUT = 10240 | 41 | LAN_QUOTA_OUT = 10 MiB |
42 | # WAN | 42 | # WAN |
43 | WAN_QUOTA_IN = 10240 | 43 | WAN_QUOTA_IN = 10 MiB |
44 | WAN_QUOTA_OUT = 10240 | 44 | WAN_QUOTA_OUT = 10 MiB |
45 | # WLAN | 45 | # WLAN |
46 | WLAN_QUOTA_IN = 10240 | 46 | WLAN_QUOTA_IN = 10 MiB |
47 | WLAN_QUOTA_OUT = 10240 | 47 | WLAN_QUOTA_OUT = 10 MiB |
48 | 48 | ||
49 | [transport-tcp] | 49 | [transport-tcp] |
50 | PORT = 22467 | 50 | PORT = 22467 |
diff --git a/src/core/test_core_quota_asymmetric_send_limit_peer1.conf b/src/core/test_core_quota_asymmetric_send_limit_peer1.conf index 6b416f580..4a9f483d6 100644 --- a/src/core/test_core_quota_asymmetric_send_limit_peer1.conf +++ b/src/core/test_core_quota_asymmetric_send_limit_peer1.conf | |||
@@ -32,20 +32,20 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-send-p1-service-transport.sock | |||
32 | PORT = 12491 | 32 | PORT = 12491 |
33 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-send-p1-service-ats.sock | 33 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-send-p1-service-ats.sock |
34 | # UNSPECIFIED | 34 | # UNSPECIFIED |
35 | UNSPECIFIED_QUOTA_IN = 10240 | 35 | UNSPECIFIED_QUOTA_IN = 10 MiB |
36 | UNSPECIFIED_QUOTA_OUT = 10240 | 36 | UNSPECIFIED_QUOTA_OUT = 10 MiB |
37 | # LOOPBACK | 37 | # LOOPBACK |
38 | LOOPBACK_QUOTA_IN = 10240 | 38 | LOOPBACK_QUOTA_IN = 10 MiB |
39 | LOOPBACK_QUOTA_OUT = 10240 | 39 | LOOPBACK_QUOTA_OUT = 10 MiB |
40 | # LAN | 40 | # LAN |
41 | LAN_QUOTA_IN = 10240 | 41 | LAN_QUOTA_IN = 10 MiB |
42 | LAN_QUOTA_OUT = 10240 | 42 | LAN_QUOTA_OUT = 10 MiB |
43 | # WAN | 43 | # WAN |
44 | WAN_QUOTA_IN = 10240 | 44 | WAN_QUOTA_IN = 10 MiB |
45 | WAN_QUOTA_OUT = 10240 | 45 | WAN_QUOTA_OUT = 10 MiB |
46 | # WLAN | 46 | # WLAN |
47 | WLAN_QUOTA_IN = 10240 | 47 | WLAN_QUOTA_IN = 10 MiB |
48 | WLAN_QUOTA_OUT = 10240 | 48 | WLAN_QUOTA_OUT = 10 MiB |
49 | 49 | ||
50 | [core] | 50 | [core] |
51 | PORT = 12490 | 51 | PORT = 12490 |
diff --git a/src/core/test_core_quota_asymmetric_send_limit_peer2.conf b/src/core/test_core_quota_asymmetric_send_limit_peer2.conf index 05ea062e6..36434461c 100644 --- a/src/core/test_core_quota_asymmetric_send_limit_peer2.conf +++ b/src/core/test_core_quota_asymmetric_send_limit_peer2.conf | |||
@@ -29,27 +29,27 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-send-p2-service-core.sock | |||
29 | [ats] | 29 | [ats] |
30 | PORT = 22491 | 30 | PORT = 22491 |
31 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-send-p2-service-ats.sock | 31 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-asym-send-p2-service-ats.sock |
32 | WAN_QUOTA_IN = 1 MB | 32 | WAN_QUOTA_IN = 100 MiB |
33 | WAN_QUOTA_OUT = 1 MB | 33 | WAN_QUOTA_OUT = 100 MiB |
34 | 34 | ||
35 | [ats] | 35 | [ats] |
36 | PORT = 12471 | 36 | PORT = 12471 |
37 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-ats.sock | 37 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-ats.sock |
38 | # UNSPECIFIED | 38 | # UNSPECIFIED |
39 | UNSPECIFIED_QUOTA_IN = 1 MB | 39 | UNSPECIFIED_QUOTA_IN = 100 MiB |
40 | UNSPECIFIED_QUOTA_OUT = 1 MB | 40 | UNSPECIFIED_QUOTA_OUT = 100 MiB |
41 | # LOOPBACK | 41 | # LOOPBACK |
42 | LOOPBACK_QUOTA_IN = 1 MB | 42 | LOOPBACK_QUOTA_IN = 100 MiB |
43 | LOOPBACK_QUOTA_OUT = 1 MB | 43 | LOOPBACK_QUOTA_OUT = 100 MiB |
44 | # LAN | 44 | # LAN |
45 | LAN_QUOTA_IN = 1 MB | 45 | LAN_QUOTA_IN = 100 MiB |
46 | LAN_QUOTA_OUT = 1 MB | 46 | LAN_QUOTA_OUT = 100 MiB |
47 | # WAN | 47 | # WAN |
48 | WAN_QUOTA_IN = 1 MB | 48 | WAN_QUOTA_IN = 100 MiB |
49 | WAN_QUOTA_OUT = 1 MB | 49 | WAN_QUOTA_OUT = 100 MiB |
50 | # WLAN | 50 | # WLAN |
51 | WLAN_QUOTA_IN = 1 MB | 51 | WLAN_QUOTA_IN = 100 MiB |
52 | WLAN_QUOTA_OUT = 1 MB | 52 | WLAN_QUOTA_OUT = 100 MiB |
53 | 53 | ||
54 | [transport-tcp] | 54 | [transport-tcp] |
55 | PORT = 22467 | 55 | PORT = 22467 |
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 67f8bb224..cf2da3d97 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -570,8 +570,8 @@ setup_peer (struct PeerContext *p, | |||
570 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 570 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
571 | p->cfg = GNUNET_CONFIGURATION_create (); | 571 | p->cfg = GNUNET_CONFIGURATION_create (); |
572 | p->arm_proc = | 572 | p->arm_proc = |
573 | GNUNET_OS_start_process (GNUNET_YES, | 573 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
574 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 574 | | GNUNET_OS_USE_PIPE_CONTROL, |
575 | NULL, NULL, NULL, | 575 | NULL, NULL, NULL, |
576 | binary, | 576 | binary, |
577 | "gnunet-service-arm", | 577 | "gnunet-service-arm", |
diff --git a/src/core/test_core_quota_peer1.conf b/src/core/test_core_quota_peer1.conf index ea4fa273c..ec592f778 100644 --- a/src/core/test_core_quota_peer1.conf +++ b/src/core/test_core_quota_peer1.conf | |||
@@ -1,61 +1,58 @@ | |||
1 | @INLINE@ test_core_defaults.conf | 1 | @INLINE@ test_core_defaults.conf |
2 | [PATHS] | 2 | [PATHS] |
3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-core-quota-sym-peer-1/ | 3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-core-peer-1/ |
4 | |||
5 | [transport-tcp] | ||
6 | PORT = 12468 | ||
7 | 4 | ||
8 | [arm] | 5 | [arm] |
9 | PORT = 12476 | 6 | PORT = 12460 |
10 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-arm.sock | 7 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock |
11 | 8 | ||
12 | [statistics] | 9 | [statistics] |
13 | PORT = 12477 | 10 | PORT = 12461 |
14 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-statistics.sock | ||
15 | 11 | ||
16 | [resolver] | 12 | [resolver] |
17 | PORT = 12474 | 13 | PORT = 12462 |
18 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-resolver.sock | 14 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock |
19 | 15 | ||
20 | [peerinfo] | 16 | [peerinfo] |
21 | PORT = 12479 | 17 | PORT = 12463 |
22 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-peerinfo.sock | 18 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock |
23 | 19 | ||
24 | [transport] | 20 | [transport] |
25 | PORT = 12475 | 21 | PORT = 12464 |
26 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-transport.sock | 22 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock |
27 | 23 | ||
28 | [nat] | 24 | [core] |
29 | port = 12481 | 25 | PORT = 12475 |
30 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-nat.sock | 26 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-core.sock |
31 | 27 | ||
32 | [ats] | 28 | [ats] |
33 | PORT = 12471 | 29 | PORT = 12476 |
34 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-ats.sock | 30 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-ats.sock |
35 | # UNSPECIFIED | 31 | # UNSPECIFIED |
36 | UNSPECIFIED_QUOTA_IN = 10240 | 32 | UNSPECIFIED_QUOTA_IN = 10 MiB |
37 | UNSPECIFIED_QUOTA_OUT = 10240 | 33 | UNSPECIFIED_QUOTA_OUT = 10 MiB |
38 | # LOOPBACK | 34 | # LOOPBACK |
39 | LOOPBACK_QUOTA_IN = 10240 | 35 | LOOPBACK_QUOTA_IN = 10 MiB |
40 | LOOPBACK_QUOTA_OUT = 10240 | 36 | LOOPBACK_QUOTA_OUT = 10 MiB |
41 | # LAN | 37 | # LAN |
42 | LAN_QUOTA_IN = 10240 | 38 | LAN_QUOTA_IN = 10 MiB |
43 | LAN_QUOTA_OUT = 10240 | 39 | LAN_QUOTA_OUT = 10 MiB |
44 | # WAN | 40 | # WAN |
45 | WAN_QUOTA_IN = 10240 | 41 | WAN_QUOTA_IN = 10 MiB |
46 | WAN_QUOTA_OUT = 10240 | 42 | WAN_QUOTA_OUT = 10 MiB |
47 | # WLAN | 43 | # WLAN |
48 | WLAN_QUOTA_IN = 10240 | 44 | WLAN_QUOTA_IN = 10 MiB |
49 | WLAN_QUOTA_OUT = 10240 | 45 | WLAN_QUOTA_OUT = 10 MiB |
50 | 46 | ||
51 | [core] | ||
52 | PORT = 12480 | ||
53 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-core.sock | ||
54 | 47 | ||
55 | [ats] | 48 | [transport-tcp] |
56 | PORT = 12481 | 49 | PORT = 12467 |
57 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-ats.sock | ||
58 | 50 | ||
59 | [transport-udp] | 51 | [transport-udp] |
60 | PORT = 12482 | 52 | PORT = 12468 |
53 | |||
54 | [transport-unix] | ||
55 | PORT = 12469 | ||
61 | 56 | ||
57 | [transport-http] | ||
58 | PORT = 12470 | ||
diff --git a/src/core/test_core_quota_peer2.conf b/src/core/test_core_quota_peer2.conf index 03c684cff..65d0710bb 100644 --- a/src/core/test_core_quota_peer2.conf +++ b/src/core/test_core_quota_peer2.conf | |||
@@ -1,53 +1,50 @@ | |||
1 | @INLINE@ test_core_defaults.conf | 1 | @INLINE@ test_core_defaults.conf |
2 | [PATHS] | 2 | [PATHS] |
3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-core-quota-sym-peer-2/ | 3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-core-peer-2/ |
4 | 4 | ||
5 | [arm] | 5 | [arm] |
6 | PORT = 22476 | 6 | PORT = 22460 |
7 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-arm.sock | 7 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock |
8 | 8 | ||
9 | [statistics] | 9 | [statistics] |
10 | PORT = 22477 | 10 | PORT = 22461 |
11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-statistics.sock | 11 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock |
12 | 12 | ||
13 | [resolver] | 13 | [resolver] |
14 | PORT = 22474 | 14 | PORT = 22462 |
15 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-resolver.sock | 15 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock |
16 | 16 | ||
17 | [peerinfo] | 17 | [peerinfo] |
18 | PORT = 22479 | 18 | PORT = 22463 |
19 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-peerinfo.sock | 19 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock |
20 | 20 | ||
21 | [transport] | 21 | [transport] |
22 | PORT = 22475 | 22 | PORT = 22464 |
23 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-transport.sock | 23 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock |
24 | 24 | ||
25 | [core] | 25 | [core] |
26 | PORT = 22480 | 26 | PORT = 22475 |
27 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-core.sock | 27 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-core.sock |
28 | |||
29 | [nat] | ||
30 | PORT = 22481 | ||
31 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2.service-nat.sock | ||
32 | 28 | ||
33 | [ats] | 29 | [ats] |
34 | PORT = 22482 | 30 | PORT = 22476 |
35 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-ats.sock | 31 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-ats.sock |
36 | # UNSPECIFIED | 32 | # UNSPECIFIED |
37 | UNSPECIFIED_QUOTA_IN = 10240 | 33 | UNSPECIFIED_QUOTA_IN = 10 MiB |
38 | UNSPECIFIED_QUOTA_OUT = 10240 | 34 | UNSPECIFIED_QUOTA_OUT = 10 MiB |
39 | # LOOPBACK | 35 | # LOOPBACK |
40 | LOOPBACK_QUOTA_IN = 10240 | 36 | LOOPBACK_QUOTA_IN = 10 MiB |
41 | LOOPBACK_QUOTA_OUT = 10240 | 37 | LOOPBACK_QUOTA_OUT = 10 MiB |
42 | # LAN | 38 | # LAN |
43 | LAN_QUOTA_IN = 10240 | 39 | LAN_QUOTA_IN = 10 MiB |
44 | LAN_QUOTA_OUT = 10240 | 40 | LAN_QUOTA_OUT = 10 MiB |
45 | # WAN | 41 | # WAN |
46 | WAN_QUOTA_IN = 10240 | 42 | WAN_QUOTA_IN = 10 MiB |
47 | WAN_QUOTA_OUT = 10240 | 43 | WAN_QUOTA_OUT = 10 MiB |
48 | # WLAN | 44 | # WLAN |
49 | WLAN_QUOTA_IN = 10240 | 45 | WLAN_QUOTA_IN = 10 MiB |
50 | WLAN_QUOTA_OUT = 10240 | 46 | WLAN_QUOTA_OUT = 10 MiB |
47 | |||
51 | 48 | ||
52 | [transport-tcp] | 49 | [transport-tcp] |
53 | PORT = 22467 | 50 | PORT = 22467 |
@@ -55,5 +52,8 @@ PORT = 22467 | |||
55 | [transport-udp] | 52 | [transport-udp] |
56 | PORT = 22468 | 53 | PORT = 22468 |
57 | 54 | ||
58 | [transport-http] | 55 | [transport-unix] |
59 | PORT = 22469 | 56 | PORT = 22469 |
57 | |||
58 | [transport-http] | ||
59 | PORT = 22470 | ||
diff --git a/src/curl/curl.c b/src/curl/curl.c index b7452330f..eb9dd6a29 100644 --- a/src/curl/curl.c +++ b/src/curl/curl.c | |||
@@ -170,10 +170,93 @@ struct GNUNET_CURL_Context | |||
170 | * Closure for @e cb. | 170 | * Closure for @e cb. |
171 | */ | 171 | */ |
172 | void *cb_cls; | 172 | void *cb_cls; |
173 | |||
174 | /** | ||
175 | * USERNAME:PASSWORD to use for client-authentication | ||
176 | * with all requests of this context, or NULL. | ||
177 | */ | ||
178 | char *userpass; | ||
179 | |||
180 | /** | ||
181 | * Type of the TLS client certificate used, or NULL. | ||
182 | */ | ||
183 | char *certtype; | ||
184 | |||
185 | /** | ||
186 | * File with the TLS client certificate, or NULL. | ||
187 | */ | ||
188 | char *certfile; | ||
189 | |||
190 | /** | ||
191 | * File with the private key to authenticate the | ||
192 | * TLS client, or NULL. | ||
193 | */ | ||
194 | char *keyfile; | ||
195 | |||
196 | /** | ||
197 | * Passphrase to decrypt @e keyfile, or NULL. | ||
198 | */ | ||
199 | char *keypass; | ||
200 | |||
173 | }; | 201 | }; |
174 | 202 | ||
175 | 203 | ||
176 | /** | 204 | /** |
205 | * Force use of the provided username and password | ||
206 | * for client authentication for all operations performed | ||
207 | * with @a ctx. | ||
208 | * | ||
209 | * @param ctx context to set authentication data for | ||
210 | * @param userpass string with "$USERNAME:$PASSWORD" | ||
211 | */ | ||
212 | void | ||
213 | GNUNET_CURL_set_userpass (struct GNUNET_CURL_Context *ctx, | ||
214 | const char *userpass) | ||
215 | { | ||
216 | GNUNET_free (ctx->userpass); | ||
217 | if (NULL != userpass) | ||
218 | ctx->userpass = GNUNET_strdup (userpass); | ||
219 | } | ||
220 | |||
221 | |||
222 | /** | ||
223 | * Force use of the provided TLS client certificate | ||
224 | * for client authentication for all operations performed | ||
225 | * with @a ctx. | ||
226 | * | ||
227 | * Note that if the provided information is incorrect, | ||
228 | * the earliest operation that could fail is | ||
229 | * #GNUNET_CURL_job_add() or #GNUNET_CURL_job_add2()! | ||
230 | * | ||
231 | * @param ctx context to set authentication data for | ||
232 | * @param certtype type of the certificate | ||
233 | * @param certfile file with the certificate | ||
234 | * @param keyfile file with the private key | ||
235 | * @param keypass passphrase to decrypt @a keyfile (or NULL) | ||
236 | */ | ||
237 | void | ||
238 | GNUNET_CURL_set_tlscert (struct GNUNET_CURL_Context *ctx, | ||
239 | const char *certtype, | ||
240 | const char *certfile, | ||
241 | const char *keyfile, | ||
242 | const char *keypass) | ||
243 | { | ||
244 | GNUNET_free (ctx->certtype); | ||
245 | GNUNET_free (ctx->certfile); | ||
246 | GNUNET_free (ctx->keyfile); | ||
247 | GNUNET_free (ctx->keypass); | ||
248 | if (NULL != certtype) | ||
249 | ctx->certtype = GNUNET_strdup (certtype); | ||
250 | if (NULL != certfile) | ||
251 | ctx->certfile = GNUNET_strdup (certfile); | ||
252 | if (NULL != keyfile) | ||
253 | ctx->certtype = GNUNET_strdup (keyfile); | ||
254 | if (NULL != keypass) | ||
255 | ctx->certtype = GNUNET_strdup (keypass); | ||
256 | } | ||
257 | |||
258 | |||
259 | /** | ||
177 | * Initialise this library. This function should be called before using any of | 260 | * Initialise this library. This function should be called before using any of |
178 | * the following functions. | 261 | * the following functions. |
179 | * | 262 | * |
@@ -457,6 +540,32 @@ GNUNET_CURL_job_add2 (struct GNUNET_CURL_Context *ctx, | |||
457 | struct curl_slist *all_headers; | 540 | struct curl_slist *all_headers; |
458 | 541 | ||
459 | GNUNET_assert (NULL != jcc); | 542 | GNUNET_assert (NULL != jcc); |
543 | if ( (NULL != ctx->userpass) && | ||
544 | (0 != curl_easy_setopt (eh, | ||
545 | CURLOPT_USERPWD, | ||
546 | ctx->userpass)) ) | ||
547 | return NULL; | ||
548 | if ( (NULL != ctx->certfile) && | ||
549 | (0 != curl_easy_setopt (eh, | ||
550 | CURLOPT_SSLCERT, | ||
551 | ctx->certfile)) ) | ||
552 | return NULL; | ||
553 | if ( (NULL != ctx->certtype) && | ||
554 | (0 != curl_easy_setopt (eh, | ||
555 | CURLOPT_SSLCERTTYPE, | ||
556 | ctx->certtype)) ) | ||
557 | return NULL; | ||
558 | if ( (NULL != ctx->keyfile) && | ||
559 | (0 != curl_easy_setopt (eh, | ||
560 | CURLOPT_SSLKEY, | ||
561 | ctx->keyfile)) ) | ||
562 | return NULL; | ||
563 | if ( (NULL != ctx->keypass) && | ||
564 | (0 != curl_easy_setopt (eh, | ||
565 | CURLOPT_KEYPASSWD, | ||
566 | ctx->keypass)) ) | ||
567 | return NULL; | ||
568 | |||
460 | all_headers = setup_job_headers (ctx, | 569 | all_headers = setup_job_headers (ctx, |
461 | job_headers); | 570 | job_headers); |
462 | if (NULL == (job = setup_job (eh, | 571 | if (NULL == (job = setup_job (eh, |
@@ -477,33 +586,27 @@ GNUNET_CURL_job_add2 (struct GNUNET_CURL_Context *ctx, | |||
477 | * CURLOPT_PRIVATE facility of the CURL @a eh. | 586 | * CURLOPT_PRIVATE facility of the CURL @a eh. |
478 | * | 587 | * |
479 | * This function modifies the CURL handle to add the | 588 | * This function modifies the CURL handle to add the |
480 | * "Content-Type: application/json" header if @a add_json is set. | 589 | * "Content-Type: application/json" header. |
481 | * | 590 | * |
482 | * @param ctx context to execute the job in | 591 | * @param ctx context to execute the job in |
483 | * @param eh curl easy handle for the request, will | 592 | * @param eh curl easy handle for the request, will |
484 | * be executed AND cleaned up | 593 | * be executed AND cleaned up |
485 | * @param add_json add "application/json" content type header | ||
486 | * @param jcc callback to invoke upon completion | 594 | * @param jcc callback to invoke upon completion |
487 | * @param jcc_cls closure for @a jcc | 595 | * @param jcc_cls closure for @a jcc |
488 | * @return NULL on error (in this case, @eh is still released!) | 596 | * @return NULL on error (in this case, @eh is still released!) |
489 | */ | 597 | */ |
490 | struct GNUNET_CURL_Job * | 598 | struct GNUNET_CURL_Job * |
491 | GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | 599 | GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx, |
492 | CURL *eh, | 600 | CURL *eh, |
493 | int add_json, | 601 | GNUNET_CURL_JobCompletionCallback jcc, |
494 | GNUNET_CURL_JobCompletionCallback jcc, | 602 | void *jcc_cls) |
495 | void *jcc_cls) | ||
496 | { | 603 | { |
497 | struct GNUNET_CURL_Job *job; | 604 | struct GNUNET_CURL_Job *job; |
498 | struct curl_slist *job_headers = NULL; | 605 | struct curl_slist *job_headers = NULL; |
499 | 606 | ||
500 | if (GNUNET_YES == add_json) | 607 | GNUNET_assert (NULL != (job_headers = |
501 | { | 608 | curl_slist_append (NULL, |
502 | GNUNET_assert ( | 609 | "Content-Type: application/json"))); |
503 | NULL != (job_headers = | ||
504 | curl_slist_append (NULL, "Content-Type: application/json"))); | ||
505 | } | ||
506 | |||
507 | job = GNUNET_CURL_job_add2 (ctx, | 610 | job = GNUNET_CURL_job_add2 (ctx, |
508 | eh, | 611 | eh, |
509 | job_headers, | 612 | job_headers, |
@@ -515,6 +618,32 @@ GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | |||
515 | 618 | ||
516 | 619 | ||
517 | /** | 620 | /** |
621 | * Schedule a CURL request to be executed and call the given @a jcc | ||
622 | * upon its completion. Note that the context will make use of the | ||
623 | * CURLOPT_PRIVATE facility of the CURL @a eh. | ||
624 | * | ||
625 | * @param ctx context to execute the job in | ||
626 | * @param eh curl easy handle for the request, will | ||
627 | * be executed AND cleaned up | ||
628 | * @param jcc callback to invoke upon completion | ||
629 | * @param jcc_cls closure for @a jcc | ||
630 | * @return NULL on error (in this case, @eh is still released!) | ||
631 | */ | ||
632 | struct GNUNET_CURL_Job * | ||
633 | GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | ||
634 | CURL *eh, | ||
635 | GNUNET_CURL_JobCompletionCallback jcc, | ||
636 | void *jcc_cls) | ||
637 | { | ||
638 | return GNUNET_CURL_job_add2 (ctx, | ||
639 | eh, | ||
640 | NULL, | ||
641 | jcc, | ||
642 | jcc_cls); | ||
643 | } | ||
644 | |||
645 | |||
646 | /** | ||
518 | * Cancel a job. Must only be called before the job completion | 647 | * Cancel a job. Must only be called before the job completion |
519 | * callback is called for the respective job. | 648 | * callback is called for the respective job. |
520 | * | 649 | * |
@@ -529,7 +658,7 @@ GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job) | |||
529 | GNUNET_break (CURLM_OK == | 658 | GNUNET_break (CURLM_OK == |
530 | curl_multi_remove_handle (ctx->multi, job->easy_handle)); | 659 | curl_multi_remove_handle (ctx->multi, job->easy_handle)); |
531 | curl_easy_cleanup (job->easy_handle); | 660 | curl_easy_cleanup (job->easy_handle); |
532 | GNUNET_free_non_null (job->db.buf); | 661 | GNUNET_free (job->db.buf); |
533 | curl_slist_free_all (job->job_headers); | 662 | curl_slist_free_all (job->job_headers); |
534 | ctx->cb (ctx->cb_cls); | 663 | ctx->cb (ctx->cb_cls); |
535 | GNUNET_free (job); | 664 | GNUNET_free (job); |
@@ -642,7 +771,7 @@ GNUNET_CURL_download_get_result_ (struct GNUNET_CURL_DownloadBuffer *db, | |||
642 | *response_code = 0; | 771 | *response_code = 0; |
643 | } | 772 | } |
644 | } | 773 | } |
645 | GNUNET_free_non_null (db->buf); | 774 | GNUNET_free (db->buf); |
646 | db->buf = NULL; | 775 | db->buf = NULL; |
647 | db->buf_size = 0; | 776 | db->buf_size = 0; |
648 | if (NULL != json) | 777 | if (NULL != json) |
@@ -899,6 +1028,11 @@ GNUNET_CURL_fini (struct GNUNET_CURL_Context *ctx) | |||
899 | curl_share_cleanup (ctx->share); | 1028 | curl_share_cleanup (ctx->share); |
900 | curl_multi_cleanup (ctx->multi); | 1029 | curl_multi_cleanup (ctx->multi); |
901 | curl_slist_free_all (ctx->common_headers); | 1030 | curl_slist_free_all (ctx->common_headers); |
1031 | GNUNET_free (ctx->userpass); | ||
1032 | GNUNET_free (ctx->certtype); | ||
1033 | GNUNET_free (ctx->certfile); | ||
1034 | GNUNET_free (ctx->keyfile); | ||
1035 | GNUNET_free (ctx->keypass); | ||
902 | GNUNET_free (ctx); | 1036 | GNUNET_free (ctx); |
903 | } | 1037 | } |
904 | 1038 | ||
diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c index dbc9cac9c..074437e7d 100644 --- a/src/datacache/plugin_datacache_heap.c +++ b/src/datacache/plugin_datacache_heap.c | |||
@@ -395,7 +395,7 @@ heap_plugin_del (void *cls) | |||
395 | plugin->env->delete_notify (plugin->env->cls, | 395 | plugin->env->delete_notify (plugin->env->cls, |
396 | &val->key, | 396 | &val->key, |
397 | val->size + OVERHEAD); | 397 | val->size + OVERHEAD); |
398 | GNUNET_free_non_null (val->path_info); | 398 | GNUNET_free (val->path_info); |
399 | GNUNET_free (val); | 399 | GNUNET_free (val); |
400 | return GNUNET_OK; | 400 | return GNUNET_OK; |
401 | } | 401 | } |
@@ -577,7 +577,7 @@ libgnunet_plugin_datacache_heap_done (void *cls) | |||
577 | GNUNET_CONTAINER_multihashmap_remove (plugin->map, | 577 | GNUNET_CONTAINER_multihashmap_remove (plugin->map, |
578 | &val->key, | 578 | &val->key, |
579 | val)); | 579 | val)); |
580 | GNUNET_free_non_null (val->path_info); | 580 | GNUNET_free (val->path_info); |
581 | GNUNET_free (val); | 581 | GNUNET_free (val); |
582 | } | 582 | } |
583 | GNUNET_CONTAINER_heap_destroy (plugin->heaps[i]); | 583 | GNUNET_CONTAINER_heap_destroy (plugin->heaps[i]); |
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index 55a8a7fae..a7da6b068 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c | |||
@@ -764,7 +764,7 @@ libgnunet_plugin_datacache_sqlite_done (void *cls) | |||
764 | #if ! WINDOWS || defined(__CYGWIN__) | 764 | #if ! WINDOWS || defined(__CYGWIN__) |
765 | if ((NULL != plugin->fn) && (0 != unlink (plugin->fn))) | 765 | if ((NULL != plugin->fn) && (0 != unlink (plugin->fn))) |
766 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn); | 766 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn); |
767 | GNUNET_free_non_null (plugin->fn); | 767 | GNUNET_free (plugin->fn); |
768 | #endif | 768 | #endif |
769 | sqlite3_finalize (plugin->insert_stmt); | 769 | sqlite3_finalize (plugin->insert_stmt); |
770 | sqlite3_finalize (plugin->get_count_stmt); | 770 | sqlite3_finalize (plugin->get_count_stmt); |
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index 3fc46e19c..1c9e5e463 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c | |||
@@ -1355,7 +1355,7 @@ cleaning_task (void *cls) | |||
1355 | GNUNET_SCHEDULER_cancel (stat_timeout_task); | 1355 | GNUNET_SCHEDULER_cancel (stat_timeout_task); |
1356 | stat_timeout_task = NULL; | 1356 | stat_timeout_task = NULL; |
1357 | } | 1357 | } |
1358 | GNUNET_free_non_null (plugin_name); | 1358 | GNUNET_free (plugin_name); |
1359 | plugin_name = NULL; | 1359 | plugin_name = NULL; |
1360 | if (last_sync > 0) | 1360 | if (last_sync > 0) |
1361 | sync_stats (); | 1361 | sync_stats (); |
@@ -1490,7 +1490,7 @@ run (void *cls, | |||
1490 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1490 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1491 | _ ("Could not use specified filename `%s' for bloomfilter.\n"), | 1491 | _ ("Could not use specified filename `%s' for bloomfilter.\n"), |
1492 | NULL != fn ? fn : ""); | 1492 | NULL != fn ? fn : ""); |
1493 | GNUNET_free_non_null (fn); | 1493 | GNUNET_free (fn); |
1494 | fn = NULL; | 1494 | fn = NULL; |
1495 | } | 1495 | } |
1496 | if (NULL != fn) | 1496 | if (NULL != fn) |
@@ -1566,7 +1566,7 @@ run (void *cls, | |||
1566 | 5); /* approx. 3% false positives at max use */ | 1566 | 5); /* approx. 3% false positives at max use */ |
1567 | refresh_bf = GNUNET_YES; | 1567 | refresh_bf = GNUNET_YES; |
1568 | } | 1568 | } |
1569 | GNUNET_free_non_null (fn); | 1569 | GNUNET_free (fn); |
1570 | if (NULL == filter) | 1570 | if (NULL == filter) |
1571 | { | 1571 | { |
1572 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1572 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index b3b30f256..cecc37978 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c | |||
@@ -550,7 +550,7 @@ database_shutdown (struct Plugin *plugin) | |||
550 | #endif | 550 | #endif |
551 | if (SQLITE_OK != result) | 551 | if (SQLITE_OK != result) |
552 | LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR, "sqlite3_close"); | 552 | LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR, "sqlite3_close"); |
553 | GNUNET_free_non_null (plugin->fn); | 553 | GNUNET_free (plugin->fn); |
554 | } | 554 | } |
555 | 555 | ||
556 | 556 | ||
@@ -640,7 +640,7 @@ sqlite_plugin_put (void *cls, | |||
640 | GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 640 | GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |
641 | "sqlite3_step"); | 641 | "sqlite3_step"); |
642 | cont (cont_cls, key, size, GNUNET_SYSERR, msg); | 642 | cont (cont_cls, key, size, GNUNET_SYSERR, msg); |
643 | GNUNET_free_non_null (msg); | 643 | GNUNET_free (msg); |
644 | return; | 644 | return; |
645 | } | 645 | } |
646 | int changes = sqlite3_changes (plugin->dbh); | 646 | int changes = sqlite3_changes (plugin->dbh); |
@@ -724,12 +724,12 @@ sqlite_plugin_put (void *cls, | |||
724 | database_shutdown (plugin); | 724 | database_shutdown (plugin); |
725 | database_setup (plugin->env->cfg, plugin); | 725 | database_setup (plugin->env->cfg, plugin); |
726 | cont (cont_cls, key, size, GNUNET_SYSERR, msg); | 726 | cont (cont_cls, key, size, GNUNET_SYSERR, msg); |
727 | GNUNET_free_non_null (msg); | 727 | GNUNET_free (msg); |
728 | return; | 728 | return; |
729 | } | 729 | } |
730 | GNUNET_SQ_reset (plugin->dbh, stmt); | 730 | GNUNET_SQ_reset (plugin->dbh, stmt); |
731 | cont (cont_cls, key, size, ret, msg); | 731 | cont (cont_cls, key, size, ret, msg); |
732 | GNUNET_free_non_null (msg); | 732 | GNUNET_free (msg); |
733 | } | 733 | } |
734 | 734 | ||
735 | 735 | ||
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index dbe590bab..e72a6acd3 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c | |||
@@ -198,7 +198,7 @@ check_success (void *cls, | |||
198 | msg); | 198 | msg); |
199 | crc->phase = RP_ERROR; | 199 | crc->phase = RP_ERROR; |
200 | } | 200 | } |
201 | GNUNET_free_non_null (crc->data); | 201 | GNUNET_free (crc->data); |
202 | crc->data = NULL; | 202 | crc->data = NULL; |
203 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); | 203 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
204 | } | 204 | } |
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index 7bec0d064..175765267 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -131,7 +131,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute | |||
131 | if (GNUNET_OK != success) | 131 | if (GNUNET_OK != success) |
132 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", msg); | 132 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", msg); |
133 | GNUNET_assert (GNUNET_OK == success); | 133 | GNUNET_assert (GNUNET_OK == success); |
134 | GNUNET_free_non_null (crc->data); | 134 | GNUNET_free (crc->data); |
135 | crc->data = NULL; | 135 | crc->data = NULL; |
136 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); | 136 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
137 | } | 137 | } |
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index c6443f102..1eaed8a5c 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c | |||
@@ -1258,7 +1258,7 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *mh) | |||
1258 | } | 1258 | } |
1259 | GNUNET_MQ_send (handle->mq, | 1259 | GNUNET_MQ_send (handle->mq, |
1260 | env); | 1260 | env); |
1261 | GNUNET_free_non_null (mh->key); | 1261 | GNUNET_free (mh->key); |
1262 | GNUNET_free (mh); | 1262 | GNUNET_free (mh); |
1263 | } | 1263 | } |
1264 | 1264 | ||
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 2dd49a1b6..da46dcfee 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -69,7 +69,7 @@ static void | |||
69 | process_hello (void *cls, | 69 | process_hello (void *cls, |
70 | const struct GNUNET_MessageHeader *message) | 70 | const struct GNUNET_MessageHeader *message) |
71 | { | 71 | { |
72 | GNUNET_free_non_null (GDS_my_hello); | 72 | GNUNET_free (GDS_my_hello); |
73 | GDS_my_hello = GNUNET_malloc (ntohs (message->size)); | 73 | GDS_my_hello = GNUNET_malloc (ntohs (message->size)); |
74 | GNUNET_memcpy (GDS_my_hello, | 74 | GNUNET_memcpy (GDS_my_hello, |
75 | message, | 75 | message, |
@@ -106,7 +106,7 @@ shutdown_task (void *cls) | |||
106 | GNUNET_YES); | 106 | GNUNET_YES); |
107 | GDS_stats = NULL; | 107 | GDS_stats = NULL; |
108 | } | 108 | } |
109 | GNUNET_free_non_null (GDS_my_hello); | 109 | GNUNET_free (GDS_my_hello); |
110 | GDS_my_hello = NULL; | 110 | GDS_my_hello = NULL; |
111 | GDS_CLIENTS_stop (); | 111 | GDS_CLIENTS_stop (); |
112 | } | 112 | } |
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index be6e22d01..1e44c1fad 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c | |||
@@ -333,7 +333,7 @@ client_disconnect_cb (void *cls, | |||
333 | struct ClientMonitorRecord *next; | 333 | struct ClientMonitorRecord *next; |
334 | 334 | ||
335 | next = monitor->next; | 335 | next = monitor->next; |
336 | GNUNET_free_non_null (monitor->key); | 336 | GNUNET_free (monitor->key); |
337 | GNUNET_CONTAINER_DLL_remove (monitor_head, | 337 | GNUNET_CONTAINER_DLL_remove (monitor_head, |
338 | monitor_tail, | 338 | monitor_tail, |
339 | monitor); | 339 | monitor); |
@@ -938,7 +938,7 @@ handle_dht_local_monitor_stop (void *cls, | |||
938 | GNUNET_CONTAINER_DLL_remove (monitor_head, | 938 | GNUNET_CONTAINER_DLL_remove (monitor_head, |
939 | monitor_tail, | 939 | monitor_tail, |
940 | r); | 940 | r); |
941 | GNUNET_free_non_null (r->key); | 941 | GNUNET_free (r->key); |
942 | GNUNET_free (r); | 942 | GNUNET_free (r); |
943 | return; /* Delete only ONE entry */ | 943 | return; /* Delete only ONE entry */ |
944 | } | 944 | } |
@@ -1281,7 +1281,7 @@ GDS_CLIENTS_process_get (uint32_t options, | |||
1281 | env); | 1281 | env); |
1282 | } | 1282 | } |
1283 | } | 1283 | } |
1284 | GNUNET_free_non_null (cl); | 1284 | GNUNET_free (cl); |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | 1287 | ||
@@ -1363,7 +1363,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type, | |||
1363 | env); | 1363 | env); |
1364 | } | 1364 | } |
1365 | } | 1365 | } |
1366 | GNUNET_free_non_null (cl); | 1366 | GNUNET_free (cl); |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | 1369 | ||
@@ -1445,7 +1445,7 @@ GDS_CLIENTS_process_put (uint32_t options, | |||
1445 | env); | 1445 | env); |
1446 | } | 1446 | } |
1447 | } | 1447 | } |
1448 | GNUNET_free_non_null (cl); | 1448 | GNUNET_free (cl); |
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | 1451 | ||
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c index a0141d1fb..906391334 100644 --- a/src/dht/gnunet-service-dht_hello.c +++ b/src/dht/gnunet-service-dht_hello.c | |||
@@ -86,7 +86,7 @@ process_hello (void *cls, | |||
86 | gettext_noop ("# HELLOs obtained from peerinfo"), 1, | 86 | gettext_noop ("# HELLOs obtained from peerinfo"), 1, |
87 | GNUNET_NO); | 87 | GNUNET_NO); |
88 | hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer); | 88 | hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer); |
89 | GNUNET_free_non_null (hm); | 89 | GNUNET_free (hm); |
90 | hm = GNUNET_malloc (GNUNET_HELLO_size (hello)); | 90 | hm = GNUNET_malloc (GNUNET_HELLO_size (hello)); |
91 | GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello)); | 91 | GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello)); |
92 | GNUNET_assert (GNUNET_SYSERR != | 92 | GNUNET_assert (GNUNET_SYSERR != |
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index fce69d3f6..b211fca6b 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -1436,7 +1436,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type, | |||
1436 | if (msize + sizeof(struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE) | 1436 | if (msize + sizeof(struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE) |
1437 | { | 1437 | { |
1438 | GNUNET_break (0); | 1438 | GNUNET_break (0); |
1439 | GNUNET_free_non_null (reply_bf); | 1439 | GNUNET_free (reply_bf); |
1440 | GNUNET_free (targets); | 1440 | GNUNET_free (targets); |
1441 | return GNUNET_NO; | 1441 | return GNUNET_NO; |
1442 | } | 1442 | } |
@@ -1493,7 +1493,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type, | |||
1493 | env); | 1493 | env); |
1494 | } | 1494 | } |
1495 | GNUNET_free (targets); | 1495 | GNUNET_free (targets); |
1496 | GNUNET_free_non_null (reply_bf); | 1496 | GNUNET_free (reply_bf); |
1497 | return (skip_count < target_count) ? GNUNET_OK : GNUNET_NO; | 1497 | return (skip_count < target_count) ? GNUNET_OK : GNUNET_NO; |
1498 | } | 1498 | } |
1499 | 1499 | ||
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c index 5a73880be..ba50c3d1a 100644 --- a/src/dht/gnunet_dht_profiler.c +++ b/src/dht/gnunet_dht_profiler.c | |||
@@ -323,7 +323,7 @@ do_shutdown (void *cls) | |||
323 | GNUNET_TESTBED_operation_done (bandwidth_stats_op); | 323 | GNUNET_TESTBED_operation_done (bandwidth_stats_op); |
324 | bandwidth_stats_op = NULL; | 324 | bandwidth_stats_op = NULL; |
325 | } | 325 | } |
326 | GNUNET_free_non_null (a_ac); | 326 | GNUNET_free (a_ac); |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index 17be841f5..45107304b 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am | |||
@@ -81,6 +81,11 @@ libgnunet_plugin_block_dns_la_SOURCES = \ | |||
81 | plugin_block_dns.c | 81 | plugin_block_dns.c |
82 | libgnunet_plugin_block_dns_la_LIBADD = \ | 82 | libgnunet_plugin_block_dns_la_LIBADD = \ |
83 | $(top_builddir)/src/block/libgnunetblockgroup.la \ | 83 | $(top_builddir)/src/block/libgnunetblockgroup.la \ |
84 | $(top_builddir)/src/block/libgnunetblock.la \ | ||
85 | $(top_builddir)/src/util/libgnunetutil.la | ||
86 | libgnunet_plugin_block_dns_la_DEPENDENCIES = \ | ||
87 | $(top_builddir)/src/block/libgnunetblockgroup.la \ | ||
88 | $(top_builddir)/src/block/libgnunetblock.la \ | ||
84 | $(top_builddir)/src/util/libgnunetutil.la | 89 | $(top_builddir)/src/util/libgnunetutil.la |
85 | libgnunet_plugin_block_dns_la_LDFLAGS = \ | 90 | libgnunet_plugin_block_dns_la_LDFLAGS = \ |
86 | $(GN_LIBINTL) \ | 91 | $(GN_LIBINTL) \ |
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index f6c0d0660..d9830baa4 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c | |||
@@ -233,7 +233,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record) | |||
233 | (unsigned int) (GNUNET_TIME_absolute_get_remaining ( | 233 | (unsigned int) (GNUNET_TIME_absolute_get_remaining ( |
234 | record->expiration_time).rel_value_us / 1000LL | 234 | record->expiration_time).rel_value_us / 1000LL |
235 | / 1000LL)); | 235 | / 1000LL)); |
236 | GNUNET_free_non_null (tmp); | 236 | GNUNET_free (tmp); |
237 | } | 237 | } |
238 | 238 | ||
239 | 239 | ||
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c index 606864c8a..835497dba 100644 --- a/src/dns/gnunet-dns-redirector.c +++ b/src/dns/gnunet-dns-redirector.c | |||
@@ -172,7 +172,7 @@ modify_request (void *cls, | |||
172 | "Injecting modified DNS response\n"); | 172 | "Injecting modified DNS response\n"); |
173 | GNUNET_DNS_request_answer (rh, len, buf); | 173 | GNUNET_DNS_request_answer (rh, len, buf); |
174 | } | 174 | } |
175 | GNUNET_free_non_null (buf); | 175 | GNUNET_free (buf); |
176 | } | 176 | } |
177 | 177 | ||
178 | 178 | ||
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c index 25fbcf430..1cb238add 100644 --- a/src/dns/gnunet-service-dns.c +++ b/src/dns/gnunet-service-dns.c | |||
@@ -257,7 +257,7 @@ static struct GNUNET_DNSSTUB_Context *dnsstub; | |||
257 | static void | 257 | static void |
258 | cleanup_rr (struct RequestRecord *rr) | 258 | cleanup_rr (struct RequestRecord *rr) |
259 | { | 259 | { |
260 | GNUNET_free_non_null (rr->payload); | 260 | GNUNET_free (rr->payload); |
261 | rr->payload = NULL; | 261 | rr->payload = NULL; |
262 | rr->payload_length = 0; | 262 | rr->payload_length = 0; |
263 | GNUNET_array_grow (rr->client_wait_list, | 263 | GNUNET_array_grow (rr->client_wait_list, |
@@ -280,7 +280,7 @@ cleanup_task (void *cls GNUNET_UNUSED) | |||
280 | hijacker = NULL; | 280 | hijacker = NULL; |
281 | } | 281 | } |
282 | for (unsigned int i = 0; i < 8; i++) | 282 | for (unsigned int i = 0; i < 8; i++) |
283 | GNUNET_free_non_null (helper_argv[i]); | 283 | GNUNET_free (helper_argv[i]); |
284 | for (unsigned int i = 0; i <= UINT16_MAX; i++) | 284 | for (unsigned int i = 0; i <= UINT16_MAX; i++) |
285 | cleanup_rr (&requests[i]); | 285 | cleanup_rr (&requests[i]); |
286 | if (NULL != stats) | 286 | if (NULL != stats) |
@@ -762,7 +762,7 @@ process_dns_result (void *cls, | |||
762 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 762 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
763 | "Got a response from the stub resolver for DNS request %llu intercepted locally!\n", | 763 | "Got a response from the stub resolver for DNS request %llu intercepted locally!\n", |
764 | (unsigned long long) rr->request_id); | 764 | (unsigned long long) rr->request_id); |
765 | GNUNET_free_non_null (rr->payload); | 765 | GNUNET_free (rr->payload); |
766 | rr->payload = GNUNET_malloc (r); | 766 | rr->payload = GNUNET_malloc (r); |
767 | GNUNET_memcpy (rr->payload, | 767 | GNUNET_memcpy (rr->payload, |
768 | dns, | 768 | dns, |
@@ -862,7 +862,7 @@ handle_client_response (void *cls, | |||
862 | next_phase (rr); | 862 | next_phase (rr); |
863 | return; | 863 | return; |
864 | } | 864 | } |
865 | GNUNET_free_non_null (rr->payload); | 865 | GNUNET_free (rr->payload); |
866 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 866 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
867 | "Changing DNS reply according to client specifications\n"); | 867 | "Changing DNS reply according to client specifications\n"); |
868 | rr->payload = GNUNET_malloc (msize); | 868 | rr->payload = GNUNET_malloc (msize); |
@@ -1005,7 +1005,7 @@ process_helper_messages (void *cls, | |||
1005 | rr = &requests[dns->id]; | 1005 | rr = &requests[dns->id]; |
1006 | 1006 | ||
1007 | /* clean up from previous request */ | 1007 | /* clean up from previous request */ |
1008 | GNUNET_free_non_null (rr->payload); | 1008 | GNUNET_free (rr->payload); |
1009 | rr->payload = NULL; | 1009 | rr->payload = NULL; |
1010 | GNUNET_array_grow (rr->client_wait_list, | 1010 | GNUNET_array_grow (rr->client_wait_list, |
1011 | rr->client_wait_list_length, | 1011 | rr->client_wait_list_length, |
@@ -1115,7 +1115,7 @@ run (void *cls, | |||
1115 | "dns", | 1115 | "dns", |
1116 | "DNS_EXIT", | 1116 | "DNS_EXIT", |
1117 | _ ("need a valid IPv4 or IPv6 address\n")); | 1117 | _ ("need a valid IPv4 or IPv6 address\n")); |
1118 | GNUNET_free_non_null (dns_exit); | 1118 | GNUNET_free (dns_exit); |
1119 | } | 1119 | } |
1120 | binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-dns"); | 1120 | binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-dns"); |
1121 | 1121 | ||
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index b193176c4..27eba018f 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -2471,7 +2471,7 @@ free_service_record (void *cls, | |||
2471 | key, | 2471 | key, |
2472 | service)); | 2472 | service)); |
2473 | GNUNET_CADET_close_port (service->port); | 2473 | GNUNET_CADET_close_port (service->port); |
2474 | GNUNET_free_non_null (service->name); | 2474 | GNUNET_free (service->name); |
2475 | GNUNET_free (service); | 2475 | GNUNET_free (service); |
2476 | return GNUNET_OK; | 2476 | return GNUNET_OK; |
2477 | } | 2477 | } |
@@ -2613,7 +2613,7 @@ store_service (int proto, | |||
2613 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) | 2613 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) |
2614 | { | 2614 | { |
2615 | GNUNET_CADET_close_port (service->port); | 2615 | GNUNET_CADET_close_port (service->port); |
2616 | GNUNET_free_non_null (service->name); | 2616 | GNUNET_free (service->name); |
2617 | GNUNET_free (service); | 2617 | GNUNET_free (service); |
2618 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2618 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
2619 | _ ("Got duplicate service records for `%s:%u'\n"), | 2619 | _ ("Got duplicate service records for `%s:%u'\n"), |
@@ -3340,7 +3340,7 @@ cleanup (void *cls) | |||
3340 | stats = NULL; | 3340 | stats = NULL; |
3341 | } | 3341 | } |
3342 | for (i = 0; i < 8; i++) | 3342 | for (i = 0; i < 8; i++) |
3343 | GNUNET_free_non_null (exit_argv[i]); | 3343 | GNUNET_free (exit_argv[i]); |
3344 | } | 3344 | } |
3345 | 3345 | ||
3346 | 3346 | ||
@@ -3706,7 +3706,7 @@ advertise_dns_exit () | |||
3706 | "dns", | 3706 | "dns", |
3707 | "DNS_RESOLVER", | 3707 | "DNS_RESOLVER", |
3708 | _ ("need a valid IPv4 or IPv6 address\n")); | 3708 | _ ("need a valid IPv4 or IPv6 address\n")); |
3709 | GNUNET_free_non_null (dns_exit); | 3709 | GNUNET_free (dns_exit); |
3710 | return; | 3710 | return; |
3711 | } | 3711 | } |
3712 | /* open port */ | 3712 | /* open port */ |
@@ -3807,7 +3807,7 @@ setup_exit_helper_args () | |||
3807 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 3807 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
3808 | "EXIT", | 3808 | "EXIT", |
3809 | "IPV6ADDR"); | 3809 | "IPV6ADDR"); |
3810 | GNUNET_free_non_null (ipv6addr); | 3810 | GNUNET_free (ipv6addr); |
3811 | return GNUNET_SYSERR; | 3811 | return GNUNET_SYSERR; |
3812 | } | 3812 | } |
3813 | exit_argv[3] = ipv6addr; | 3813 | exit_argv[3] = ipv6addr; |
@@ -3858,7 +3858,7 @@ setup_exit_helper_args () | |||
3858 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 3858 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
3859 | "EXIT", | 3859 | "EXIT", |
3860 | "IPV4ADDR"); | 3860 | "IPV4ADDR"); |
3861 | GNUNET_free_non_null (ipv4addr); | 3861 | GNUNET_free (ipv4addr); |
3862 | return GNUNET_SYSERR; | 3862 | return GNUNET_SYSERR; |
3863 | } | 3863 | } |
3864 | exit_argv[5] = ipv4addr; | 3864 | exit_argv[5] = ipv4addr; |
@@ -3875,7 +3875,7 @@ setup_exit_helper_args () | |||
3875 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 3875 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
3876 | "EXIT", | 3876 | "EXIT", |
3877 | "IPV4MASK"); | 3877 | "IPV4MASK"); |
3878 | GNUNET_free_non_null (ipv4mask); | 3878 | GNUNET_free (ipv4mask); |
3879 | return GNUNET_SYSERR; | 3879 | return GNUNET_SYSERR; |
3880 | } | 3880 | } |
3881 | exit_argv[6] = ipv4mask; | 3881 | exit_argv[6] = ipv4mask; |
@@ -4023,7 +4023,7 @@ run (void *cls, | |||
4023 | regex = NULL; | 4023 | regex = NULL; |
4024 | else | 4024 | else |
4025 | regex = GNUNET_TUN_ipv4policy2regex (policy); | 4025 | regex = GNUNET_TUN_ipv4policy2regex (policy); |
4026 | GNUNET_free_non_null (policy); | 4026 | GNUNET_free (policy); |
4027 | if (NULL != regex) | 4027 | if (NULL != regex) |
4028 | { | 4028 | { |
4029 | (void) GNUNET_asprintf (&prefixed_regex, | 4029 | (void) GNUNET_asprintf (&prefixed_regex, |
@@ -4063,7 +4063,7 @@ run (void *cls, | |||
4063 | regex = NULL; | 4063 | regex = NULL; |
4064 | else | 4064 | else |
4065 | regex = GNUNET_TUN_ipv6policy2regex (policy); | 4065 | regex = GNUNET_TUN_ipv6policy2regex (policy); |
4066 | GNUNET_free_non_null (policy); | 4066 | GNUNET_free (policy); |
4067 | if (NULL != regex) | 4067 | if (NULL != regex) |
4068 | { | 4068 | { |
4069 | (void) GNUNET_asprintf (&prefixed_regex, | 4069 | (void) GNUNET_asprintf (&prefixed_regex, |
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index b1555be60..25590c6f7 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am | |||
@@ -46,8 +46,13 @@ libgnunetfs_la_SOURCES = \ | |||
46 | 46 | ||
47 | libgnunetfs_la_LIBADD = \ | 47 | libgnunetfs_la_LIBADD = \ |
48 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | 48 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ |
49 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | ||
49 | $(top_builddir)/src/util/libgnunetutil.la \ | 50 | $(top_builddir)/src/util/libgnunetutil.la \ |
50 | $(GN_LIBINTL) $(XLIB) $(LIBGCRYPT_LIBS) -lunistring | 51 | $(GN_LIBINTL) $(XLIB) $(LIBGCRYPT_LIBS) -lunistring |
52 | libgnunetfs_la_DEPENDENCIES = \ | ||
53 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | ||
54 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | ||
55 | $(top_builddir)/src/util/libgnunetutil.la | ||
51 | 56 | ||
52 | if HAVE_LIBEXTRACTOR | 57 | if HAVE_LIBEXTRACTOR |
53 | libgnunetfs_la_LIBADD += \ | 58 | libgnunetfs_la_LIBADD += \ |
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 3d2ba3e99..920786146 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -570,7 +570,7 @@ GNUNET_FS_data_reader_copy_ (void *cls, | |||
570 | return 0; | 570 | return 0; |
571 | if (0 == max) | 571 | if (0 == max) |
572 | { | 572 | { |
573 | GNUNET_free_non_null (data); | 573 | GNUNET_free (data); |
574 | return 0; | 574 | return 0; |
575 | } | 575 | } |
576 | GNUNET_memcpy (buf, &data[offset], max); | 576 | GNUNET_memcpy (buf, &data[offset], max); |
@@ -1132,15 +1132,15 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, | |||
1132 | GNUNET_free (filename); | 1132 | GNUNET_free (filename); |
1133 | filename = NULL; | 1133 | filename = NULL; |
1134 | } | 1134 | } |
1135 | GNUNET_free_non_null (ksks); | 1135 | GNUNET_free (ksks); |
1136 | GNUNET_free_non_null (skss); | 1136 | GNUNET_free (skss); |
1137 | GNUNET_free_non_null (chks); | 1137 | GNUNET_free (chks); |
1138 | return ret; | 1138 | return ret; |
1139 | cleanup: | 1139 | cleanup: |
1140 | GNUNET_free_non_null (ksks); | 1140 | GNUNET_free (ksks); |
1141 | GNUNET_free_non_null (chks); | 1141 | GNUNET_free (chks); |
1142 | GNUNET_free_non_null (skss); | 1142 | GNUNET_free (skss); |
1143 | GNUNET_free_non_null (filename); | 1143 | GNUNET_free (filename); |
1144 | GNUNET_FS_file_information_destroy (ret, NULL, NULL); | 1144 | GNUNET_FS_file_information_destroy (ret, NULL, NULL); |
1145 | return NULL; | 1145 | return NULL; |
1146 | } | 1146 | } |
@@ -1417,11 +1417,11 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi) | |||
1417 | GNUNET_break (0); | 1417 | GNUNET_break (0); |
1418 | goto cleanup; | 1418 | goto cleanup; |
1419 | } | 1419 | } |
1420 | GNUNET_free_non_null (chks); | 1420 | GNUNET_free (chks); |
1421 | chks = NULL; | 1421 | chks = NULL; |
1422 | GNUNET_free_non_null (ksks); | 1422 | GNUNET_free (ksks); |
1423 | ksks = NULL; | 1423 | ksks = NULL; |
1424 | GNUNET_free_non_null (skss); | 1424 | GNUNET_free (skss); |
1425 | skss = NULL; | 1425 | skss = NULL; |
1426 | 1426 | ||
1427 | switch (b) | 1427 | switch (b) |
@@ -1527,9 +1527,9 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi) | |||
1527 | cleanup: | 1527 | cleanup: |
1528 | if (NULL != wh) | 1528 | if (NULL != wh) |
1529 | (void) GNUNET_BIO_write_close (wh, NULL); | 1529 | (void) GNUNET_BIO_write_close (wh, NULL); |
1530 | GNUNET_free_non_null (chks); | 1530 | GNUNET_free (chks); |
1531 | GNUNET_free_non_null (ksks); | 1531 | GNUNET_free (ksks); |
1532 | GNUNET_free_non_null (skss); | 1532 | GNUNET_free (skss); |
1533 | fn = get_serialization_file_name (fi->h, | 1533 | fn = get_serialization_file_name (fi->h, |
1534 | GNUNET_FS_SYNC_PATH_FILE_INFO, | 1534 | GNUNET_FS_SYNC_PATH_FILE_INFO, |
1535 | fi->serialization); | 1535 | fi->serialization); |
@@ -1729,10 +1729,10 @@ deserialize_publish_file (void *cls, const char *filename) | |||
1729 | pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc); | 1729 | pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc); |
1730 | return GNUNET_OK; | 1730 | return GNUNET_OK; |
1731 | cleanup: | 1731 | cleanup: |
1732 | GNUNET_free_non_null (pc->nid); | 1732 | GNUNET_free (pc->nid); |
1733 | GNUNET_free_non_null (pc->nuid); | 1733 | GNUNET_free (pc->nuid); |
1734 | GNUNET_free_non_null (fi_root); | 1734 | GNUNET_free (fi_root); |
1735 | GNUNET_free_non_null (fi_pos); | 1735 | GNUNET_free (fi_pos); |
1736 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) | 1736 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) |
1737 | { | 1737 | { |
1738 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1738 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -2131,7 +2131,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc) | |||
2131 | goto cleanup; | 2131 | goto cleanup; |
2132 | } | 2132 | } |
2133 | } | 2133 | } |
2134 | GNUNET_free_non_null (uris); | 2134 | GNUNET_free (uris); |
2135 | uris = NULL; | 2135 | uris = NULL; |
2136 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) | 2136 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) |
2137 | { | 2137 | { |
@@ -2144,7 +2144,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc) | |||
2144 | cleanup: | 2144 | cleanup: |
2145 | if (NULL != wh) | 2145 | if (NULL != wh) |
2146 | (void) GNUNET_BIO_write_close (wh, NULL); | 2146 | (void) GNUNET_BIO_write_close (wh, NULL); |
2147 | GNUNET_free_non_null (uris); | 2147 | GNUNET_free (uris); |
2148 | if (0 != unlink (fn)) | 2148 | if (0 != unlink (fn)) |
2149 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); | 2149 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); |
2150 | GNUNET_free (fn); | 2150 | GNUNET_free (fn); |
@@ -2235,10 +2235,10 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr) | |||
2235 | GNUNET_break (0); | 2235 | GNUNET_break (0); |
2236 | goto cleanup; | 2236 | goto cleanup; |
2237 | } | 2237 | } |
2238 | GNUNET_free_non_null (uris); | 2238 | GNUNET_free (uris); |
2239 | return; | 2239 | return; |
2240 | cleanup: | 2240 | cleanup: |
2241 | GNUNET_free_non_null (uris); | 2241 | GNUNET_free (uris); |
2242 | if (NULL != wh) | 2242 | if (NULL != wh) |
2243 | (void) GNUNET_BIO_write_close (wh, NULL); | 2243 | (void) GNUNET_BIO_write_close (wh, NULL); |
2244 | remove_sync_file_in_dir (sr->h, | 2244 | remove_sync_file_in_dir (sr->h, |
@@ -2309,7 +2309,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc) | |||
2309 | cleanup: | 2309 | cleanup: |
2310 | if (NULL != wh) | 2310 | if (NULL != wh) |
2311 | (void) GNUNET_BIO_write_close (wh, NULL); | 2311 | (void) GNUNET_BIO_write_close (wh, NULL); |
2312 | GNUNET_free_non_null (uris); | 2312 | GNUNET_free (uris); |
2313 | GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization); | 2313 | GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization); |
2314 | GNUNET_free (sc->serialization); | 2314 | GNUNET_free (sc->serialization); |
2315 | sc->serialization = NULL; | 2315 | sc->serialization = NULL; |
@@ -2359,7 +2359,7 @@ deserialize_unindex_file (void *cls, const char *filename) | |||
2359 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset", | 2359 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset", |
2360 | (int32_t *) &uc->ksk_offset))) | 2360 | (int32_t *) &uc->ksk_offset))) |
2361 | { | 2361 | { |
2362 | GNUNET_free_non_null (uris); | 2362 | GNUNET_free (uris); |
2363 | GNUNET_break (0); | 2363 | GNUNET_break (0); |
2364 | goto cleanup; | 2364 | goto cleanup; |
2365 | } | 2365 | } |
@@ -2370,7 +2370,7 @@ deserialize_unindex_file (void *cls, const char *filename) | |||
2370 | if (NULL == uc->ksk_uri) | 2370 | if (NULL == uc->ksk_uri) |
2371 | { | 2371 | { |
2372 | GNUNET_break (0); | 2372 | GNUNET_break (0); |
2373 | GNUNET_free_non_null (emsg); | 2373 | GNUNET_free (emsg); |
2374 | goto cleanup; | 2374 | goto cleanup; |
2375 | } | 2375 | } |
2376 | } | 2376 | } |
@@ -2472,7 +2472,7 @@ deserialize_unindex_file (void *cls, const char *filename) | |||
2472 | } | 2472 | } |
2473 | return GNUNET_OK; | 2473 | return GNUNET_OK; |
2474 | cleanup: | 2474 | cleanup: |
2475 | GNUNET_free_non_null (uc->filename); | 2475 | GNUNET_free (uc->filename); |
2476 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) | 2476 | if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) |
2477 | { | 2477 | { |
2478 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2478 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -2485,7 +2485,7 @@ cleanup: | |||
2485 | GNUNET_FS_remove_sync_file_ (h, | 2485 | GNUNET_FS_remove_sync_file_ (h, |
2486 | GNUNET_FS_SYNC_PATH_MASTER_UNINDEX, | 2486 | GNUNET_FS_SYNC_PATH_MASTER_UNINDEX, |
2487 | uc->serialization); | 2487 | uc->serialization); |
2488 | GNUNET_free_non_null (uc->serialization); | 2488 | GNUNET_free (uc->serialization); |
2489 | GNUNET_free (uc); | 2489 | GNUNET_free (uc); |
2490 | return GNUNET_OK; | 2490 | return GNUNET_OK; |
2491 | } | 2491 | } |
@@ -2665,10 +2665,10 @@ deserialize_search_result (void *cls, const char *filename) | |||
2665 | } | 2665 | } |
2666 | return GNUNET_OK; | 2666 | return GNUNET_OK; |
2667 | cleanup: | 2667 | cleanup: |
2668 | GNUNET_free_non_null (download); | 2668 | GNUNET_free (download); |
2669 | GNUNET_free_non_null (emsg); | 2669 | GNUNET_free (emsg); |
2670 | GNUNET_free_non_null (uris); | 2670 | GNUNET_free (uris); |
2671 | GNUNET_free_non_null (update_srch); | 2671 | GNUNET_free (update_srch); |
2672 | if (NULL != sr->uri) | 2672 | if (NULL != sr->uri) |
2673 | GNUNET_FS_uri_destroy (sr->uri); | 2673 | GNUNET_FS_uri_destroy (sr->uri); |
2674 | if (NULL != sr->meta) | 2674 | if (NULL != sr->meta) |
@@ -2823,8 +2823,8 @@ free_search_context (struct GNUNET_FS_SearchContext *sc) | |||
2823 | : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, | 2823 | : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, |
2824 | sc->serialization); | 2824 | sc->serialization); |
2825 | } | 2825 | } |
2826 | GNUNET_free_non_null (sc->serialization); | 2826 | GNUNET_free (sc->serialization); |
2827 | GNUNET_free_non_null (sc->emsg); | 2827 | GNUNET_free (sc->emsg); |
2828 | if (NULL != sc->uri) | 2828 | if (NULL != sc->uri) |
2829 | GNUNET_FS_uri_destroy (sc->uri); | 2829 | GNUNET_FS_uri_destroy (sc->uri); |
2830 | if (NULL != sc->master_result_map) | 2830 | if (NULL != sc->master_result_map) |
@@ -2896,10 +2896,10 @@ free_download_context (struct GNUNET_FS_DownloadContext *dc) | |||
2896 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); | 2896 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); |
2897 | if (NULL != dc->uri) | 2897 | if (NULL != dc->uri) |
2898 | GNUNET_FS_uri_destroy (dc->uri); | 2898 | GNUNET_FS_uri_destroy (dc->uri); |
2899 | GNUNET_free_non_null (dc->temp_filename); | 2899 | GNUNET_free (dc->temp_filename); |
2900 | GNUNET_free_non_null (dc->emsg); | 2900 | GNUNET_free (dc->emsg); |
2901 | GNUNET_free_non_null (dc->filename); | 2901 | GNUNET_free (dc->filename); |
2902 | GNUNET_free_non_null (dc->serialization); | 2902 | GNUNET_free (dc->serialization); |
2903 | while (NULL != (dcc = dc->child_head)) | 2903 | while (NULL != (dcc = dc->child_head)) |
2904 | { | 2904 | { |
2905 | GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc); | 2905 | GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc); |
@@ -3020,8 +3020,8 @@ deserialize_download (struct GNUNET_FS_Handle *h, | |||
3020 | dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc); | 3020 | dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc); |
3021 | return; | 3021 | return; |
3022 | cleanup: | 3022 | cleanup: |
3023 | GNUNET_free_non_null (uris); | 3023 | GNUNET_free (uris); |
3024 | GNUNET_free_non_null (emsg); | 3024 | GNUNET_free (emsg); |
3025 | free_download_context (dc); | 3025 | free_download_context (dc); |
3026 | } | 3026 | } |
3027 | 3027 | ||
@@ -3127,9 +3127,9 @@ deserialize_search (struct GNUNET_FS_Handle *h, | |||
3127 | GNUNET_free (uris); | 3127 | GNUNET_free (uris); |
3128 | return sc; | 3128 | return sc; |
3129 | cleanup: | 3129 | cleanup: |
3130 | GNUNET_free_non_null (emsg); | 3130 | GNUNET_free (emsg); |
3131 | free_search_context (sc); | 3131 | free_search_context (sc); |
3132 | GNUNET_free_non_null (uris); | 3132 | GNUNET_free (uris); |
3133 | return NULL; | 3133 | return NULL; |
3134 | } | 3134 | } |
3135 | 3135 | ||
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c index 1ef5fa3bb..9a198d8d7 100644 --- a/src/fs/fs_directory.c +++ b/src/fs/fs_directory.c | |||
@@ -309,8 +309,8 @@ GNUNET_FS_directory_list_contents (size_t size, | |||
309 | full_data.size, | 309 | full_data.size, |
310 | full_data.data); | 310 | full_data.data); |
311 | } | 311 | } |
312 | GNUNET_free_non_null (full_data.data); | 312 | GNUNET_free (full_data.data); |
313 | GNUNET_free_non_null (filename); | 313 | GNUNET_free (filename); |
314 | GNUNET_CONTAINER_meta_data_destroy (md); | 314 | GNUNET_CONTAINER_meta_data_destroy (md); |
315 | GNUNET_FS_uri_destroy (uri); | 315 | GNUNET_FS_uri_destroy (uri); |
316 | } | 316 | } |
@@ -630,9 +630,9 @@ GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld, | |||
630 | "malloc"); | 630 | "malloc"); |
631 | *rsize = 0; | 631 | *rsize = 0; |
632 | *rdata = NULL; | 632 | *rdata = NULL; |
633 | GNUNET_free_non_null (sizes); | 633 | GNUNET_free (sizes); |
634 | GNUNET_free_non_null (perm); | 634 | GNUNET_free (perm); |
635 | GNUNET_free_non_null (bes); | 635 | GNUNET_free (bes); |
636 | return GNUNET_SYSERR; | 636 | return GNUNET_SYSERR; |
637 | } | 637 | } |
638 | *rdata = data; | 638 | *rdata = data; |
@@ -662,9 +662,9 @@ GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld, | |||
662 | GNUNET_memcpy (&data[off - sizes[i]], &(bes[i])[1], sizes[i]); | 662 | GNUNET_memcpy (&data[off - sizes[i]], &(bes[i])[1], sizes[i]); |
663 | GNUNET_free (bes[i]); | 663 | GNUNET_free (bes[i]); |
664 | } | 664 | } |
665 | GNUNET_free_non_null (sizes); | 665 | GNUNET_free (sizes); |
666 | GNUNET_free_non_null (perm); | 666 | GNUNET_free (perm); |
667 | GNUNET_free_non_null (bes); | 667 | GNUNET_free (bes); |
668 | GNUNET_assert (off == size); | 668 | GNUNET_assert (off == size); |
669 | GNUNET_CONTAINER_meta_data_destroy (bld->meta); | 669 | GNUNET_CONTAINER_meta_data_destroy (bld->meta); |
670 | GNUNET_free (bld); | 670 | GNUNET_free (bld); |
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c index 11efa053b..cb50182f9 100644 --- a/src/fs/fs_dirmetascan.c +++ b/src/fs/fs_dirmetascan.c | |||
@@ -106,7 +106,7 @@ GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds) | |||
106 | GNUNET_FS_share_tree_free (ds->toplevel); | 106 | GNUNET_FS_share_tree_free (ds->toplevel); |
107 | if (NULL != ds->stop_task) | 107 | if (NULL != ds->stop_task) |
108 | GNUNET_SCHEDULER_cancel (ds->stop_task); | 108 | GNUNET_SCHEDULER_cancel (ds->stop_task); |
109 | GNUNET_free_non_null (ds->ex_arg); | 109 | GNUNET_free (ds->ex_arg); |
110 | GNUNET_free (ds->filename_expanded); | 110 | GNUNET_free (ds->filename_expanded); |
111 | GNUNET_free (ds); | 111 | GNUNET_free (ds); |
112 | } | 112 | } |
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 4d03b6546..6154e8be0 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -960,7 +960,7 @@ trigger_recursive_download (void *cls, | |||
960 | "Failed to create directory for recursive download of `%s'\n"), | 960 | "Failed to create directory for recursive download of `%s'\n"), |
961 | full_name); | 961 | full_name); |
962 | GNUNET_free (full_name); | 962 | GNUNET_free (full_name); |
963 | GNUNET_free_non_null (fn); | 963 | GNUNET_free (fn); |
964 | return; | 964 | return; |
965 | } | 965 | } |
966 | 966 | ||
@@ -981,9 +981,9 @@ trigger_recursive_download (void *cls, | |||
981 | dc->options, | 981 | dc->options, |
982 | NULL, | 982 | NULL, |
983 | dc); | 983 | dc); |
984 | GNUNET_free_non_null (full_name); | 984 | GNUNET_free (full_name); |
985 | GNUNET_free_non_null (temp_name); | 985 | GNUNET_free (temp_name); |
986 | GNUNET_free_non_null (fn); | 986 | GNUNET_free (fn); |
987 | } | 987 | } |
988 | 988 | ||
989 | 989 | ||
@@ -999,7 +999,7 @@ GNUNET_FS_free_download_request_ (struct DownloadRequest *dr) | |||
999 | return; | 999 | return; |
1000 | for (unsigned int i = 0; i < dr->num_children; i++) | 1000 | for (unsigned int i = 0; i < dr->num_children; i++) |
1001 | GNUNET_FS_free_download_request_ (dr->children[i]); | 1001 | GNUNET_FS_free_download_request_ (dr->children[i]); |
1002 | GNUNET_free_non_null (dr->children); | 1002 | GNUNET_free (dr->children); |
1003 | GNUNET_free (dr); | 1003 | GNUNET_free (dr); |
1004 | } | 1004 | } |
1005 | 1005 | ||
@@ -2011,11 +2011,11 @@ GNUNET_FS_download_signal_suspend_ (void *cls) | |||
2011 | GNUNET_CONTAINER_multihashmap_destroy (dc->active); | 2011 | GNUNET_CONTAINER_multihashmap_destroy (dc->active); |
2012 | dc->active = NULL; | 2012 | dc->active = NULL; |
2013 | } | 2013 | } |
2014 | GNUNET_free_non_null (dc->filename); | 2014 | GNUNET_free (dc->filename); |
2015 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); | 2015 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); |
2016 | GNUNET_FS_uri_destroy (dc->uri); | 2016 | GNUNET_FS_uri_destroy (dc->uri); |
2017 | GNUNET_free_non_null (dc->temp_filename); | 2017 | GNUNET_free (dc->temp_filename); |
2018 | GNUNET_free_non_null (dc->serialization); | 2018 | GNUNET_free (dc->serialization); |
2019 | GNUNET_assert (NULL == dc->job_queue); | 2019 | GNUNET_assert (NULL == dc->job_queue); |
2020 | GNUNET_free (dc); | 2020 | GNUNET_free (dc); |
2021 | } | 2021 | } |
@@ -2409,7 +2409,7 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete) | |||
2409 | dc->temp_filename); | 2409 | dc->temp_filename); |
2410 | GNUNET_free (dc->temp_filename); | 2410 | GNUNET_free (dc->temp_filename); |
2411 | } | 2411 | } |
2412 | GNUNET_free_non_null (dc->serialization); | 2412 | GNUNET_free (dc->serialization); |
2413 | GNUNET_assert (NULL == dc->job_queue); | 2413 | GNUNET_assert (NULL == dc->job_queue); |
2414 | GNUNET_free (dc); | 2414 | GNUNET_free (dc); |
2415 | } | 2415 | } |
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index 28bbf12dd..3324abd58 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c | |||
@@ -75,7 +75,7 @@ void | |||
75 | GNUNET_FS_file_information_set_filename (struct GNUNET_FS_FileInformation *s, | 75 | GNUNET_FS_file_information_set_filename (struct GNUNET_FS_FileInformation *s, |
76 | const char *filename) | 76 | const char *filename) |
77 | { | 77 | { |
78 | GNUNET_free_non_null (s->filename); | 78 | GNUNET_free (s->filename); |
79 | if (filename) | 79 | if (filename) |
80 | s->filename = GNUNET_strdup (filename); | 80 | s->filename = GNUNET_strdup (filename); |
81 | else | 81 | else |
@@ -426,7 +426,7 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi, | |||
426 | &fi->bo, | 426 | &fi->bo, |
427 | &no, | 427 | &no, |
428 | &fi->client_info); | 428 | &fi->client_info); |
429 | GNUNET_free_non_null (fi->data.dir.dir_data); | 429 | GNUNET_free (fi->data.dir.dir_data); |
430 | } | 430 | } |
431 | else | 431 | else |
432 | { | 432 | { |
@@ -447,8 +447,8 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi, | |||
447 | &fi->data.file.do_index, | 447 | &fi->data.file.do_index, |
448 | &fi->client_info); | 448 | &fi->client_info); |
449 | } | 449 | } |
450 | GNUNET_free_non_null (fi->filename); | 450 | GNUNET_free (fi->filename); |
451 | GNUNET_free_non_null (fi->emsg); | 451 | GNUNET_free (fi->emsg); |
452 | if (NULL != fi->sks_uri) | 452 | if (NULL != fi->sks_uri) |
453 | GNUNET_FS_uri_destroy (fi->sks_uri); | 453 | GNUNET_FS_uri_destroy (fi->sks_uri); |
454 | if (NULL != fi->chk_uri) | 454 | if (NULL != fi->chk_uri) |
@@ -462,7 +462,7 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi, | |||
462 | GNUNET_FS_uri_destroy (fi->keywords); | 462 | GNUNET_FS_uri_destroy (fi->keywords); |
463 | if (NULL != fi->meta) | 463 | if (NULL != fi->meta) |
464 | GNUNET_CONTAINER_meta_data_destroy (fi->meta); | 464 | GNUNET_CONTAINER_meta_data_destroy (fi->meta); |
465 | GNUNET_free_non_null (fi->serialization); | 465 | GNUNET_free (fi->serialization); |
466 | if (NULL != fi->te) | 466 | if (NULL != fi->te) |
467 | { | 467 | { |
468 | GNUNET_FS_tree_encoder_finish (fi->te, NULL); | 468 | GNUNET_FS_tree_encoder_finish (fi->te, NULL); |
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index f098032d7..155486be5 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -214,13 +214,13 @@ write_update_information_graph (struct GNUNET_FS_UpdateInformationGraph *uig) | |||
214 | n = uig->update_nodes[i]; | 214 | n = uig->update_nodes[i]; |
215 | uris = GNUNET_FS_uri_to_string (n->uri); | 215 | uris = GNUNET_FS_uri_to_string (n->uri); |
216 | struct GNUNET_BIO_WriteSpec ws[] = { | 216 | struct GNUNET_BIO_WriteSpec ws[] = { |
217 | GNUNET_BIO_write_spec_string("fs-namespace-node-id", n->id), | 217 | GNUNET_BIO_write_spec_string ("fs-namespace-node-id", n->id), |
218 | GNUNET_BIO_write_spec_meta_data("fs-namespace-node-meta", n->md), | 218 | GNUNET_BIO_write_spec_meta_data ("fs-namespace-node-meta", n->md), |
219 | GNUNET_BIO_write_spec_string("fs-namespace-node-update", n->update), | 219 | GNUNET_BIO_write_spec_string ("fs-namespace-node-update", n->update), |
220 | GNUNET_BIO_write_spec_string("fs-namespace-uris", uris), | 220 | GNUNET_BIO_write_spec_string ("fs-namespace-uris", uris), |
221 | GNUNET_BIO_write_spec_end(), | 221 | GNUNET_BIO_write_spec_end (), |
222 | }; | 222 | }; |
223 | if (GNUNET_OK != GNUNET_BIO_write_spec_commit(wh, ws)) | 223 | if (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)) |
224 | { | 224 | { |
225 | GNUNET_free (uris); | 225 | GNUNET_free (uris); |
226 | break; | 226 | break; |
@@ -292,17 +292,17 @@ read_update_information_graph (struct GNUNET_FS_Handle *h, | |||
292 | { | 292 | { |
293 | n = GNUNET_new (struct NamespaceUpdateNode); | 293 | n = GNUNET_new (struct NamespaceUpdateNode); |
294 | struct GNUNET_BIO_ReadSpec rs[] = { | 294 | struct GNUNET_BIO_ReadSpec rs[] = { |
295 | GNUNET_BIO_read_spec_string("identifier", &n->id, 1024), | 295 | GNUNET_BIO_read_spec_string ("identifier", &n->id, 1024), |
296 | GNUNET_BIO_read_spec_meta_data("meta", &n->md), | 296 | GNUNET_BIO_read_spec_meta_data ("meta", &n->md), |
297 | GNUNET_BIO_read_spec_string("update-id", &n->update, 1024), | 297 | GNUNET_BIO_read_spec_string ("update-id", &n->update, 1024), |
298 | GNUNET_BIO_read_spec_string("uri", &uris, 1024 * 2), | 298 | GNUNET_BIO_read_spec_string ("uri", &uris, 1024 * 2), |
299 | GNUNET_BIO_read_spec_end(), | 299 | GNUNET_BIO_read_spec_end (), |
300 | }; | 300 | }; |
301 | if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) | 301 | if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) |
302 | { | 302 | { |
303 | GNUNET_break (0); | 303 | GNUNET_break (0); |
304 | GNUNET_free_non_null (n->id); | 304 | GNUNET_free (n->id); |
305 | GNUNET_free_non_null (n->update); | 305 | GNUNET_free (n->update); |
306 | if (n->md != NULL) | 306 | if (n->md != NULL) |
307 | GNUNET_CONTAINER_meta_data_destroy (n->md); | 307 | GNUNET_CONTAINER_meta_data_destroy (n->md); |
308 | GNUNET_free (n); | 308 | GNUNET_free (n); |
@@ -315,7 +315,7 @@ read_update_information_graph (struct GNUNET_FS_Handle *h, | |||
315 | GNUNET_break (0); | 315 | GNUNET_break (0); |
316 | GNUNET_free (emsg); | 316 | GNUNET_free (emsg); |
317 | GNUNET_free (n->id); | 317 | GNUNET_free (n->id); |
318 | GNUNET_free_non_null (n->update); | 318 | GNUNET_free (n->update); |
319 | GNUNET_CONTAINER_meta_data_destroy (n->md); | 319 | GNUNET_CONTAINER_meta_data_destroy (n->md); |
320 | GNUNET_free (n); | 320 | GNUNET_free (n); |
321 | break; | 321 | break; |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 8bb57b1e2..fddc65d67 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -85,9 +85,9 @@ publish_cleanup (struct GNUNET_FS_PublishContext *pc) | |||
85 | pc->fhc = NULL; | 85 | pc->fhc = NULL; |
86 | } | 86 | } |
87 | GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); | 87 | GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); |
88 | GNUNET_free_non_null (pc->nid); | 88 | GNUNET_free (pc->nid); |
89 | GNUNET_free_non_null (pc->nuid); | 89 | GNUNET_free (pc->nuid); |
90 | GNUNET_free_non_null (pc->serialization); | 90 | GNUNET_free (pc->serialization); |
91 | if (NULL != pc->dsh) | 91 | if (NULL != pc->dsh) |
92 | { | 92 | { |
93 | GNUNET_DATASTORE_disconnect (pc->dsh, GNUNET_NO); | 93 | GNUNET_DATASTORE_disconnect (pc->dsh, GNUNET_NO); |
@@ -650,7 +650,7 @@ publish_content (struct GNUNET_FS_PublishContext *pc) | |||
650 | dirpos->data.file.file_size, raw_data, | 650 | dirpos->data.file.file_size, raw_data, |
651 | &emsg)) | 651 | &emsg)) |
652 | { | 652 | { |
653 | GNUNET_free_non_null (emsg); | 653 | GNUNET_free (emsg); |
654 | GNUNET_free (raw_data); | 654 | GNUNET_free (raw_data); |
655 | raw_data = NULL; | 655 | raw_data = NULL; |
656 | } | 656 | } |
@@ -660,10 +660,10 @@ publish_content (struct GNUNET_FS_PublishContext *pc) | |||
660 | } | 660 | } |
661 | GNUNET_FS_directory_builder_add (db, dirpos->chk_uri, dirpos->meta, | 661 | GNUNET_FS_directory_builder_add (db, dirpos->chk_uri, dirpos->meta, |
662 | raw_data); | 662 | raw_data); |
663 | GNUNET_free_non_null (raw_data); | 663 | GNUNET_free (raw_data); |
664 | dirpos = dirpos->next; | 664 | dirpos = dirpos->next; |
665 | } | 665 | } |
666 | GNUNET_free_non_null (p->data.dir.dir_data); | 666 | GNUNET_free (p->data.dir.dir_data); |
667 | p->data.dir.dir_data = NULL; | 667 | p->data.dir.dir_data = NULL; |
668 | p->data.dir.dir_size = 0; | 668 | p->data.dir.dir_size = 0; |
669 | GNUNET_FS_directory_builder_finish (db, &p->data.dir.dir_size, | 669 | GNUNET_FS_directory_builder_finish (db, &p->data.dir.dir_size, |
@@ -1281,7 +1281,7 @@ suspend_operation (struct GNUNET_FS_FileInformation *fi, | |||
1281 | } | 1281 | } |
1282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1283 | "Suspending publish operation\n"); | 1283 | "Suspending publish operation\n"); |
1284 | GNUNET_free_non_null (fi->serialization); | 1284 | GNUNET_free (fi->serialization); |
1285 | fi->serialization = NULL; | 1285 | fi->serialization = NULL; |
1286 | off = (NULL == fi->chk_uri) ? 0 : (GNUNET_YES == fi->is_directory) ? | 1286 | off = (NULL == fi->chk_uri) ? 0 : (GNUNET_YES == fi->is_directory) ? |
1287 | fi->data.dir.dir_size : fi->data.file.file_size; | 1287 | fi->data.dir.dir_size : fi->data.file.file_size; |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 8e2d7deba..3dbee43ef 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -830,7 +830,7 @@ process_kblock (struct GNUNET_FS_SearchContext *sc, | |||
830 | &pt[1], | 830 | &pt[1], |
831 | emsg); | 831 | emsg); |
832 | } | 832 | } |
833 | GNUNET_free_non_null (emsg); | 833 | GNUNET_free (emsg); |
834 | return; | 834 | return; |
835 | } | 835 | } |
836 | j = eos - pt + 1; | 836 | j = eos - pt + 1; |
@@ -900,7 +900,7 @@ process_sblock (struct GNUNET_FS_SearchContext *sc, | |||
900 | _ ("Failed to parse URI `%s': %s\n"), | 900 | _ ("Failed to parse URI `%s': %s\n"), |
901 | uris, emsg); | 901 | uris, emsg); |
902 | GNUNET_break_op (0); /* ublock malformed */ | 902 | GNUNET_break_op (0); /* ublock malformed */ |
903 | GNUNET_free_non_null (emsg); | 903 | GNUNET_free (emsg); |
904 | GNUNET_CONTAINER_meta_data_destroy (meta); | 904 | GNUNET_CONTAINER_meta_data_destroy (meta); |
905 | return; | 905 | return; |
906 | } | 906 | } |
@@ -1548,10 +1548,10 @@ search_result_suspend (void *cls, | |||
1548 | sr->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); | 1548 | sr->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); |
1549 | } | 1549 | } |
1550 | GNUNET_break (NULL == sr->client_info); | 1550 | GNUNET_break (NULL == sr->client_info); |
1551 | GNUNET_free_non_null (sr->serialization); | 1551 | GNUNET_free (sr->serialization); |
1552 | GNUNET_FS_uri_destroy (sr->uri); | 1552 | GNUNET_FS_uri_destroy (sr->uri); |
1553 | GNUNET_CONTAINER_meta_data_destroy (sr->meta); | 1553 | GNUNET_CONTAINER_meta_data_destroy (sr->meta); |
1554 | GNUNET_free_non_null (sr->keyword_bitmap); | 1554 | GNUNET_free (sr->keyword_bitmap); |
1555 | GNUNET_free (sr); | 1555 | GNUNET_free (sr); |
1556 | return GNUNET_OK; | 1556 | return GNUNET_OK; |
1557 | } | 1557 | } |
@@ -1596,10 +1596,10 @@ GNUNET_FS_search_signal_suspend_ (void *cls) | |||
1596 | GNUNET_free (sc->requests[i].keyword); | 1596 | GNUNET_free (sc->requests[i].keyword); |
1597 | } | 1597 | } |
1598 | } | 1598 | } |
1599 | GNUNET_free_non_null (sc->requests); | 1599 | GNUNET_free (sc->requests); |
1600 | GNUNET_free_non_null (sc->emsg); | 1600 | GNUNET_free (sc->emsg); |
1601 | GNUNET_FS_uri_destroy (sc->uri); | 1601 | GNUNET_FS_uri_destroy (sc->uri); |
1602 | GNUNET_free_non_null (sc->serialization); | 1602 | GNUNET_free (sc->serialization); |
1603 | GNUNET_free (sc); | 1603 | GNUNET_free (sc); |
1604 | } | 1604 | } |
1605 | 1605 | ||
@@ -1760,10 +1760,10 @@ search_result_free (void *cls, | |||
1760 | GNUNET_break (NULL == sr->probe_ctx); | 1760 | GNUNET_break (NULL == sr->probe_ctx); |
1761 | GNUNET_break (NULL == sr->probe_cancel_task); | 1761 | GNUNET_break (NULL == sr->probe_cancel_task); |
1762 | GNUNET_break (NULL == sr->client_info); | 1762 | GNUNET_break (NULL == sr->client_info); |
1763 | GNUNET_free_non_null (sr->serialization); | 1763 | GNUNET_free (sr->serialization); |
1764 | GNUNET_FS_uri_destroy (sr->uri); | 1764 | GNUNET_FS_uri_destroy (sr->uri); |
1765 | GNUNET_CONTAINER_meta_data_destroy (sr->meta); | 1765 | GNUNET_CONTAINER_meta_data_destroy (sr->meta); |
1766 | GNUNET_free_non_null (sr->keyword_bitmap); | 1766 | GNUNET_free (sr->keyword_bitmap); |
1767 | GNUNET_free (sr); | 1767 | GNUNET_free (sr); |
1768 | return GNUNET_OK; | 1768 | return GNUNET_OK; |
1769 | } | 1769 | } |
@@ -1825,8 +1825,8 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc) | |||
1825 | for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) | 1825 | for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) |
1826 | GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results); | 1826 | GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results); |
1827 | } | 1827 | } |
1828 | GNUNET_free_non_null (sc->requests); | 1828 | GNUNET_free (sc->requests); |
1829 | GNUNET_free_non_null (sc->emsg); | 1829 | GNUNET_free (sc->emsg); |
1830 | GNUNET_FS_uri_destroy (sc->uri); | 1830 | GNUNET_FS_uri_destroy (sc->uri); |
1831 | GNUNET_free (sc); | 1831 | GNUNET_free (sc); |
1832 | } | 1832 | } |
diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c index e291938b5..ac850076d 100644 --- a/src/fs/fs_sharetree.c +++ b/src/fs/fs_sharetree.c | |||
@@ -447,8 +447,8 @@ GNUNET_FS_share_tree_free (struct GNUNET_FS_ShareTreeItem *toplevel) | |||
447 | GNUNET_CONTAINER_meta_data_destroy (toplevel->meta); | 447 | GNUNET_CONTAINER_meta_data_destroy (toplevel->meta); |
448 | if (NULL != toplevel->ksk_uri) | 448 | if (NULL != toplevel->ksk_uri) |
449 | GNUNET_FS_uri_destroy (toplevel->ksk_uri); | 449 | GNUNET_FS_uri_destroy (toplevel->ksk_uri); |
450 | GNUNET_free_non_null (toplevel->filename); | 450 | GNUNET_free (toplevel->filename); |
451 | GNUNET_free_non_null (toplevel->short_filename); | 451 | GNUNET_free (toplevel->short_filename); |
452 | GNUNET_free (toplevel); | 452 | GNUNET_free (toplevel); |
453 | } | 453 | } |
454 | 454 | ||
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index a0fe336df..dc4b214d9 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c | |||
@@ -195,7 +195,7 @@ report_uri (void *cls) | |||
195 | if ((GNUNET_YES != po->do_index) && | 195 | if ((GNUNET_YES != po->do_index) && |
196 | (NULL != po->publish_tmp_file)) | 196 | (NULL != po->publish_tmp_file)) |
197 | (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); | 197 | (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); |
198 | GNUNET_free_non_null (po->publish_tmp_file); | 198 | GNUNET_free (po->publish_tmp_file); |
199 | GNUNET_free (po); | 199 | GNUNET_free (po); |
200 | } | 200 | } |
201 | 201 | ||
@@ -217,7 +217,7 @@ publish_timeout (void *cls) | |||
217 | GNUNET_FS_publish_stop (po->publish_context); | 217 | GNUNET_FS_publish_stop (po->publish_context); |
218 | po->publish_cont (po->publish_cont_cls, NULL, NULL); | 218 | po->publish_cont (po->publish_cont_cls, NULL, NULL); |
219 | (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); | 219 | (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); |
220 | GNUNET_free_non_null (po->publish_tmp_file); | 220 | GNUNET_free (po->publish_tmp_file); |
221 | GNUNET_free (po); | 221 | GNUNET_free (po); |
222 | } | 222 | } |
223 | 223 | ||
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index e7f922823..6203690d2 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -454,7 +454,7 @@ GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te, | |||
454 | if (emsg != NULL) | 454 | if (emsg != NULL) |
455 | *emsg = te->emsg; | 455 | *emsg = te->emsg; |
456 | else | 456 | else |
457 | GNUNET_free_non_null (te->emsg); | 457 | GNUNET_free (te->emsg); |
458 | GNUNET_free (te->chk_tree); | 458 | GNUNET_free (te->chk_tree); |
459 | GNUNET_free (te); | 459 | GNUNET_free (te); |
460 | } | 460 | } |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index f2315d7d0..8c27af9de 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -415,7 +415,7 @@ GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc) | |||
415 | GNUNET_NO, ex, | 415 | GNUNET_NO, ex, |
416 | &unindex_directory_scan_cb, | 416 | &unindex_directory_scan_cb, |
417 | uc); | 417 | uc); |
418 | GNUNET_free_non_null (ex); | 418 | GNUNET_free (ex); |
419 | } | 419 | } |
420 | 420 | ||
421 | 421 | ||
@@ -777,8 +777,8 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls) | |||
777 | UNINDEX_STATE_COMPLETE) ? uc->file_size : 0); | 777 | UNINDEX_STATE_COMPLETE) ? uc->file_size : 0); |
778 | GNUNET_break (NULL == uc->client_info); | 778 | GNUNET_break (NULL == uc->client_info); |
779 | GNUNET_free (uc->filename); | 779 | GNUNET_free (uc->filename); |
780 | GNUNET_free_non_null (uc->serialization); | 780 | GNUNET_free (uc->serialization); |
781 | GNUNET_free_non_null (uc->emsg); | 781 | GNUNET_free (uc->emsg); |
782 | GNUNET_free (uc); | 782 | GNUNET_free (uc); |
783 | } | 783 | } |
784 | 784 | ||
@@ -892,7 +892,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc) | |||
892 | (uc->state == | 892 | (uc->state == |
893 | UNINDEX_STATE_COMPLETE) ? uc->file_size : 0); | 893 | UNINDEX_STATE_COMPLETE) ? uc->file_size : 0); |
894 | GNUNET_break (NULL == uc->client_info); | 894 | GNUNET_break (NULL == uc->client_info); |
895 | GNUNET_free_non_null (uc->emsg); | 895 | GNUNET_free (uc->emsg); |
896 | GNUNET_free (uc->filename); | 896 | GNUNET_free (uc->filename); |
897 | GNUNET_free (uc); | 897 | GNUNET_free (uc); |
898 | } | 898 | } |
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 410f3c815..9c430ad9d 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -353,7 +353,7 @@ uri_ksk_parse (const char *s, char **emsg) | |||
353 | return ret; | 353 | return ret; |
354 | CLEANUP: | 354 | CLEANUP: |
355 | for (i = 0; i < max; i++) | 355 | for (i = 0; i < max; i++) |
356 | GNUNET_free_non_null (keywords[i]); | 356 | GNUNET_free (keywords[i]); |
357 | GNUNET_free (keywords); | 357 | GNUNET_free (keywords); |
358 | GNUNET_free (dup); | 358 | GNUNET_free (dup); |
359 | return NULL; | 359 | return NULL; |
@@ -1172,7 +1172,7 @@ GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv) | |||
1172 | strlen (GNUNET_FS_URI_PREFIX))) && | 1172 | strlen (GNUNET_FS_URI_PREFIX))) && |
1173 | (NULL != (uri = GNUNET_FS_uri_parse (argv[0], &emsg)))) | 1173 | (NULL != (uri = GNUNET_FS_uri_parse (argv[0], &emsg)))) |
1174 | return uri; | 1174 | return uri; |
1175 | GNUNET_free_non_null (emsg); | 1175 | GNUNET_free (emsg); |
1176 | uri = GNUNET_new (struct GNUNET_FS_Uri); | 1176 | uri = GNUNET_new (struct GNUNET_FS_Uri); |
1177 | uri->type = GNUNET_FS_URI_KSK; | 1177 | uri->type = GNUNET_FS_URI_KSK; |
1178 | uri->data.ksk.keywordCount = argc; | 1178 | uri->data.ksk.keywordCount = argc; |
@@ -1825,7 +1825,7 @@ GNUNET_FS_uri_ksk_create_from_meta_data ( | |||
1825 | ret->data.ksk.keywords, | 1825 | ret->data.ksk.keywords, |
1826 | ret->data.ksk.keywordCount); | 1826 | ret->data.ksk.keywordCount); |
1827 | if (ent > 0) | 1827 | if (ent > 0) |
1828 | GNUNET_free_non_null (full_name); | 1828 | GNUNET_free (full_name); |
1829 | return ret; | 1829 | return ret; |
1830 | } | 1830 | } |
1831 | 1831 | ||
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c index 3aed0268b..f91e9d00d 100644 --- a/src/fs/gnunet-auto-share.c +++ b/src/fs/gnunet-auto-share.c | |||
@@ -201,9 +201,9 @@ load_state () | |||
201 | while (n-- > 0) | 201 | while (n-- > 0) |
202 | { | 202 | { |
203 | struct GNUNET_BIO_ReadSpec rs[] = { | 203 | struct GNUNET_BIO_ReadSpec rs[] = { |
204 | GNUNET_BIO_read_spec_string("filename", &fn, 1024), | 204 | GNUNET_BIO_read_spec_string ("filename", &fn, 1024), |
205 | GNUNET_BIO_read_spec_object("id", &id, sizeof(struct GNUNET_HashCode)), | 205 | GNUNET_BIO_read_spec_object ("id", &id, sizeof(struct GNUNET_HashCode)), |
206 | GNUNET_BIO_read_spec_end(), | 206 | GNUNET_BIO_read_spec_end (), |
207 | }; | 207 | }; |
208 | if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) | 208 | if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) |
209 | goto error; | 209 | goto error; |
@@ -227,13 +227,13 @@ load_state () | |||
227 | return; | 227 | return; |
228 | rh = NULL; | 228 | rh = NULL; |
229 | error: | 229 | error: |
230 | GNUNET_free_non_null (fn); | 230 | GNUNET_free (fn); |
231 | if (NULL != rh) | 231 | if (NULL != rh) |
232 | (void) GNUNET_BIO_read_close (rh, &emsg); | 232 | (void) GNUNET_BIO_read_close (rh, &emsg); |
233 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 233 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
234 | _ ("Failed to load state: %s\n"), | 234 | _ ("Failed to load state: %s\n"), |
235 | emsg); | 235 | emsg); |
236 | GNUNET_free_non_null (emsg); | 236 | GNUNET_free (emsg); |
237 | } | 237 | } |
238 | 238 | ||
239 | 239 | ||
@@ -258,7 +258,8 @@ write_item (void *cls, const struct GNUNET_HashCode *key, void *value) | |||
258 | struct GNUNET_BIO_WriteSpec ws[] = { | 258 | struct GNUNET_BIO_WriteSpec ws[] = { |
259 | GNUNET_BIO_write_spec_string ("auto-share-write-item-filename", | 259 | GNUNET_BIO_write_spec_string ("auto-share-write-item-filename", |
260 | wi->filename), | 260 | wi->filename), |
261 | GNUNET_BIO_write_spec_object ("id", &wi->id, sizeof(struct GNUNET_HashCode)), | 261 | GNUNET_BIO_write_spec_object ("id", &wi->id, sizeof(struct |
262 | GNUNET_HashCode)), | ||
262 | GNUNET_BIO_write_spec_end (), | 263 | GNUNET_BIO_write_spec_end (), |
263 | }; | 264 | }; |
264 | if (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)) | 265 | if (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)) |
@@ -478,8 +479,7 @@ work (void *cls) | |||
478 | argv[argc] = NULL; | 479 | argv[argc] = NULL; |
479 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Publishing `%s'\n"), wi->filename); | 480 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Publishing `%s'\n"), wi->filename); |
480 | GNUNET_assert (NULL == publish_proc); | 481 | GNUNET_assert (NULL == publish_proc); |
481 | publish_proc = GNUNET_OS_start_process_vap (GNUNET_YES, | 482 | publish_proc = GNUNET_OS_start_process_vap (GNUNET_OS_USE_PIPE_CONTROL, |
482 | 0, | ||
483 | NULL, | 483 | NULL, |
484 | NULL, | 484 | NULL, |
485 | NULL, | 485 | NULL, |
@@ -748,7 +748,7 @@ main (int argc, char *const *argv) | |||
748 | 748 | ||
749 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 749 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
750 | return 2; | 750 | return 2; |
751 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); | 751 | sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
752 | GNUNET_assert (NULL != sigpipe); | 752 | GNUNET_assert (NULL != sigpipe); |
753 | shc_chld = | 753 | shc_chld = |
754 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); | 754 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); |
@@ -781,7 +781,7 @@ main (int argc, char *const *argv) | |||
781 | shc_chld = NULL; | 781 | shc_chld = NULL; |
782 | GNUNET_DISK_pipe_close (sigpipe); | 782 | GNUNET_DISK_pipe_close (sigpipe); |
783 | sigpipe = NULL; | 783 | sigpipe = NULL; |
784 | GNUNET_free_non_null (cfg_filename); | 784 | GNUNET_free (cfg_filename); |
785 | cfg_filename = NULL; | 785 | cfg_filename = NULL; |
786 | GNUNET_free_nz ((void *) argv); | 786 | GNUNET_free_nz ((void *) argv); |
787 | return ok; | 787 | return ok; |
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c index 10a09f73b..ef5c40ae2 100644 --- a/src/fs/gnunet-directory.c +++ b/src/fs/gnunet-directory.c | |||
@@ -106,7 +106,7 @@ print_entry (void *cls, | |||
106 | GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL); | 106 | GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL); |
107 | printf ("\n"); | 107 | printf ("\n"); |
108 | printf (_ ("Directory `%s' contents:\n"), name ? name : ""); | 108 | printf (_ ("Directory `%s' contents:\n"), name ? name : ""); |
109 | GNUNET_free_non_null (name); | 109 | GNUNET_free (name); |
110 | return; | 110 | return; |
111 | } | 111 | } |
112 | string = GNUNET_FS_uri_to_string (uri); | 112 | string = GNUNET_FS_uri_to_string (uri); |
@@ -114,7 +114,7 @@ print_entry (void *cls, | |||
114 | GNUNET_free (string); | 114 | GNUNET_free (string); |
115 | GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL); | 115 | GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL); |
116 | printf ("\n"); | 116 | printf ("\n"); |
117 | GNUNET_free_non_null (name); | 117 | GNUNET_free (name); |
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index b10e6163c..91fcd8f8a 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -729,7 +729,7 @@ identity_continuation (const char *args0) | |||
729 | _ ("Failed to access `%s': %s\n"), | 729 | _ ("Failed to access `%s': %s\n"), |
730 | args0, | 730 | args0, |
731 | strerror (errno)); | 731 | strerror (errno)); |
732 | GNUNET_free_non_null (ex); | 732 | GNUNET_free (ex); |
733 | return; | 733 | return; |
734 | } | 734 | } |
735 | ds = GNUNET_FS_directory_scan_start (args0, | 735 | ds = GNUNET_FS_directory_scan_start (args0, |
@@ -744,10 +744,10 @@ identity_continuation (const char *args0) | |||
744 | "%s", | 744 | "%s", |
745 | _ ( | 745 | _ ( |
746 | "Failed to start meta directory scanner. Is gnunet-helper-publish-fs installed?\n")); | 746 | "Failed to start meta directory scanner. Is gnunet-helper-publish-fs installed?\n")); |
747 | GNUNET_free_non_null (ex); | 747 | GNUNET_free (ex); |
748 | return; | 748 | return; |
749 | } | 749 | } |
750 | GNUNET_free_non_null (ex); | 750 | GNUNET_free (ex); |
751 | } | 751 | } |
752 | 752 | ||
753 | 753 | ||
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 098633379..d25ae55e6 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -127,7 +127,7 @@ clean_task (void *cls) | |||
127 | _ ("Failed to write directory with search results to `%s'\n"), | 127 | _ ("Failed to write directory with search results to `%s'\n"), |
128 | output_filename); | 128 | output_filename); |
129 | } | 129 | } |
130 | GNUNET_free_non_null (ddata); | 130 | GNUNET_free (ddata); |
131 | GNUNET_free (output_filename); | 131 | GNUNET_free (output_filename); |
132 | } | 132 | } |
133 | 133 | ||
@@ -197,7 +197,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
197 | NULL); | 197 | NULL); |
198 | printf ("\n"); | 198 | printf ("\n"); |
199 | fflush (stdout); | 199 | fflush (stdout); |
200 | GNUNET_free_non_null (filename); | 200 | GNUNET_free (filename); |
201 | GNUNET_free (uri); | 201 | GNUNET_free (uri); |
202 | results++; | 202 | results++; |
203 | if ((results_limit > 0) && (results >= results_limit)) | 203 | if ((results_limit > 0) && (results >= results_limit)) |
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 71de5668b..150dd72e2 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -588,7 +588,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr) | |||
588 | if (NULL != pr->public_data.target) | 588 | if (NULL != pr->public_data.target) |
589 | ext[k++] = *pr->public_data.target; | 589 | ext[k++] = *pr->public_data.target; |
590 | GNUNET_memcpy (&ext[k], bf_data, bf_size); | 590 | GNUNET_memcpy (&ext[k], bf_data, bf_size); |
591 | GNUNET_free_non_null (bf_data); | 591 | GNUNET_free (bf_data); |
592 | return env; | 592 | return env; |
593 | } | 593 | } |
594 | 594 | ||
@@ -622,7 +622,7 @@ clean_request (void *cls, const struct GNUNET_HashCode *key, void *value) | |||
622 | cont (pr->llc_cont_cls, pr, pr->local_result); | 622 | cont (pr->llc_cont_cls, pr, pr->local_result); |
623 | } | 623 | } |
624 | GSF_plan_notify_request_done_ (pr); | 624 | GSF_plan_notify_request_done_ (pr); |
625 | GNUNET_free_non_null (pr->replies_seen); | 625 | GNUNET_free (pr->replies_seen); |
626 | GNUNET_BLOCK_group_destroy (pr->bg); | 626 | GNUNET_BLOCK_group_destroy (pr->bg); |
627 | pr->bg = NULL; | 627 | pr->bg = NULL; |
628 | GNUNET_PEER_change_rc (pr->sender_pid, -1); | 628 | GNUNET_PEER_change_rc (pr->sender_pid, -1); |
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c index 391b667cb..9305471d6 100644 --- a/src/fs/test_fs_file_information.c +++ b/src/fs/test_fs_file_information.c | |||
@@ -129,8 +129,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
129 | GNUNET_FS_file_information_destroy (fidir, &mycleaner, NULL); | 129 | GNUNET_FS_file_information_destroy (fidir, &mycleaner, NULL); |
130 | GNUNET_DISK_directory_remove (fn1); | 130 | GNUNET_DISK_directory_remove (fn1); |
131 | GNUNET_DISK_directory_remove (fn2); | 131 | GNUNET_DISK_directory_remove (fn2); |
132 | GNUNET_free_non_null (fn1); | 132 | GNUNET_free (fn1); |
133 | GNUNET_free_non_null (fn2); | 133 | GNUNET_free (fn2); |
134 | GNUNET_FS_stop (fs); | 134 | GNUNET_FS_stop (fs); |
135 | } | 135 | } |
136 | 136 | ||
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c index 484884243..c1e10d575 100644 --- a/src/fs/test_fs_namespace.c +++ b/src/fs/test_fs_namespace.c | |||
@@ -190,7 +190,7 @@ publish_cont (void *cls, const struct GNUNET_FS_Uri *ksk_uri, const char *emsg) | |||
190 | fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg); | 190 | fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg); |
191 | err = 1; | 191 | err = 1; |
192 | GNUNET_FS_stop (fs); | 192 | GNUNET_FS_stop (fs); |
193 | GNUNET_free_non_null (msg); | 193 | GNUNET_free (msg); |
194 | return; | 194 | return; |
195 | } | 195 | } |
196 | ksk_search = | 196 | ksk_search = |
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 0d99d822e..bf95bf340 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -427,4 +427,5 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
427 | proc_cls); | 427 | proc_cls); |
428 | } | 428 | } |
429 | 429 | ||
430 | |||
430 | /* end of gns_api.c */ | 431 | /* end of gns_api.c */ |
diff --git a/src/gns/gns_tld_api.c b/src/gns/gns_tld_api.c index 1db5baacb..3ebf07db6 100644 --- a/src/gns/gns_tld_api.c +++ b/src/gns/gns_tld_api.c | |||
@@ -340,7 +340,7 @@ GNUNET_GNS_lookup_with_tld_cancel (struct GNUNET_GNS_LookupWithTldRequest *ltr) | |||
340 | GNUNET_GNS_lookup_cancel (ltr->lr); | 340 | GNUNET_GNS_lookup_cancel (ltr->lr); |
341 | ltr->lr = NULL; | 341 | ltr->lr = NULL; |
342 | } | 342 | } |
343 | GNUNET_free_non_null (ltr->longest_match); | 343 | GNUNET_free (ltr->longest_match); |
344 | GNUNET_free (ltr->name); | 344 | GNUNET_free (ltr->name); |
345 | GNUNET_free (ltr); | 345 | GNUNET_free (ltr); |
346 | return ret; | 346 | return ret; |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 74309f554..0a9b7c861 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -190,6 +190,7 @@ do_shutdown (void *cls) | |||
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
193 | |||
193 | /** | 194 | /** |
194 | * Shuffle answers | 195 | * Shuffle answers |
195 | * Fisher-Yates (aka Knuth) Shuffle | 196 | * Fisher-Yates (aka Knuth) Shuffle |
@@ -216,6 +217,7 @@ shuffle_answers (struct Request *request) | |||
216 | } | 217 | } |
217 | } | 218 | } |
218 | 219 | ||
220 | |||
219 | /** | 221 | /** |
220 | * Send the response for the given request and clean up. | 222 | * Send the response for the given request and clean up. |
221 | * | 223 | * |
diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c index 2c7c56411..78db28cab 100644 --- a/src/gns/gnunet-gns-import.c +++ b/src/gns/gnunet-gns-import.c | |||
@@ -87,8 +87,7 @@ static int ret; | |||
87 | 87 | ||
88 | 88 | ||
89 | static int | 89 | static int |
90 | run_process_and_wait (int pipe_control, | 90 | run_process_and_wait (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
91 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
92 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 91 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
93 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 92 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
94 | enum GNUNET_OS_ProcessStatusType *st, | 93 | enum GNUNET_OS_ProcessStatusType *st, |
@@ -120,7 +119,7 @@ run_process_and_wait (int pipe_control, | |||
120 | va_end (apc2); | 119 | va_end (apc2); |
121 | if (arglen > 0) | 120 | if (arglen > 0) |
122 | argp[-1] = '\0'; | 121 | argp[-1] = '\0'; |
123 | p = GNUNET_OS_start_process_va (pipe_control, std_inheritance, | 122 | p = GNUNET_OS_start_process_va (std_inheritance, |
124 | pipe_stdin, | 123 | pipe_stdin, |
125 | pipe_stdout, | 124 | pipe_stdout, |
126 | NULL, | 125 | NULL, |
@@ -222,7 +221,7 @@ zone_iteration_error (void *cls) | |||
222 | 221 | ||
223 | if (! found_private_rec) | 222 | if (! found_private_rec) |
224 | { | 223 | { |
225 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 224 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
226 | NULL, NULL, &st, &code, | 225 | NULL, NULL, &st, &code, |
227 | "gnunet-namestore", | 226 | "gnunet-namestore", |
228 | "gnunet-namestore", "-z", "master-zone", | 227 | "gnunet-namestore", "-z", "master-zone", |
@@ -236,7 +235,7 @@ zone_iteration_error (void *cls) | |||
236 | } | 235 | } |
237 | if (! found_pin_rec) | 236 | if (! found_pin_rec) |
238 | { | 237 | { |
239 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 238 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
240 | NULL, NULL, &st, &code, | 239 | NULL, NULL, &st, &code, |
241 | "gnunet-namestore", | 240 | "gnunet-namestore", |
242 | "gnunet-namestore", "-z", "master-zone", | 241 | "gnunet-namestore", "-z", "master-zone", |
@@ -346,9 +345,9 @@ get_ego (void *cls, | |||
346 | static void | 345 | static void |
347 | shutdown_task (void *cls) | 346 | shutdown_task (void *cls) |
348 | { | 347 | { |
349 | GNUNET_free_non_null (master_zone_pkey); | 348 | GNUNET_free (master_zone_pkey); |
350 | master_zone_pkey = NULL; | 349 | master_zone_pkey = NULL; |
351 | GNUNET_free_non_null (private_zone_pkey); | 350 | GNUNET_free (private_zone_pkey); |
352 | private_zone_pkey = NULL; | 351 | private_zone_pkey = NULL; |
353 | if (NULL != list_it) | 352 | if (NULL != list_it) |
354 | { | 353 | { |
@@ -385,7 +384,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
385 | 384 | ||
386 | cfg = c; | 385 | cfg = c; |
387 | 386 | ||
388 | if (0 != run_process_and_wait (GNUNET_NO, 0, NULL, NULL, &st, &code, | 387 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_NONE, |
388 | NULL, NULL, &st, &code, | ||
389 | "gnunet-arm", | 389 | "gnunet-arm", |
390 | "gnunet-arm", "-I", NULL)) | 390 | "gnunet-arm", "-I", NULL)) |
391 | { | 391 | { |
@@ -395,60 +395,60 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
395 | return; | 395 | return; |
396 | } | 396 | } |
397 | 397 | ||
398 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 398 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
399 | NULL, NULL, &st, &code, | 399 | NULL, NULL, &st, &code, |
400 | "gnunet-identity", | 400 | "gnunet-identity", |
401 | "gnunet-identity", "-C", "master-zone", NULL)) | 401 | "gnunet-identity", "-C", "master-zone", NULL)) |
402 | return; | 402 | return; |
403 | 403 | ||
404 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 404 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
405 | NULL, NULL, &st, &code, | 405 | NULL, NULL, &st, &code, |
406 | "gnunet-identity", | 406 | "gnunet-identity", |
407 | "gnunet-identity", "-C", "private-zone", NULL)) | 407 | "gnunet-identity", "-C", "private-zone", NULL)) |
408 | return; | 408 | return; |
409 | 409 | ||
410 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 410 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
411 | NULL, NULL, &st, &code, | 411 | NULL, NULL, &st, &code, |
412 | "gnunet-identity", | 412 | "gnunet-identity", |
413 | "gnunet-identity", "-C", "sks-zone", NULL)) | 413 | "gnunet-identity", "-C", "sks-zone", NULL)) |
414 | return; | 414 | return; |
415 | 415 | ||
416 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 416 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
417 | NULL, NULL, &st, &code, | 417 | NULL, NULL, &st, &code, |
418 | "gnunet-identity", | 418 | "gnunet-identity", |
419 | "gnunet-identity", "-e", "master-zone", "-s", | 419 | "gnunet-identity", "-e", "master-zone", "-s", |
420 | "gns-master", NULL)) | 420 | "gns-master", NULL)) |
421 | return; | 421 | return; |
422 | 422 | ||
423 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 423 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
424 | NULL, NULL, &st, &code, | 424 | NULL, NULL, &st, &code, |
425 | "gnunet-identity", | 425 | "gnunet-identity", |
426 | "gnunet-identity", "-e", "master-zone", "-s", | 426 | "gnunet-identity", "-e", "master-zone", "-s", |
427 | "namestore", NULL)) | 427 | "namestore", NULL)) |
428 | return; | 428 | return; |
429 | 429 | ||
430 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 430 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
431 | NULL, NULL, &st, &code, | 431 | NULL, NULL, &st, &code, |
432 | "gnunet-identity", | 432 | "gnunet-identity", |
433 | "gnunet-identity", "-e", "master-zone", "-s", | 433 | "gnunet-identity", "-e", "master-zone", "-s", |
434 | "gns-proxy", NULL)) | 434 | "gns-proxy", NULL)) |
435 | return; | 435 | return; |
436 | 436 | ||
437 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 437 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
438 | NULL, NULL, &st, &code, | 438 | NULL, NULL, &st, &code, |
439 | "gnunet-identity", | 439 | "gnunet-identity", |
440 | "gnunet-identity", "-e", "master-zone", "-s", | 440 | "gnunet-identity", "-e", "master-zone", "-s", |
441 | "gns-intercept", NULL)) | 441 | "gns-intercept", NULL)) |
442 | return; | 442 | return; |
443 | 443 | ||
444 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 444 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
445 | NULL, NULL, &st, &code, | 445 | NULL, NULL, &st, &code, |
446 | "gnunet-identity", | 446 | "gnunet-identity", |
447 | "gnunet-identity", "-e", "private-zone", "-s", | 447 | "gnunet-identity", "-e", "private-zone", "-s", |
448 | "gns-private", NULL)) | 448 | "gns-private", NULL)) |
449 | return; | 449 | return; |
450 | 450 | ||
451 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 451 | if (0 != run_process_and_wait (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
452 | NULL, NULL, &st, &code, | 452 | NULL, NULL, &st, &code, |
453 | "gnunet-identity", | 453 | "gnunet-identity", |
454 | "gnunet-identity", "-e", "sks-zone", "-s", | 454 | "gnunet-identity", "-e", "sks-zone", "-s", |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index eb6c6852e..d38204ef1 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -831,9 +831,9 @@ cleanup_s5r (struct Socks5Request *s5r) | |||
831 | GNUNET_CONTAINER_DLL_remove (s5r_head, | 831 | GNUNET_CONTAINER_DLL_remove (s5r_head, |
832 | s5r_tail, | 832 | s5r_tail, |
833 | s5r); | 833 | s5r); |
834 | GNUNET_free_non_null (s5r->domain); | 834 | GNUNET_free (s5r->domain); |
835 | GNUNET_free_non_null (s5r->leho); | 835 | GNUNET_free (s5r->leho); |
836 | GNUNET_free_non_null (s5r->url); | 836 | GNUNET_free (s5r->url); |
837 | for (unsigned int i = 0; i < s5r->num_danes; i++) | 837 | for (unsigned int i = 0; i < s5r->num_danes; i++) |
838 | GNUNET_free (s5r->dane_data[i]); | 838 | GNUNET_free (s5r->dane_data[i]); |
839 | GNUNET_free (s5r); | 839 | GNUNET_free (s5r); |
@@ -1311,8 +1311,8 @@ curl_check_hdr (void *buffer, | |||
1311 | } | 1311 | } |
1312 | cleanup: | 1312 | cleanup: |
1313 | GNUNET_free (ndup); | 1313 | GNUNET_free (ndup); |
1314 | GNUNET_free_non_null (new_cookie_hdr); | 1314 | GNUNET_free (new_cookie_hdr); |
1315 | GNUNET_free_non_null (new_location); | 1315 | GNUNET_free (new_location); |
1316 | return bytes; | 1316 | return bytes; |
1317 | } | 1317 | } |
1318 | 1318 | ||
@@ -2446,14 +2446,14 @@ kill_httpd (struct MhdHttpList *hd) | |||
2446 | GNUNET_CONTAINER_DLL_remove (mhd_httpd_head, | 2446 | GNUNET_CONTAINER_DLL_remove (mhd_httpd_head, |
2447 | mhd_httpd_tail, | 2447 | mhd_httpd_tail, |
2448 | hd); | 2448 | hd); |
2449 | GNUNET_free_non_null (hd->domain); | 2449 | GNUNET_free (hd->domain); |
2450 | MHD_stop_daemon (hd->daemon); | 2450 | MHD_stop_daemon (hd->daemon); |
2451 | if (NULL != hd->httpd_task) | 2451 | if (NULL != hd->httpd_task) |
2452 | { | 2452 | { |
2453 | GNUNET_SCHEDULER_cancel (hd->httpd_task); | 2453 | GNUNET_SCHEDULER_cancel (hd->httpd_task); |
2454 | hd->httpd_task = NULL; | 2454 | hd->httpd_task = NULL; |
2455 | } | 2455 | } |
2456 | GNUNET_free_non_null (hd->proxy_cert); | 2456 | GNUNET_free (hd->proxy_cert); |
2457 | if (hd == httpd) | 2457 | if (hd == httpd) |
2458 | httpd = NULL; | 2458 | httpd = NULL; |
2459 | GNUNET_free (hd); | 2459 | GNUNET_free (hd); |
@@ -2657,7 +2657,7 @@ load_key_from_file (gnutls_x509_privkey_t key, | |||
2657 | _ ("Unable to import private key from file `%s'\n"), | 2657 | _ ("Unable to import private key from file `%s'\n"), |
2658 | keyfile); | 2658 | keyfile); |
2659 | } | 2659 | } |
2660 | GNUNET_free_non_null (key_data.data); | 2660 | GNUNET_free (key_data.data); |
2661 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; | 2661 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; |
2662 | } | 2662 | } |
2663 | 2663 | ||
@@ -2689,7 +2689,7 @@ load_cert_from_file (gnutls_x509_crt_t crt, | |||
2689 | _ ("Unable to import certificate from `%s'\n"), | 2689 | _ ("Unable to import certificate from `%s'\n"), |
2690 | certfile); | 2690 | certfile); |
2691 | } | 2691 | } |
2692 | GNUNET_free_non_null (cert_data.data); | 2692 | GNUNET_free (cert_data.data); |
2693 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; | 2693 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; |
2694 | } | 2694 | } |
2695 | 2695 | ||
@@ -2921,7 +2921,7 @@ setup_data_transfer (struct Socks5Request *s5r) | |||
2921 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2921 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
2922 | _ ("Failed to pass client to MHD\n")); | 2922 | _ ("Failed to pass client to MHD\n")); |
2923 | cleanup_s5r (s5r); | 2923 | cleanup_s5r (s5r); |
2924 | GNUNET_free_non_null (domain); | 2924 | GNUNET_free (domain); |
2925 | return; | 2925 | return; |
2926 | } | 2926 | } |
2927 | s5r->hd = hd; | 2927 | s5r->hd = hd; |
@@ -2929,7 +2929,7 @@ setup_data_transfer (struct Socks5Request *s5r) | |||
2929 | s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT, | 2929 | s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT, |
2930 | &timeout_s5r_handshake, | 2930 | &timeout_s5r_handshake, |
2931 | s5r); | 2931 | s5r); |
2932 | GNUNET_free_non_null (domain); | 2932 | GNUNET_free (domain); |
2933 | } | 2933 | } |
2934 | 2934 | ||
2935 | 2935 | ||
@@ -3145,7 +3145,7 @@ handle_gns_result (void *cls, | |||
3145 | break; | 3145 | break; |
3146 | 3146 | ||
3147 | case GNUNET_GNSRECORD_TYPE_LEHO: | 3147 | case GNUNET_GNSRECORD_TYPE_LEHO: |
3148 | GNUNET_free_non_null (s5r->leho); | 3148 | GNUNET_free (s5r->leho); |
3149 | s5r->leho = GNUNET_strndup (r->data, | 3149 | s5r->leho = GNUNET_strndup (r->data, |
3150 | r->data_size); | 3150 | r->data_size); |
3151 | break; | 3151 | break; |
@@ -3732,10 +3732,10 @@ run (void *cls, | |||
3732 | gnutls_x509_crt_deinit (proxy_ca.cert); | 3732 | gnutls_x509_crt_deinit (proxy_ca.cert); |
3733 | gnutls_x509_privkey_deinit (proxy_ca.key); | 3733 | gnutls_x509_privkey_deinit (proxy_ca.key); |
3734 | gnutls_global_deinit (); | 3734 | gnutls_global_deinit (); |
3735 | GNUNET_free_non_null (cafile_cfg); | 3735 | GNUNET_free (cafile_cfg); |
3736 | return; | 3736 | return; |
3737 | } | 3737 | } |
3738 | GNUNET_free_non_null (cafile_cfg); | 3738 | GNUNET_free (cafile_cfg); |
3739 | if (NULL == (gns_handle = GNUNET_GNS_connect (cfg))) | 3739 | if (NULL == (gns_handle = GNUNET_GNS_connect (cfg))) |
3740 | { | 3740 | { |
3741 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3741 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -3900,7 +3900,7 @@ main (int argc, | |||
3900 | options, | 3900 | options, |
3901 | &run, NULL)) ? 0 : 1; | 3901 | &run, NULL)) ? 0 : 1; |
3902 | MHD_destroy_response (curl_failure_response); | 3902 | MHD_destroy_response (curl_failure_response); |
3903 | GNUNET_free_non_null ((char *) argv); | 3903 | GNUNET_free_nz ((char *) argv); |
3904 | return ret; | 3904 | return ret; |
3905 | } | 3905 | } |
3906 | 3906 | ||
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 7d398c168..cb75b23c7 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -1675,7 +1675,7 @@ recursive_cname_resolution (struct GNS_ResolverHandle *rh, | |||
1675 | (off != rd->data_size)) | 1675 | (off != rd->data_size)) |
1676 | { | 1676 | { |
1677 | GNUNET_break_op (0); /* record not well-formed */ | 1677 | GNUNET_break_op (0); /* record not well-formed */ |
1678 | GNUNET_free_non_null (cname); | 1678 | GNUNET_free (cname); |
1679 | fail_resolution (rh); | 1679 | fail_resolution (rh); |
1680 | return; | 1680 | return; |
1681 | } | 1681 | } |
@@ -1777,8 +1777,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh, | |||
1777 | (off != rd[i].data_size)) | 1777 | (off != rd[i].data_size)) |
1778 | { | 1778 | { |
1779 | GNUNET_break_op (0); | 1779 | GNUNET_break_op (0); |
1780 | GNUNET_free_non_null (n); | 1780 | GNUNET_free (n); |
1781 | GNUNET_free_non_null (ip); | 1781 | GNUNET_free (ip); |
1782 | continue; | 1782 | continue; |
1783 | } | 1783 | } |
1784 | /* resolve 'ip' to determine the IP(s) of the DNS | 1784 | /* resolve 'ip' to determine the IP(s) of the DNS |
@@ -1983,7 +1983,7 @@ handle_gns_resolution_result (void *cls, | |||
1983 | (off != rd[0].data_size)) | 1983 | (off != rd[0].data_size)) |
1984 | { | 1984 | { |
1985 | GNUNET_break_op (0); | 1985 | GNUNET_break_op (0); |
1986 | GNUNET_free_non_null (cname); | 1986 | GNUNET_free (cname); |
1987 | fail_resolution (rh); | 1987 | fail_resolution (rh); |
1988 | return; | 1988 | return; |
1989 | } | 1989 | } |
@@ -2137,7 +2137,7 @@ handle_gns_resolution_result (void *cls, | |||
2137 | rd_off++; | 2137 | rd_off++; |
2138 | } | 2138 | } |
2139 | } | 2139 | } |
2140 | GNUNET_free_non_null (cname); | 2140 | GNUNET_free (cname); |
2141 | } | 2141 | } |
2142 | break; | 2142 | break; |
2143 | 2143 | ||
@@ -2993,7 +2993,7 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh) | |||
2993 | dr); | 2993 | dr); |
2994 | GNUNET_free (dr); | 2994 | GNUNET_free (dr); |
2995 | } | 2995 | } |
2996 | GNUNET_free_non_null (rh->leho); | 2996 | GNUNET_free (rh->leho); |
2997 | GNUNET_free (rh->name); | 2997 | GNUNET_free (rh->name); |
2998 | GNUNET_free (rh); | 2998 | GNUNET_free (rh); |
2999 | } | 2999 | } |
diff --git a/src/gns/nss/nss_gns.c b/src/gns/nss/nss_gns.c index 36799ba3a..77b4340ee 100644 --- a/src/gns/nss/nss_gns.c +++ b/src/gns/nss/nss_gns.c | |||
@@ -38,7 +38,7 @@ | |||
38 | /** macro to align idx to 32bit boundary */ | 38 | /** macro to align idx to 32bit boundary */ |
39 | #define ALIGN(idx) do { \ | 39 | #define ALIGN(idx) do { \ |
40 | if (idx % sizeof(void*)) \ | 40 | if (idx % sizeof(void*)) \ |
41 | idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on 32 bit boundary */ \ | 41 | idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on 32 bit boundary */ \ |
42 | } while (0) | 42 | } while (0) |
43 | 43 | ||
44 | 44 | ||
diff --git a/src/gns/nss/nss_gns_query.c b/src/gns/nss/nss_gns_query.c index 11e46ad7f..96e8e10da 100644 --- a/src/gns/nss/nss_gns_query.c +++ b/src/gns/nss/nss_gns_query.c | |||
@@ -150,7 +150,7 @@ query_gns: | |||
150 | if (1 == retry) | 150 | if (1 == retry) |
151 | return -2; /* no go -> service unavailable */ | 151 | return -2; /* no go -> service unavailable */ |
152 | retry = 1; | 152 | retry = 1; |
153 | system("gnunet-arm -s"); | 153 | system ("gnunet-arm -s"); |
154 | goto query_gns; /* Try again */ | 154 | goto query_gns; /* Try again */ |
155 | } | 155 | } |
156 | if (3 == WEXITSTATUS (ret)) | 156 | if (3 == WEXITSTATUS (ret)) |
diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c index 370bf1da4..81f2b9eff 100644 --- a/src/gns/plugin_gnsrecord_gns.c +++ b/src/gns/plugin_gnsrecord_gns.c | |||
@@ -75,14 +75,14 @@ gns_value_to_string (void *cls, | |||
75 | if (NULL == ns) | 75 | if (NULL == ns) |
76 | { | 76 | { |
77 | GNUNET_break_op (0); | 77 | GNUNET_break_op (0); |
78 | GNUNET_free_non_null (ns); | 78 | GNUNET_free (ns); |
79 | return NULL; | 79 | return NULL; |
80 | } | 80 | } |
81 | /* DNS server IP/name must be UTF-8 */ | 81 | /* DNS server IP/name must be UTF-8 */ |
82 | ip = GNUNET_strdup (&((const char*) data)[off]); | 82 | ip = GNUNET_strdup (&((const char*) data)[off]); |
83 | GNUNET_asprintf (&nstr, "%s@%s", ns, ip); | 83 | GNUNET_asprintf (&nstr, "%s@%s", ns, ip); |
84 | GNUNET_free_non_null (ns); | 84 | GNUNET_free (ns); |
85 | GNUNET_free_non_null (ip); | 85 | GNUNET_free (ip); |
86 | return nstr; | 86 | return nstr; |
87 | } | 87 | } |
88 | 88 | ||
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index feb333350..37313c529 100644 --- a/src/gns/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c | |||
@@ -461,7 +461,7 @@ libgnunet_plugin_rest_gns_done (void *cls) | |||
461 | 461 | ||
462 | plugin->cfg = NULL; | 462 | plugin->cfg = NULL; |
463 | 463 | ||
464 | GNUNET_free_non_null (allow_methods); | 464 | GNUNET_free (allow_methods); |
465 | GNUNET_free (api); | 465 | GNUNET_free (api); |
466 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n"); | 466 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n"); |
467 | return NULL; | 467 | return NULL; |
diff --git a/src/gns/test_gns_lookup.conf b/src/gns/test_gns_lookup.conf index 130d190e7..db0b4bfbe 100644 --- a/src/gns/test_gns_lookup.conf +++ b/src/gns/test_gns_lookup.conf | |||
@@ -23,7 +23,8 @@ DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0 | |||
23 | #PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/ns_log | 23 | #PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/ns_log |
24 | 24 | ||
25 | [revocation] | 25 | [revocation] |
26 | WORKBITS = 1 | 26 | WORKBITS = 2 |
27 | EPOCH_DURATION = 365 d | ||
27 | 28 | ||
28 | [dhtcache] | 29 | [dhtcache] |
29 | QUOTA = 1 MB | 30 | QUOTA = 1 MB |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 12f3f8625..13764d520 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -139,7 +139,7 @@ load_key_from_file (gnutls_x509_privkey_t key, | |||
139 | _ ("Unable to import private key from file `%s'\n"), | 139 | _ ("Unable to import private key from file `%s'\n"), |
140 | keyfile); | 140 | keyfile); |
141 | } | 141 | } |
142 | GNUNET_free_non_null (key_data.data); | 142 | GNUNET_free (key_data.data); |
143 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; | 143 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; |
144 | } | 144 | } |
145 | 145 | ||
@@ -171,7 +171,7 @@ load_cert_from_file (gnutls_x509_crt_t crt, | |||
171 | _ ("Unable to import certificate from `%s'\n"), | 171 | _ ("Unable to import certificate from `%s'\n"), |
172 | certfile); | 172 | certfile); |
173 | } | 173 | } |
174 | GNUNET_free_non_null (cert_data.data); | 174 | GNUNET_free (cert_data.data); |
175 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; | 175 | return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; |
176 | } | 176 | } |
177 | 177 | ||
@@ -245,7 +245,7 @@ do_shutdown () | |||
245 | MHD_stop_daemon (mhd); | 245 | MHD_stop_daemon (mhd); |
246 | mhd = NULL; | 246 | mhd = NULL; |
247 | } | 247 | } |
248 | GNUNET_free_non_null (url); | 248 | GNUNET_free (url); |
249 | 249 | ||
250 | if (NULL != proxy_proc) | 250 | if (NULL != proxy_proc) |
251 | { | 251 | { |
@@ -528,6 +528,8 @@ run (void *cls, | |||
528 | int | 528 | int |
529 | main (int argc, char *const *argv) | 529 | main (int argc, char *const *argv) |
530 | { | 530 | { |
531 | char *tmp_argv; | ||
532 | |||
531 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 533 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
532 | GNUNET_GETOPT_option_uint16 ('p', | 534 | GNUNET_GETOPT_option_uint16 ('p', |
533 | "port", | 535 | "port", |
@@ -557,7 +559,7 @@ main (int argc, char *const *argv) | |||
557 | } | 559 | } |
558 | if (GNUNET_OK != | 560 | if (GNUNET_OK != |
559 | GNUNET_STRINGS_get_utf8_args (argc, argv, | 561 | GNUNET_STRINGS_get_utf8_args (argc, argv, |
560 | &argc, &argv)) | 562 | &argc, &tmp_argv)) |
561 | return 2; | 563 | return 2; |
562 | GNUNET_log_setup ("gnunet-gns-proxy-test", | 564 | GNUNET_log_setup ("gnunet-gns-proxy-test", |
563 | "WARNING", | 565 | "WARNING", |
@@ -568,7 +570,7 @@ main (int argc, char *const *argv) | |||
568 | options, | 570 | options, |
569 | &run, NULL)) | 571 | &run, NULL)) |
570 | return 1; | 572 | return 1; |
571 | GNUNET_free_non_null ((char *) argv); | 573 | GNUNET_free (tmp_argv); |
572 | return global_ret; | 574 | return global_ret; |
573 | } | 575 | } |
574 | 576 | ||
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c index 82fb71c06..8d5a6d95b 100644 --- a/src/gnsrecord/gnsrecord.c +++ b/src/gnsrecord/gnsrecord.c | |||
@@ -102,8 +102,15 @@ init () | |||
102 | if (1 == once) | 102 | if (1 == once) |
103 | return; | 103 | return; |
104 | once = 1; | 104 | once = 1; |
105 | const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get (); | ||
106 | const struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default (); | ||
107 | |||
108 | if (pd != dpd) | ||
109 | GNUNET_OS_init (dpd); | ||
105 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_gnsrecord_", NULL, | 110 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_gnsrecord_", NULL, |
106 | &add_plugin, NULL); | 111 | &add_plugin, NULL); |
112 | if (pd != dpd) | ||
113 | GNUNET_OS_init (pd); | ||
107 | } | 114 | } |
108 | 115 | ||
109 | 116 | ||
@@ -114,6 +121,11 @@ void __attribute__ ((destructor)) | |||
114 | GNSRECORD_fini () | 121 | GNSRECORD_fini () |
115 | { | 122 | { |
116 | struct Plugin *plugin; | 123 | struct Plugin *plugin; |
124 | const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get (); | ||
125 | const struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default (); | ||
126 | |||
127 | if (pd != dpd) | ||
128 | GNUNET_OS_init (dpd); | ||
117 | 129 | ||
118 | for (unsigned int i = 0; i < num_plugins; i++) | 130 | for (unsigned int i = 0; i < num_plugins; i++) |
119 | { | 131 | { |
@@ -124,7 +136,11 @@ GNSRECORD_fini () | |||
124 | GNUNET_free (plugin->library_name); | 136 | GNUNET_free (plugin->library_name); |
125 | GNUNET_free (plugin); | 137 | GNUNET_free (plugin); |
126 | } | 138 | } |
127 | GNUNET_free_non_null (gns_plugins); | 139 | GNUNET_free (gns_plugins); |
140 | |||
141 | if (pd != dpd) | ||
142 | GNUNET_OS_init (pd); | ||
143 | |||
128 | gns_plugins = NULL; | 144 | gns_plugins = NULL; |
129 | once = 0; | 145 | once = 0; |
130 | num_plugins = 0; | 146 | num_plugins = 0; |
diff --git a/src/gnsrecord/plugin_gnsrecord_dns.c b/src/gnsrecord/plugin_gnsrecord_dns.c index 5410d9546..9ac6fb9e6 100644 --- a/src/gnsrecord/plugin_gnsrecord_dns.c +++ b/src/gnsrecord/plugin_gnsrecord_dns.c | |||
@@ -65,7 +65,7 @@ dns_value_to_string (void *cls, | |||
65 | if ((NULL == ns) || (off != data_size)) | 65 | if ((NULL == ns) || (off != data_size)) |
66 | { | 66 | { |
67 | GNUNET_break_op (0); | 67 | GNUNET_break_op (0); |
68 | GNUNET_free_non_null (ns); | 68 | GNUNET_free (ns); |
69 | return NULL; | 69 | return NULL; |
70 | } | 70 | } |
71 | return ns; | 71 | return ns; |
@@ -80,7 +80,7 @@ dns_value_to_string (void *cls, | |||
80 | if ((NULL == cname) || (off != data_size)) | 80 | if ((NULL == cname) || (off != data_size)) |
81 | { | 81 | { |
82 | GNUNET_break_op (0); | 82 | GNUNET_break_op (0); |
83 | GNUNET_free_non_null (cname); | 83 | GNUNET_free (cname); |
84 | return NULL; | 84 | return NULL; |
85 | } | 85 | } |
86 | return cname; | 86 | return cname; |
@@ -121,7 +121,7 @@ dns_value_to_string (void *cls, | |||
121 | if ((NULL == ptr) || (off != data_size)) | 121 | if ((NULL == ptr) || (off != data_size)) |
122 | { | 122 | { |
123 | GNUNET_break_op (0); | 123 | GNUNET_break_op (0); |
124 | GNUNET_free_non_null (ptr); | 124 | GNUNET_free (ptr); |
125 | return NULL; | 125 | return NULL; |
126 | } | 126 | } |
127 | return ptr; | 127 | return ptr; |
diff --git a/src/hello/hello-ng.c b/src/hello/hello-ng.c index d06feadd5..dd3480a48 100644 --- a/src/hello/hello-ng.c +++ b/src/hello/hello-ng.c | |||
@@ -153,7 +153,7 @@ GNUNET_HELLO_extract_address (const void *raw, | |||
153 | GNUNET_STRINGS_base64_decode (raws, sc - raws, (void **) &sig)) | 153 | GNUNET_STRINGS_base64_decode (raws, sc - raws, (void **) &sig)) |
154 | { | 154 | { |
155 | GNUNET_break_op (0); | 155 | GNUNET_break_op (0); |
156 | GNUNET_free_non_null (sig); | 156 | GNUNET_free (sig); |
157 | return NULL; | 157 | return NULL; |
158 | } | 158 | } |
159 | raw_addr = sc3 + 1; | 159 | raw_addr = sc3 + 1; |
diff --git a/src/hello/hello.c b/src/hello/hello.c index 11eec9898..fa859a772 100644 --- a/src/hello/hello.c +++ b/src/hello/hello.c | |||
@@ -300,7 +300,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg, | |||
300 | if (0 == esize) | 300 | if (0 == esize) |
301 | { | 301 | { |
302 | GNUNET_break (0); | 302 | GNUNET_break (0); |
303 | GNUNET_free_non_null (ret); | 303 | GNUNET_free (ret); |
304 | return NULL; | 304 | return NULL; |
305 | } | 305 | } |
306 | /* need GNUNET_memcpy() due to possibility of misalignment */ | 306 | /* need GNUNET_memcpy() due to possibility of misalignment */ |
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c index c2e8f5d88..b377f2041 100644 --- a/src/hostlist/gnunet-daemon-hostlist_client.c +++ b/src/hostlist/gnunet-daemon-hostlist_client.c | |||
@@ -540,12 +540,12 @@ download_get_url () | |||
540 | { \ | 540 | { \ |
541 | ret = curl_easy_setopt (c, a, b); \ | 541 | ret = curl_easy_setopt (c, a, b); \ |
542 | if (CURLE_OK != ret) \ | 542 | if (CURLE_OK != ret) \ |
543 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ | 543 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ |
544 | _ ("%s failed at %s:%d: `%s'\n"), \ | 544 | _ ("%s failed at %s:%d: `%s'\n"), \ |
545 | "curl_easy_setopt", \ | 545 | "curl_easy_setopt", \ |
546 | __FILE__, \ | 546 | __FILE__, \ |
547 | __LINE__, \ | 547 | __LINE__, \ |
548 | curl_easy_strerror (ret)); \ | 548 | curl_easy_strerror (ret)); \ |
549 | } while (0) | 549 | } while (0) |
550 | 550 | ||
551 | 551 | ||
@@ -790,7 +790,7 @@ clean_up () | |||
790 | curl_easy_cleanup (curl); | 790 | curl_easy_cleanup (curl); |
791 | curl = NULL; | 791 | curl = NULL; |
792 | } | 792 | } |
793 | GNUNET_free_non_null (current_url); | 793 | GNUNET_free (current_url); |
794 | current_url = NULL; | 794 | current_url = NULL; |
795 | stat_bytes_downloaded = 0; | 795 | stat_bytes_downloaded = 0; |
796 | stat_download_in_progress = GNUNET_NO; | 796 | stat_download_in_progress = GNUNET_NO; |
@@ -1418,11 +1418,12 @@ load_hostlist_file () | |||
1418 | 1418 | ||
1419 | counter = 0; | 1419 | counter = 0; |
1420 | struct GNUNET_BIO_ReadSpec rs[] = { | 1420 | struct GNUNET_BIO_ReadSpec rs[] = { |
1421 | GNUNET_BIO_read_spec_int32 ("times used", (int32_t *)×_used), | 1421 | GNUNET_BIO_read_spec_int32 ("times used", (int32_t *) ×_used), |
1422 | GNUNET_BIO_read_spec_int64 ("quality", (int64_t *) &quality), | 1422 | GNUNET_BIO_read_spec_int64 ("quality", (int64_t *) &quality), |
1423 | GNUNET_BIO_read_spec_int64 ("last used", (int64_t *) &last_used), | 1423 | GNUNET_BIO_read_spec_int64 ("last used", (int64_t *) &last_used), |
1424 | GNUNET_BIO_read_spec_int64 ("created", (int64_t *) &created), | 1424 | GNUNET_BIO_read_spec_int64 ("created", (int64_t *) &created), |
1425 | GNUNET_BIO_read_spec_int32 ("hellos returned", (int32_t *) &hellos_returned), | 1425 | GNUNET_BIO_read_spec_int32 ("hellos returned", |
1426 | (int32_t *) &hellos_returned), | ||
1426 | GNUNET_BIO_read_spec_end (), | 1427 | GNUNET_BIO_read_spec_end (), |
1427 | }; | 1428 | }; |
1428 | while ((GNUNET_OK == GNUNET_BIO_read_string (rh, "url", &uri, MAX_URL_LEN)) && | 1429 | while ((GNUNET_OK == GNUNET_BIO_read_string (rh, "url", &uri, MAX_URL_LEN)) && |
@@ -1460,7 +1461,7 @@ load_hostlist_file () | |||
1460 | linked_list_size, | 1461 | linked_list_size, |
1461 | GNUNET_NO); | 1462 | GNUNET_NO); |
1462 | 1463 | ||
1463 | GNUNET_free_non_null (uri); | 1464 | GNUNET_free (uri); |
1464 | emsg = NULL; | 1465 | emsg = NULL; |
1465 | (void) GNUNET_BIO_read_close (rh, &emsg); | 1466 | (void) GNUNET_BIO_read_close (rh, &emsg); |
1466 | if (emsg != NULL) | 1467 | if (emsg != NULL) |
@@ -1527,7 +1528,8 @@ save_hostlist_file (int shutdown) | |||
1527 | { | 1528 | { |
1528 | struct GNUNET_BIO_WriteSpec ws[] = { | 1529 | struct GNUNET_BIO_WriteSpec ws[] = { |
1529 | GNUNET_BIO_write_spec_string ("hostlist uri", pos->hostlist_uri), | 1530 | GNUNET_BIO_write_spec_string ("hostlist uri", pos->hostlist_uri), |
1530 | GNUNET_BIO_write_spec_int32 ("times used", (int32_t *) &pos->times_used), | 1531 | GNUNET_BIO_write_spec_int32 ("times used", |
1532 | (int32_t *) &pos->times_used), | ||
1531 | GNUNET_BIO_write_spec_int64 ("quality", (int64_t *) &pos->quality), | 1533 | GNUNET_BIO_write_spec_int64 ("quality", (int64_t *) &pos->quality), |
1532 | GNUNET_BIO_write_spec_int64 ( | 1534 | GNUNET_BIO_write_spec_int64 ( |
1533 | "last usage", | 1535 | "last usage", |
@@ -1657,15 +1659,15 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c, | |||
1657 | GNUNET_free (proxytype_str); | 1659 | GNUNET_free (proxytype_str); |
1658 | GNUNET_free (proxy); | 1660 | GNUNET_free (proxy); |
1659 | proxy = NULL; | 1661 | proxy = NULL; |
1660 | GNUNET_free_non_null (proxy_username); | 1662 | GNUNET_free (proxy_username); |
1661 | proxy_username = NULL; | 1663 | proxy_username = NULL; |
1662 | GNUNET_free_non_null (proxy_password); | 1664 | GNUNET_free (proxy_password); |
1663 | proxy_password = NULL; | 1665 | proxy_password = NULL; |
1664 | 1666 | ||
1665 | return GNUNET_SYSERR; | 1667 | return GNUNET_SYSERR; |
1666 | } | 1668 | } |
1667 | } | 1669 | } |
1668 | GNUNET_free_non_null (proxytype_str); | 1670 | GNUNET_free (proxytype_str); |
1669 | } | 1671 | } |
1670 | 1672 | ||
1671 | stat_learning = learn; | 1673 | stat_learning = learn; |
@@ -1786,11 +1788,11 @@ GNUNET_HOSTLIST_client_stop () | |||
1786 | ti_check_download = NULL; | 1788 | ti_check_download = NULL; |
1787 | curl_global_cleanup (); | 1789 | curl_global_cleanup (); |
1788 | } | 1790 | } |
1789 | GNUNET_free_non_null (proxy); | 1791 | GNUNET_free (proxy); |
1790 | proxy = NULL; | 1792 | proxy = NULL; |
1791 | GNUNET_free_non_null (proxy_username); | 1793 | GNUNET_free (proxy_username); |
1792 | proxy_username = NULL; | 1794 | proxy_username = NULL; |
1793 | GNUNET_free_non_null (proxy_password); | 1795 | GNUNET_free (proxy_password); |
1794 | proxy_password = NULL; | 1796 | proxy_password = NULL; |
1795 | if (NULL != pi) | 1797 | if (NULL != pi) |
1796 | { | 1798 | { |
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c index 999730e3e..b6c0495c0 100644 --- a/src/hostlist/gnunet-daemon-hostlist_server.c +++ b/src/hostlist/gnunet-daemon-hostlist_server.c | |||
@@ -229,7 +229,7 @@ host_processor (void *cls, | |||
229 | { | 229 | { |
230 | GNUNET_assert (NULL == peer); | 230 | GNUNET_assert (NULL == peer); |
231 | builder->pitr = NULL; | 231 | builder->pitr = NULL; |
232 | GNUNET_free_non_null (builder->data); | 232 | GNUNET_free (builder->data); |
233 | GNUNET_free (builder); | 233 | GNUNET_free (builder); |
234 | builder = NULL; | 234 | builder = NULL; |
235 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 235 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -534,7 +534,7 @@ process_notify (void *cls, | |||
534 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); | 534 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); |
535 | builder->pitr = NULL; | 535 | builder->pitr = NULL; |
536 | } | 536 | } |
537 | GNUNET_free_non_null (builder->data); | 537 | GNUNET_free (builder->data); |
538 | builder->size = 0; | 538 | builder->size = 0; |
539 | builder->data = NULL; | 539 | builder->data = NULL; |
540 | } | 540 | } |
@@ -886,7 +886,7 @@ GNUNET_HOSTLIST_server_stop () | |||
886 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); | 886 | GNUNET_PEERINFO_iterate_cancel (builder->pitr); |
887 | builder->pitr = NULL; | 887 | builder->pitr = NULL; |
888 | } | 888 | } |
889 | GNUNET_free_non_null (builder->data); | 889 | GNUNET_free (builder->data); |
890 | GNUNET_free (builder); | 890 | GNUNET_free (builder); |
891 | builder = NULL; | 891 | builder = NULL; |
892 | } | 892 | } |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index d10924eac..063db2f99 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c | |||
@@ -136,8 +136,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
136 | 136 | ||
137 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 137 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
138 | p->cfg = GNUNET_CONFIGURATION_create (); | 138 | p->cfg = GNUNET_CONFIGURATION_create (); |
139 | p->arm_proc = GNUNET_OS_start_process (GNUNET_YES, | 139 | p->arm_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
140 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 140 | | GNUNET_OS_USE_PIPE_CONTROL, |
141 | NULL, | 141 | NULL, |
142 | NULL, | 142 | NULL, |
143 | NULL, | 143 | NULL, |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index a45721521..a0656f770 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -390,7 +390,7 @@ handle_ad_arrive (void *cls, | |||
390 | expected_uri, | 390 | expected_uri, |
391 | current_adv_uri); | 391 | current_adv_uri); |
392 | GNUNET_free (expected_uri); | 392 | GNUNET_free (expected_uri); |
393 | GNUNET_free_non_null (hostname); | 393 | GNUNET_free (hostname); |
394 | } | 394 | } |
395 | 395 | ||
396 | 396 | ||
@@ -412,7 +412,8 @@ setup_learn_peer (struct PeerContext *p, | |||
412 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 412 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
413 | p->cfg = GNUNET_CONFIGURATION_create (); | 413 | p->cfg = GNUNET_CONFIGURATION_create (); |
414 | p->arm_proc = | 414 | p->arm_proc = |
415 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 415 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
416 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
416 | NULL, NULL, NULL, | 417 | NULL, NULL, NULL, |
417 | binary, | 418 | binary, |
418 | "gnunet-service-arm", | 419 | "gnunet-service-arm", |
@@ -459,8 +460,8 @@ setup_adv_peer (struct PeerContext *p, | |||
459 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 460 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
460 | p->cfg = GNUNET_CONFIGURATION_create (); | 461 | p->cfg = GNUNET_CONFIGURATION_create (); |
461 | p->arm_proc = | 462 | p->arm_proc = |
462 | GNUNET_OS_start_process (GNUNET_YES, | 463 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
463 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 464 | | GNUNET_OS_USE_PIPE_CONTROL, |
464 | NULL, NULL, NULL, | 465 | NULL, NULL, NULL, |
465 | binary, | 466 | binary, |
466 | "gnunet-service-arm", | 467 | "gnunet-service-arm", |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 657b85fd8..321f96f3d 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -105,8 +105,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
105 | 105 | ||
106 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 106 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
107 | p->cfg = GNUNET_CONFIGURATION_create (); | 107 | p->cfg = GNUNET_CONFIGURATION_create (); |
108 | p->arm_proc = GNUNET_OS_start_process (GNUNET_YES, | 108 | p->arm_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
109 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 109 | | GNUNET_OS_USE_PIPE_CONTROL, |
110 | NULL, | 110 | NULL, |
111 | NULL, | 111 | NULL, |
112 | NULL, | 112 | NULL, |
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index cf44afd1f..d0f5546f3 100644 --- a/src/identity/gnunet-identity.c +++ b/src/identity/gnunet-identity.c | |||
@@ -406,7 +406,8 @@ run (void *cls, | |||
406 | GNUNET_STRINGS_string_to_data (privkey_ego, | 406 | GNUNET_STRINGS_string_to_data (privkey_ego, |
407 | strlen (privkey_ego), | 407 | strlen (privkey_ego), |
408 | &pk, | 408 | &pk, |
409 | sizeof(struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 409 | sizeof(struct |
410 | GNUNET_CRYPTO_EcdsaPrivateKey)); | ||
410 | create_op = | 411 | create_op = |
411 | GNUNET_IDENTITY_create (sh, | 412 | GNUNET_IDENTITY_create (sh, |
412 | create_ego, | 413 | create_ego, |
@@ -452,7 +453,8 @@ main (int argc, char *const *argv) | |||
452 | GNUNET_GETOPT_option_string ('P', | 453 | GNUNET_GETOPT_option_string ('P', |
453 | "privkey", | 454 | "privkey", |
454 | "PRIVATE_KEY", | 455 | "PRIVATE_KEY", |
455 | gettext_noop ("set the private key for the identity to PRIVATE_KEY (use together with -C)"), | 456 | gettext_noop ( |
457 | "set the private key for the identity to PRIVATE_KEY (use together with -C)"), | ||
456 | &privkey_ego), | 458 | &privkey_ego), |
457 | GNUNET_GETOPT_option_flag ('d', | 459 | GNUNET_GETOPT_option_flag ('d', |
458 | "display", | 460 | "display", |
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c index 5d17ac5d5..f7aca1655 100644 --- a/src/identity/identity_api.c +++ b/src/identity/identity_api.c | |||
@@ -150,9 +150,9 @@ struct GNUNET_IDENTITY_Handle | |||
150 | /** | 150 | /** |
151 | * Obtain the ego representing 'anonymous' users. | 151 | * Obtain the ego representing 'anonymous' users. |
152 | * | 152 | * |
153 | * @return handle for the anonymous user, must not be freed | 153 | * @return handle for the anonymous user, MUST NOT be freed |
154 | */ | 154 | */ |
155 | const struct GNUNET_IDENTITY_Ego * | 155 | struct GNUNET_IDENTITY_Ego * |
156 | GNUNET_IDENTITY_ego_get_anonymous () | 156 | GNUNET_IDENTITY_ego_get_anonymous () |
157 | { | 157 | { |
158 | static struct GNUNET_IDENTITY_Ego anon; | 158 | static struct GNUNET_IDENTITY_Ego anon; |
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 009a01f16..02e42d03f 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c | |||
@@ -1065,7 +1065,8 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle, | |||
1065 | GNUNET_STRINGS_string_to_data (privkey, | 1065 | GNUNET_STRINGS_string_to_data (privkey, |
1066 | strlen (privkey), | 1066 | strlen (privkey), |
1067 | &pk, | 1067 | &pk, |
1068 | sizeof(struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 1068 | sizeof(struct |
1069 | GNUNET_CRYPTO_EcdsaPrivateKey)); | ||
1069 | pk_ptr = &pk; | 1070 | pk_ptr = &pk; |
1070 | } | 1071 | } |
1071 | else | 1072 | else |
@@ -1422,7 +1423,7 @@ libgnunet_plugin_rest_identity_done (void *cls) | |||
1422 | 1423 | ||
1423 | plugin->cfg = NULL; | 1424 | plugin->cfg = NULL; |
1424 | 1425 | ||
1425 | GNUNET_free_non_null (allow_methods); | 1426 | GNUNET_free (allow_methods); |
1426 | GNUNET_free (api); | 1427 | GNUNET_free (api); |
1427 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity REST plugin is finished\n"); | 1428 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity REST plugin is finished\n"); |
1428 | return NULL; | 1429 | return NULL; |
diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h index 687334c1c..e49ce1354 100644 --- a/src/include/gnunet_bio_lib.h +++ b/src/include/gnunet_bio_lib.h | |||
@@ -138,9 +138,9 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, | |||
138 | * @param f address of float to read | 138 | * @param f address of float to read |
139 | */ | 139 | */ |
140 | int | 140 | int |
141 | GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, | 141 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, |
142 | const char *what, | 142 | const char *what, |
143 | float *f); | 143 | float *f); |
144 | 144 | ||
145 | 145 | ||
146 | /** | 146 | /** |
@@ -151,10 +151,9 @@ GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, | |||
151 | * @param f address of double to read | 151 | * @param f address of double to read |
152 | */ | 152 | */ |
153 | int | 153 | int |
154 | GNUNET_BIO_read_double(struct GNUNET_BIO_ReadHandle *h, | 154 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, |
155 | const char *what, | 155 | const char *what, |
156 | double *f); | 156 | double *f); |
157 | |||
158 | 157 | ||
159 | 158 | ||
160 | /** | 159 | /** |
@@ -171,7 +170,6 @@ GNUNET_BIO_read_int32 (struct GNUNET_BIO_ReadHandle *h, | |||
171 | int32_t *i); | 170 | int32_t *i); |
172 | 171 | ||
173 | 172 | ||
174 | |||
175 | /** | 173 | /** |
176 | * Read an (u)int64_t. | 174 | * Read an (u)int64_t. |
177 | * | 175 | * |
@@ -186,7 +184,6 @@ GNUNET_BIO_read_int64 (struct GNUNET_BIO_ReadHandle *h, | |||
186 | int64_t *i); | 184 | int64_t *i); |
187 | 185 | ||
188 | 186 | ||
189 | |||
190 | /****************************** WRITING API *******************************/ | 187 | /****************************** WRITING API *******************************/ |
191 | 188 | ||
192 | /** | 189 | /** |
@@ -310,9 +307,9 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, | |||
310 | * @param f float to write (must be a variable) | 307 | * @param f float to write (must be a variable) |
311 | */ | 308 | */ |
312 | int | 309 | int |
313 | GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, | 310 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, |
314 | const char *what, | 311 | const char *what, |
315 | float f); | 312 | float f); |
316 | 313 | ||
317 | /** | 314 | /** |
318 | * Write a double. | 315 | * Write a double. |
@@ -322,9 +319,9 @@ GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, | |||
322 | * @param f double to write (must be a variable) | 319 | * @param f double to write (must be a variable) |
323 | */ | 320 | */ |
324 | int | 321 | int |
325 | GNUNET_BIO_write_double(struct GNUNET_BIO_WriteHandle *h, | 322 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, |
326 | const char *what, | 323 | const char *what, |
327 | double f); | 324 | double f); |
328 | 325 | ||
329 | 326 | ||
330 | /** | 327 | /** |
@@ -490,7 +487,7 @@ GNUNET_BIO_read_spec_int64 (const char *what, | |||
490 | * @param f address of float to read | 487 | * @param f address of float to read |
491 | */ | 488 | */ |
492 | struct GNUNET_BIO_ReadSpec | 489 | struct GNUNET_BIO_ReadSpec |
493 | GNUNET_BIO_read_spec_float(const char *what, float *f); | 490 | GNUNET_BIO_read_spec_float (const char *what, float *f); |
494 | 491 | ||
495 | 492 | ||
496 | /** | 493 | /** |
@@ -500,7 +497,7 @@ GNUNET_BIO_read_spec_float(const char *what, float *f); | |||
500 | * @param f address of double to read | 497 | * @param f address of double to read |
501 | */ | 498 | */ |
502 | struct GNUNET_BIO_ReadSpec | 499 | struct GNUNET_BIO_ReadSpec |
503 | GNUNET_BIO_read_spec_double(const char *what, double *f); | 500 | GNUNET_BIO_read_spec_double (const char *what, double *f); |
504 | 501 | ||
505 | 502 | ||
506 | /** | 503 | /** |
@@ -647,7 +644,7 @@ GNUNET_BIO_write_spec_int64 (const char *what, | |||
647 | * @return the write spec | 644 | * @return the write spec |
648 | */ | 645 | */ |
649 | struct GNUNET_BIO_WriteSpec | 646 | struct GNUNET_BIO_WriteSpec |
650 | GNUNET_BIO_write_spec_float(const char *what, float *f); | 647 | GNUNET_BIO_write_spec_float (const char *what, float *f); |
651 | 648 | ||
652 | 649 | ||
653 | /** | 650 | /** |
@@ -658,7 +655,7 @@ GNUNET_BIO_write_spec_float(const char *what, float *f); | |||
658 | * @return the write spec | 655 | * @return the write spec |
659 | */ | 656 | */ |
660 | struct GNUNET_BIO_WriteSpec | 657 | struct GNUNET_BIO_WriteSpec |
661 | GNUNET_BIO_write_spec_double(const char *what, double *f); | 658 | GNUNET_BIO_write_spec_double (const char *what, double *f); |
662 | 659 | ||
663 | 660 | ||
664 | /** | 661 | /** |
diff --git a/src/include/gnunet_buffer_lib.h b/src/include/gnunet_buffer_lib.h index e23536ab2..e09ec130a 100644 --- a/src/include/gnunet_buffer_lib.h +++ b/src/include/gnunet_buffer_lib.h | |||
@@ -147,7 +147,7 @@ GNUNET_buffer_write_fstr (struct GNUNET_Buffer *buf, const char *fmt, ...); | |||
147 | */ | 147 | */ |
148 | void | 148 | void |
149 | GNUNET_buffer_write_vfstr (struct GNUNET_Buffer *buf, const char *fmt, va_list | 149 | GNUNET_buffer_write_vfstr (struct GNUNET_Buffer *buf, const char *fmt, va_list |
150 | args); | 150 | args); |
151 | 151 | ||
152 | 152 | ||
153 | /** | 153 | /** |
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 34f419a49..91d4a5bd4 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -345,7 +345,9 @@ struct GNUNET_AsyncScopeSave | |||
345 | * #GNUNET_NO to stop iteration with no error, | 345 | * #GNUNET_NO to stop iteration with no error, |
346 | * #GNUNET_SYSERR to abort iteration with error! | 346 | * #GNUNET_SYSERR to abort iteration with error! |
347 | */ | 347 | */ |
348 | typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename); | 348 | typedef int |
349 | (*GNUNET_FileNameCallback) (void *cls, | ||
350 | const char *filename); | ||
349 | 351 | ||
350 | 352 | ||
351 | /** | 353 | /** |
@@ -353,7 +355,8 @@ typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename); | |||
353 | * | 355 | * |
354 | * @param cls Closure. | 356 | * @param cls Closure. |
355 | */ | 357 | */ |
356 | typedef void (*GNUNET_ContinuationCallback) (void *cls); | 358 | typedef void |
359 | (*GNUNET_ContinuationCallback) (void *cls); | ||
357 | 360 | ||
358 | 361 | ||
359 | /** | 362 | /** |
@@ -368,10 +371,11 @@ typedef void (*GNUNET_ContinuationCallback) (void *cls); | |||
368 | * @param data_size | 371 | * @param data_size |
369 | * Size of @a data. | 372 | * Size of @a data. |
370 | */ | 373 | */ |
371 | typedef void (*GNUNET_ResultCallback) (void *cls, | 374 | typedef void |
372 | int64_t result_code, | 375 | (*GNUNET_ResultCallback) (void *cls, |
373 | const void *data, | 376 | int64_t result_code, |
374 | uint16_t data_size); | 377 | const void *data, |
378 | uint16_t data_size); | ||
375 | 379 | ||
376 | 380 | ||
377 | /* ****************************** logging ***************************** */ | 381 | /* ****************************** logging ***************************** */ |
@@ -453,11 +457,11 @@ __attribute__ ((format (printf, 2, 3))); | |||
453 | __extension__ ({ \ | 457 | __extension__ ({ \ |
454 | int _gnunet_boolean_var_; \ | 458 | int _gnunet_boolean_var_; \ |
455 | if (expr) \ | 459 | if (expr) \ |
456 | _gnunet_boolean_var_ = 1; \ | 460 | _gnunet_boolean_var_ = 1; \ |
457 | else \ | 461 | else \ |
458 | _gnunet_boolean_var_ = 0; \ | 462 | _gnunet_boolean_var_ = 0; \ |
459 | _gnunet_boolean_var_; \ | 463 | _gnunet_boolean_var_; \ |
460 | }) | 464 | }) |
461 | #define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1)) | 465 | #define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 1)) |
462 | #define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0)) | 466 | #define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR (expr), 0)) |
463 | #else | 467 | #else |
@@ -495,12 +499,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
495 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ | 499 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ |
496 | { \ | 500 | { \ |
497 | if (GN_UNLIKELY (log_call_enabled == -1)) \ | 501 | if (GN_UNLIKELY (log_call_enabled == -1)) \ |
498 | log_call_enabled = \ | 502 | log_call_enabled = \ |
499 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ | 503 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ |
500 | (comp), \ | 504 | (comp), \ |
501 | __FILE__, \ | 505 | __FILE__, \ |
502 | __FUNCTION__, \ | 506 | __FUNCTION__, \ |
503 | __LINE__); \ | 507 | __LINE__); \ |
504 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ | 508 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ |
505 | { \ | 509 | { \ |
506 | GNUNET_log_skip (-1, GNUNET_NO); \ | 510 | GNUNET_log_skip (-1, GNUNET_NO); \ |
@@ -508,7 +512,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
508 | else \ | 512 | else \ |
509 | { \ | 513 | { \ |
510 | if (GN_UNLIKELY (log_call_enabled)) \ | 514 | if (GN_UNLIKELY (log_call_enabled)) \ |
511 | GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \ | 515 | GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \ |
512 | } \ | 516 | } \ |
513 | } \ | 517 | } \ |
514 | } while (0) | 518 | } while (0) |
@@ -521,12 +525,12 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
521 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ | 525 | ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ |
522 | { \ | 526 | { \ |
523 | if (GN_UNLIKELY (log_call_enabled == -1)) \ | 527 | if (GN_UNLIKELY (log_call_enabled == -1)) \ |
524 | log_call_enabled = \ | 528 | log_call_enabled = \ |
525 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ | 529 | GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), \ |
526 | NULL, \ | 530 | NULL, \ |
527 | __FILE__, \ | 531 | __FILE__, \ |
528 | __FUNCTION__, \ | 532 | __FUNCTION__, \ |
529 | __LINE__); \ | 533 | __LINE__); \ |
530 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ | 534 | if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ |
531 | { \ | 535 | { \ |
532 | GNUNET_log_skip (-1, GNUNET_NO); \ | 536 | GNUNET_log_skip (-1, GNUNET_NO); \ |
@@ -534,7 +538,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | |||
534 | else \ | 538 | else \ |
535 | { \ | 539 | { \ |
536 | if (GN_UNLIKELY (log_call_enabled)) \ | 540 | if (GN_UNLIKELY (log_call_enabled)) \ |
537 | GNUNET_log_nocheck ((kind), __VA_ARGS__); \ | 541 | GNUNET_log_nocheck ((kind), __VA_ARGS__); \ |
538 | } \ | 542 | } \ |
539 | } \ | 543 | } \ |
540 | } while (0) | 544 | } while (0) |
@@ -766,6 +770,12 @@ GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p); | |||
766 | 770 | ||
767 | 771 | ||
768 | /** | 772 | /** |
773 | * Forward declaration to make compiler happy depending on include order. | ||
774 | */ | ||
775 | struct GNUNET_PeerIdentity; | ||
776 | |||
777 | |||
778 | /** | ||
769 | * @ingroup logging | 779 | * @ingroup logging |
770 | * Convert a peer identity to a string (for printing debug messages). | 780 | * Convert a peer identity to a string (for printing debug messages). |
771 | * This is one of the very few calls in the entire API that is | 781 | * This is one of the very few calls in the entire API that is |
@@ -1271,6 +1281,7 @@ GNUNET_is_zero_ (const void *a, | |||
1271 | #define GNUNET_malloc_large(size) \ | 1281 | #define GNUNET_malloc_large(size) \ |
1272 | GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__) | 1282 | GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__) |
1273 | 1283 | ||
1284 | |||
1274 | /** | 1285 | /** |
1275 | * @ingroup memory | 1286 | * @ingroup memory |
1276 | * Wrapper around realloc. Reallocates size bytes of memory. | 1287 | * Wrapper around realloc. Reallocates size bytes of memory. |
@@ -1283,6 +1294,7 @@ GNUNET_is_zero_ (const void *a, | |||
1283 | #define GNUNET_realloc(ptr, size) \ | 1294 | #define GNUNET_realloc(ptr, size) \ |
1284 | GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__) | 1295 | GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__) |
1285 | 1296 | ||
1297 | |||
1286 | /** | 1298 | /** |
1287 | * @ingroup memory | 1299 | * @ingroup memory |
1288 | * Wrapper around free. Frees the memory referred to by ptr. | 1300 | * Wrapper around free. Frees the memory referred to by ptr. |
@@ -1290,40 +1302,27 @@ GNUNET_is_zero_ (const void *a, | |||
1290 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz. | 1302 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz. |
1291 | * | 1303 | * |
1292 | * @param ptr location where to free the memory. ptr must have | 1304 | * @param ptr location where to free the memory. ptr must have |
1293 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. | 1305 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed. |
1294 | */ | 1306 | */ |
1295 | #define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__) | 1307 | #define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__) |
1296 | 1308 | ||
1309 | |||
1297 | /** | 1310 | /** |
1298 | * @ingroup memory | 1311 | * @ingroup memory |
1299 | * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL. | 1312 | * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL. |
1300 | * Note that it is generally better to free memory that was | 1313 | * Note that it is generally better to free memory that was |
1301 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free. | 1314 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free. |
1302 | * | 1315 | * |
1316 | * @a ptr will be set to NULL. Use #GNUNET_free_nz() if @a ptr is not an L-value. | ||
1317 | * | ||
1303 | * @param ptr location where to free the memory. ptr must have | 1318 | * @param ptr location where to free the memory. ptr must have |
1304 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. | 1319 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed. |
1305 | */ | 1320 | */ |
1306 | #define GNUNET_free(ptr) do { \ | 1321 | #define GNUNET_free(ptr) do { \ |
1307 | GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ | 1322 | GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ |
1308 | ptr = NULL; \ | 1323 | ptr = NULL; \ |
1309 | } while (0) | 1324 | } while (0) |
1310 | 1325 | ||
1311 | /** | ||
1312 | * @ingroup memory | ||
1313 | * Free the memory pointed to by ptr if ptr is not NULL. | ||
1314 | * Equivalent to `if (NULL != ptr) GNUNET_free(ptr)`. | ||
1315 | * | ||
1316 | * @param ptr the location in memory to free | ||
1317 | */ | ||
1318 | #define GNUNET_free_non_null(ptr) \ | ||
1319 | do \ | ||
1320 | { \ | ||
1321 | void *__x__ = ptr; \ | ||
1322 | if (NULL != __x__) \ | ||
1323 | { \ | ||
1324 | GNUNET_free (__x__); \ | ||
1325 | } \ | ||
1326 | } while (0) | ||
1327 | 1326 | ||
1328 | /** | 1327 | /** |
1329 | * @ingroup memory | 1328 | * @ingroup memory |
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 302429430..f782509eb 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -101,6 +101,18 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
101 | 101 | ||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Return GNUnet's default configuration. A new configuration is allocated | ||
105 | * each time and it's up to the caller to destroy it when done. This function | ||
106 | * returns GNUnet's configuration even when #GNUNET_OS_init has been called | ||
107 | * with a value different from #GNUNET_OS_project_data_default. | ||
108 | * | ||
109 | * @return a freshly allocated configuration | ||
110 | */ | ||
111 | struct GNUNET_CONFIGURATION_Handle * | ||
112 | GNUNET_CONFIGURATION_default (void); | ||
113 | |||
114 | |||
115 | /** | ||
104 | * Parse a configuration file, add all of the options in the | 116 | * Parse a configuration file, add all of the options in the |
105 | * file to the configuration environment. | 117 | * file to the configuration environment. |
106 | * | 118 | * |
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index e1572635f..8b3cbc7e6 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h | |||
@@ -47,7 +47,8 @@ extern "C" | |||
47 | * so that at least one maximum-size message can be send roughly once | 47 | * so that at least one maximum-size message can be send roughly once |
48 | * per minute. | 48 | * per minute. |
49 | */ | 49 | */ |
50 | #define GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT GNUNET_BANDWIDTH_value_init (1024) | 50 | #define GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT GNUNET_BANDWIDTH_value_init (1024 \ |
51 | * 1024) | ||
51 | 52 | ||
52 | /** | 53 | /** |
53 | * After how long do we consider a connection to a peer dead | 54 | * After how long do we consider a connection to a peer dead |
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index f3325a064..8d8cbf4c1 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h | |||
@@ -2158,9 +2158,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2158 | (element)->next = (head); \ | 2158 | (element)->next = (head); \ |
2159 | (element)->prev = NULL; \ | 2159 | (element)->prev = NULL; \ |
2160 | if ((tail) == NULL) \ | 2160 | if ((tail) == NULL) \ |
2161 | (tail) = element; \ | 2161 | (tail) = element; \ |
2162 | else \ | 2162 | else \ |
2163 | (head)->prev = element; \ | 2163 | (head)->prev = element; \ |
2164 | (head) = (element); \ | 2164 | (head) = (element); \ |
2165 | } while (0) | 2165 | } while (0) |
2166 | 2166 | ||
@@ -2182,9 +2182,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2182 | (element)->prev = (tail); \ | 2182 | (element)->prev = (tail); \ |
2183 | (element)->next = NULL; \ | 2183 | (element)->next = NULL; \ |
2184 | if ((head) == NULL) \ | 2184 | if ((head) == NULL) \ |
2185 | (head) = element; \ | 2185 | (head) = element; \ |
2186 | else \ | 2186 | else \ |
2187 | (tail)->next = element; \ | 2187 | (tail)->next = element; \ |
2188 | (tail) = (element); \ | 2188 | (tail) = (element); \ |
2189 | } while (0) | 2189 | } while (0) |
2190 | 2190 | ||
@@ -2216,9 +2216,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2216 | (other)->next = (element); \ | 2216 | (other)->next = (element); \ |
2217 | } \ | 2217 | } \ |
2218 | if (NULL == (element)->next) \ | 2218 | if (NULL == (element)->next) \ |
2219 | (tail) = (element); \ | 2219 | (tail) = (element); \ |
2220 | else \ | 2220 | else \ |
2221 | (element)->next->prev = (element); \ | 2221 | (element)->next->prev = (element); \ |
2222 | } while (0) | 2222 | } while (0) |
2223 | 2223 | ||
2224 | 2224 | ||
@@ -2249,9 +2249,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2249 | (other)->prev = (element); \ | 2249 | (other)->prev = (element); \ |
2250 | } \ | 2250 | } \ |
2251 | if (NULL == (element)->prev) \ | 2251 | if (NULL == (element)->prev) \ |
2252 | (head) = (element); \ | 2252 | (head) = (element); \ |
2253 | else \ | 2253 | else \ |
2254 | (element)->prev->next = (element); \ | 2254 | (element)->prev->next = (element); \ |
2255 | } while (0) | 2255 | } while (0) |
2256 | 2256 | ||
2257 | 2257 | ||
@@ -2275,13 +2275,13 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2275 | GNUNET_assert (((element)->prev != NULL) || ((head) == (element))); \ | 2275 | GNUNET_assert (((element)->prev != NULL) || ((head) == (element))); \ |
2276 | GNUNET_assert (((element)->next != NULL) || ((tail) == (element))); \ | 2276 | GNUNET_assert (((element)->next != NULL) || ((tail) == (element))); \ |
2277 | if ((element)->prev == NULL) \ | 2277 | if ((element)->prev == NULL) \ |
2278 | (head) = (element)->next; \ | 2278 | (head) = (element)->next; \ |
2279 | else \ | 2279 | else \ |
2280 | (element)->prev->next = (element)->next; \ | 2280 | (element)->prev->next = (element)->next; \ |
2281 | if ((element)->next == NULL) \ | 2281 | if ((element)->next == NULL) \ |
2282 | (tail) = (element)->prev; \ | 2282 | (tail) = (element)->prev; \ |
2283 | else \ | 2283 | else \ |
2284 | (element)->next->prev = (element)->prev; \ | 2284 | (element)->next->prev = (element)->prev; \ |
2285 | (element)->next = NULL; \ | 2285 | (element)->next = NULL; \ |
2286 | (element)->prev = NULL; \ | 2286 | (element)->prev = NULL; \ |
2287 | } while (0) | 2287 | } while (0) |
@@ -2308,9 +2308,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2308 | (element)->next_ ## mdll = (head); \ | 2308 | (element)->next_ ## mdll = (head); \ |
2309 | (element)->prev_ ## mdll = NULL; \ | 2309 | (element)->prev_ ## mdll = NULL; \ |
2310 | if ((tail) == NULL) \ | 2310 | if ((tail) == NULL) \ |
2311 | (tail) = element; \ | 2311 | (tail) = element; \ |
2312 | else \ | 2312 | else \ |
2313 | (head)->prev_ ## mdll = element; \ | 2313 | (head)->prev_ ## mdll = element; \ |
2314 | (head) = (element); \ | 2314 | (head) = (element); \ |
2315 | } while (0) | 2315 | } while (0) |
2316 | 2316 | ||
@@ -2333,9 +2333,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2333 | (element)->prev_ ## mdll = (tail); \ | 2333 | (element)->prev_ ## mdll = (tail); \ |
2334 | (element)->next_ ## mdll = NULL; \ | 2334 | (element)->next_ ## mdll = NULL; \ |
2335 | if ((head) == NULL) \ | 2335 | if ((head) == NULL) \ |
2336 | (head) = element; \ | 2336 | (head) = element; \ |
2337 | else \ | 2337 | else \ |
2338 | (tail)->next_ ## mdll = element; \ | 2338 | (tail)->next_ ## mdll = element; \ |
2339 | (tail) = (element); \ | 2339 | (tail) = (element); \ |
2340 | } while (0) | 2340 | } while (0) |
2341 | 2341 | ||
@@ -2368,9 +2368,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2368 | (other)->next_ ## mdll = (element); \ | 2368 | (other)->next_ ## mdll = (element); \ |
2369 | } \ | 2369 | } \ |
2370 | if (NULL == (element)->next_ ## mdll) \ | 2370 | if (NULL == (element)->next_ ## mdll) \ |
2371 | (tail) = (element); \ | 2371 | (tail) = (element); \ |
2372 | else \ | 2372 | else \ |
2373 | (element)->next_ ## mdll->prev_ ## mdll = (element); \ | 2373 | (element)->next_ ## mdll->prev_ ## mdll = (element); \ |
2374 | } while (0) | 2374 | } while (0) |
2375 | 2375 | ||
2376 | 2376 | ||
@@ -2402,9 +2402,9 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2402 | (other)->prev_ ## mdll = (element); \ | 2402 | (other)->prev_ ## mdll = (element); \ |
2403 | } \ | 2403 | } \ |
2404 | if (NULL == (element)->prev_ ## mdll) \ | 2404 | if (NULL == (element)->prev_ ## mdll) \ |
2405 | (head) = (element); \ | 2405 | (head) = (element); \ |
2406 | else \ | 2406 | else \ |
2407 | (element)->prev_ ## mdll->next_ ## mdll = (element); \ | 2407 | (element)->prev_ ## mdll->next_ ## mdll = (element); \ |
2408 | } while (0) | 2408 | } while (0) |
2409 | 2409 | ||
2410 | 2410 | ||
@@ -2425,13 +2425,13 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2425 | GNUNET_assert (((element)->prev_ ## mdll != NULL) || ((head) == (element))); \ | 2425 | GNUNET_assert (((element)->prev_ ## mdll != NULL) || ((head) == (element))); \ |
2426 | GNUNET_assert (((element)->next_ ## mdll != NULL) || ((tail) == (element))); \ | 2426 | GNUNET_assert (((element)->next_ ## mdll != NULL) || ((tail) == (element))); \ |
2427 | if ((element)->prev_ ## mdll == NULL) \ | 2427 | if ((element)->prev_ ## mdll == NULL) \ |
2428 | (head) = (element)->next_ ## mdll; \ | 2428 | (head) = (element)->next_ ## mdll; \ |
2429 | else \ | 2429 | else \ |
2430 | (element)->prev_ ## mdll->next_ ## mdll = (element)->next_ ## mdll; \ | 2430 | (element)->prev_ ## mdll->next_ ## mdll = (element)->next_ ## mdll; \ |
2431 | if ((element)->next_ ## mdll == NULL) \ | 2431 | if ((element)->next_ ## mdll == NULL) \ |
2432 | (tail) = (element)->prev_ ## mdll; \ | 2432 | (tail) = (element)->prev_ ## mdll; \ |
2433 | else \ | 2433 | else \ |
2434 | (element)->next_ ## mdll->prev_ ## mdll = (element)->prev_ ## mdll; \ | 2434 | (element)->next_ ## mdll->prev_ ## mdll = (element)->prev_ ## mdll; \ |
2435 | (element)->next_ ## mdll = NULL; \ | 2435 | (element)->next_ ## mdll = NULL; \ |
2436 | (element)->prev_ ## mdll = NULL; \ | 2436 | (element)->prev_ ## mdll = NULL; \ |
2437 | } while (0) | 2437 | } while (0) |
@@ -2468,8 +2468,8 @@ GNUNET_CONTAINER_multihashmap32_iterator_destroy ( | |||
2468 | TYPE *pos; \ | 2468 | TYPE *pos; \ |
2469 | \ | 2469 | \ |
2470 | for (pos = head; NULL != pos; pos = pos->next) \ | 2470 | for (pos = head; NULL != pos; pos = pos->next) \ |
2471 | if (0 < comparator (comparator_cls, element, pos)) \ | 2471 | if (0 < comparator (comparator_cls, element, pos)) \ |
2472 | break; /* element < pos */ \ | 2472 | break; /* element < pos */ \ |
2473 | if (NULL == pos) /* => element > tail */ \ | 2473 | if (NULL == pos) /* => element > tail */ \ |
2474 | { \ | 2474 | { \ |
2475 | GNUNET_CONTAINER_DLL_insert_tail (head, tail, element); \ | 2475 | GNUNET_CONTAINER_DLL_insert_tail (head, tail, element); \ |
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 875cfa3bd..9de58d608 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h | |||
@@ -225,13 +225,9 @@ typedef void | |||
225 | * upon its completion. Note that the context will make use of the | 225 | * upon its completion. Note that the context will make use of the |
226 | * CURLOPT_PRIVATE facility of the CURL @a eh. | 226 | * CURLOPT_PRIVATE facility of the CURL @a eh. |
227 | * | 227 | * |
228 | * This function modifies the CURL handle to add the | ||
229 | * "Content-Type: application/json" header if @a add_json is set. | ||
230 | * | ||
231 | * @param ctx context to execute the job in | 228 | * @param ctx context to execute the job in |
232 | * @param eh curl easy handle for the request, will | 229 | * @param eh curl easy handle for the request, will |
233 | * be executed AND cleaned up | 230 | * be executed AND cleaned up |
234 | * @param add_json add "application/json" content type header | ||
235 | * @param jcc callback to invoke upon completion | 231 | * @param jcc callback to invoke upon completion |
236 | * @param jcc_cls closure for @a jcc | 232 | * @param jcc_cls closure for @a jcc |
237 | * @return NULL on error (in this case, @eh is still released!) | 233 | * @return NULL on error (in this case, @eh is still released!) |
@@ -239,13 +235,70 @@ typedef void | |||
239 | struct GNUNET_CURL_Job * | 235 | struct GNUNET_CURL_Job * |
240 | GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | 236 | GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, |
241 | CURL *eh, | 237 | CURL *eh, |
242 | int add_json, | ||
243 | GNUNET_CURL_JobCompletionCallback jcc, | 238 | GNUNET_CURL_JobCompletionCallback jcc, |
244 | void *jcc_cls); | 239 | void *jcc_cls); |
245 | 240 | ||
246 | 241 | ||
247 | /** | 242 | /** |
248 | * Schedule a CURL request to be executed and call the given @a jcc | 243 | * Schedule a CURL request to be executed and call the given @a jcc |
244 | * upon its completion. Note that the context will make use of the | ||
245 | * CURLOPT_PRIVATE facility of the CURL @a eh. | ||
246 | * | ||
247 | * This function modifies the CURL handle to add the | ||
248 | * "Content-Type: application/json" header. | ||
249 | * | ||
250 | * @param ctx context to execute the job in | ||
251 | * @param eh curl easy handle for the request, will | ||
252 | * be executed AND cleaned up | ||
253 | * @param jcc callback to invoke upon completion | ||
254 | * @param jcc_cls closure for @a jcc | ||
255 | * @return NULL on error (in this case, @eh is still released!) | ||
256 | */ | ||
257 | struct GNUNET_CURL_Job * | ||
258 | GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx, | ||
259 | CURL *eh, | ||
260 | GNUNET_CURL_JobCompletionCallback jcc, | ||
261 | void *jcc_cls); | ||
262 | |||
263 | |||
264 | /** | ||
265 | * Force use of the provided username and password | ||
266 | * for client authentication for all operations performed | ||
267 | * with @a ctx. | ||
268 | * | ||
269 | * @param ctx context to set authentication data for | ||
270 | * @param userpass string with "$USERNAME:$PASSWORD" | ||
271 | */ | ||
272 | void | ||
273 | GNUNET_CURL_set_userpass (struct GNUNET_CURL_Context *ctx, | ||
274 | const char *userpass); | ||
275 | |||
276 | |||
277 | /** | ||
278 | * Force use of the provided TLS client certificate | ||
279 | * for client authentication for all operations performed | ||
280 | * with @a ctx. | ||
281 | * | ||
282 | * Note that if the provided information is incorrect, | ||
283 | * the earliest operation that could fail is | ||
284 | * #GNUNET_CURL_job_add() or #GNUNET_CURL_job_add2()! | ||
285 | * | ||
286 | * @param ctx context to set authentication data for | ||
287 | * @param certtype type of the certificate | ||
288 | * @param certfile file with the certificate | ||
289 | * @param keyfile file with the private key | ||
290 | * @param keypass passphrase to decrypt @a keyfile (or NULL) | ||
291 | */ | ||
292 | void | ||
293 | GNUNET_CURL_set_tlscert (struct GNUNET_CURL_Context *ctx, | ||
294 | const char *certtype, | ||
295 | const char *certfile, | ||
296 | const char *keyfile, | ||
297 | const char *keypass); | ||
298 | |||
299 | |||
300 | /** | ||
301 | * Schedule a CURL request to be executed and call the given @a jcc | ||
249 | * upon its completion. Note that the context will make use of the | 302 | * upon its completion. Note that the context will make use of the |
250 | * CURLOPT_PRIVATE facility of the CURL @a eh. | 303 | * CURLOPT_PRIVATE facility of the CURL @a eh. |
251 | * | 304 | * |
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index f43cf8943..51ae7d8d5 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -391,33 +391,54 @@ GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh, | |||
391 | 391 | ||
392 | 392 | ||
393 | /** | 393 | /** |
394 | * Flags for #GNUNET_DISK_pipe(). | ||
395 | */ | ||
396 | enum GNUNET_DISK_PipeFlags | ||
397 | { | ||
398 | |||
399 | /** | ||
400 | * No special options, use non-blocking read/write operations. | ||
401 | */ | ||
402 | GNUNET_DISK_PF_NONE, | ||
403 | |||
404 | /** | ||
405 | * Configure read end to block when reading if set. | ||
406 | */ | ||
407 | GNUNET_DISK_PF_BLOCKING_READ = 1, | ||
408 | /** | ||
409 | * Configure write end to block when writing if set. | ||
410 | */ | ||
411 | GNUNET_DISK_PF_BLOCKING_WRITE = 2, | ||
412 | |||
413 | /** | ||
414 | * Configure both pipe ends for blocking operations if set. | ||
415 | */ | ||
416 | GNUNET_DISK_PF_BLOCKING_RW = GNUNET_DISK_PF_BLOCKING_READ | ||
417 | | GNUNET_DISK_PF_BLOCKING_WRITE | ||
418 | |||
419 | }; | ||
420 | |||
421 | |||
422 | /** | ||
394 | * Creates an interprocess channel | 423 | * Creates an interprocess channel |
395 | * | 424 | * |
396 | * @param blocking_read creates an asynchronous pipe for reading if set to #GNUNET_NO | 425 | * @param pf how to configure the pipe |
397 | * @param blocking_write creates an asynchronous pipe for writing if set to #GNUNET_NO | ||
398 | * @param inherit_read 1 to make read handle inheritable, 0 otherwise (NT only) | ||
399 | * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only) | ||
400 | * @return handle to the new pipe, NULL on error | 426 | * @return handle to the new pipe, NULL on error |
401 | */ | 427 | */ |
402 | struct GNUNET_DISK_PipeHandle * | 428 | struct GNUNET_DISK_PipeHandle * |
403 | GNUNET_DISK_pipe (int blocking_read, | 429 | GNUNET_DISK_pipe (enum GNUNET_DISK_PipeFlags pf); |
404 | int blocking_write, | ||
405 | int inherit_read, | ||
406 | int inherit_write); | ||
407 | 430 | ||
408 | 431 | ||
409 | /** | 432 | /** |
410 | * Creates a pipe object from a couple of file descriptors. | 433 | * Creates a pipe object from a couple of file descriptors. |
411 | * Useful for wrapping existing pipe FDs. | 434 | * Useful for wrapping existing pipe FDs. |
412 | * | 435 | * |
413 | * @param blocking_read creates an asynchronous pipe for reading if set to #GNUNET_NO | 436 | * @param pf how to configure the pipe |
414 | * @param blocking_write creates an asynchronous pipe for writing if set to #GNUNET_NO | ||
415 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes | 437 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes |
416 | * @return handle to the new pipe, NULL on error | 438 | * @return handle to the new pipe, NULL on error |
417 | */ | 439 | */ |
418 | struct GNUNET_DISK_PipeHandle * | 440 | struct GNUNET_DISK_PipeHandle * |
419 | GNUNET_DISK_pipe_from_fd (int blocking_read, | 441 | GNUNET_DISK_pipe_from_fd (enum GNUNET_DISK_PipeFlags pf, |
420 | int blocking_write, | ||
421 | int fd[2]); | 442 | int fd[2]); |
422 | 443 | ||
423 | 444 | ||
@@ -479,6 +500,7 @@ const struct GNUNET_DISK_FileHandle * | |||
479 | GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, | 500 | GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, |
480 | enum GNUNET_DISK_PipeEnd n); | 501 | enum GNUNET_DISK_PipeEnd n); |
481 | 502 | ||
503 | |||
482 | /** | 504 | /** |
483 | * Update POSIX permissions mask of a file on disk. If both argumets | 505 | * Update POSIX permissions mask of a file on disk. If both argumets |
484 | * are #GNUNET_NO, the file is made world-read-write-executable (777). | 506 | * are #GNUNET_NO, the file is made world-read-write-executable (777). |
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h index f4e653598..94127248e 100644 --- a/src/include/gnunet_identity_service.h +++ b/src/include/gnunet_identity_service.h | |||
@@ -86,9 +86,9 @@ GNUNET_IDENTITY_ego_get_private_key (const struct GNUNET_IDENTITY_Ego *ego); | |||
86 | /** | 86 | /** |
87 | * Obtain the ego representing 'anonymous' users. | 87 | * Obtain the ego representing 'anonymous' users. |
88 | * | 88 | * |
89 | * @return handle for the anonymous user, must not be freed | 89 | * @return handle for the anonymous user, MUST NOT be freed |
90 | */ | 90 | */ |
91 | const struct GNUNET_IDENTITY_Ego * | 91 | struct GNUNET_IDENTITY_Ego * |
92 | GNUNET_IDENTITY_ego_get_anonymous (void); | 92 | GNUNET_IDENTITY_ego_get_anonymous (void); |
93 | 93 | ||
94 | 94 | ||
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index 520027dbb..37f21e5b1 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -547,7 +547,7 @@ struct GNUNET_MQ_MessageHandler | |||
547 | */ | 547 | */ |
548 | #define GNUNET_MQ_hd_fixed_size(name, code, str, ctx) \ | 548 | #define GNUNET_MQ_hd_fixed_size(name, code, str, ctx) \ |
549 | ({ \ | 549 | ({ \ |
550 | void (*_cb)(void *cls, const str * msg) = &handle_ ## name; \ | 550 | void (*_cb)(void *cls, const str *msg) = &handle_ ## name; \ |
551 | ((struct GNUNET_MQ_MessageHandler){ NULL, \ | 551 | ((struct GNUNET_MQ_MessageHandler){ NULL, \ |
552 | (GNUNET_MQ_MessageCallback) _cb, \ | 552 | (GNUNET_MQ_MessageCallback) _cb, \ |
553 | (ctx), \ | 553 | (ctx), \ |
@@ -598,8 +598,8 @@ struct GNUNET_MQ_MessageHandler | |||
598 | */ | 598 | */ |
599 | #define GNUNET_MQ_hd_var_size(name, code, str, ctx) \ | 599 | #define GNUNET_MQ_hd_var_size(name, code, str, ctx) \ |
600 | __extension__ ({ \ | 600 | __extension__ ({ \ |
601 | int (*_mv)(void *cls, const str * msg) = &check_ ## name; \ | 601 | int (*_mv)(void *cls, const str *msg) = &check_ ## name; \ |
602 | void (*_cb)(void *cls, const str * msg) = &handle_ ## name; \ | 602 | void (*_cb)(void *cls, const str *msg) = &handle_ ## name; \ |
603 | ((struct GNUNET_MQ_MessageHandler){ (GNUNET_MQ_MessageValidationCallback) \ | 603 | ((struct GNUNET_MQ_MessageHandler){ (GNUNET_MQ_MessageValidationCallback) \ |
604 | _mv, \ | 604 | _mv, \ |
605 | (GNUNET_MQ_MessageCallback) _cb, \ | 605 | (GNUNET_MQ_MessageCallback) _cb, \ |
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index b583cc493..749f766d2 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2011 GNUnet e.V. | 3 | Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2011, 2020 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -100,7 +100,12 @@ enum GNUNET_OS_InheritStdioFlags | |||
100 | * Use this option to have all of the standard streams | 100 | * Use this option to have all of the standard streams |
101 | * (stdin, stdout and stderror) be inherited. | 101 | * (stdin, stdout and stderror) be inherited. |
102 | */ | 102 | */ |
103 | GNUNET_OS_INHERIT_STD_ALL = 7 | 103 | GNUNET_OS_INHERIT_STD_ALL = 7, |
104 | |||
105 | /** | ||
106 | * Should a pipe be used to send signals to the child? | ||
107 | */ | ||
108 | GNUNET_OS_USE_PIPE_CONTROL = 8 | ||
104 | }; | 109 | }; |
105 | 110 | ||
106 | 111 | ||
@@ -455,7 +460,6 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc); | |||
455 | /** | 460 | /** |
456 | * Start a process. | 461 | * Start a process. |
457 | * | 462 | * |
458 | * @param pipe_control should a pipe be used to send signals to the child? | ||
459 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 463 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
460 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 464 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
461 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 465 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
@@ -465,8 +469,7 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc); | |||
465 | * @return pointer to process structure of the new process, NULL on error | 469 | * @return pointer to process structure of the new process, NULL on error |
466 | */ | 470 | */ |
467 | struct GNUNET_OS_Process * | 471 | struct GNUNET_OS_Process * |
468 | GNUNET_OS_start_process_vap (int pipe_control, | 472 | GNUNET_OS_start_process_vap (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
469 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
470 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 473 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
471 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 474 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
472 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 475 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
@@ -477,7 +480,6 @@ GNUNET_OS_start_process_vap (int pipe_control, | |||
477 | /** | 480 | /** |
478 | * Start a process. | 481 | * Start a process. |
479 | * | 482 | * |
480 | * @param pipe_control should a pipe be used to send signals to the child? | ||
481 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 483 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
482 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 484 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
483 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 485 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
@@ -487,8 +489,7 @@ GNUNET_OS_start_process_vap (int pipe_control, | |||
487 | * @return pointer to process structure of the new process, NULL on error | 489 | * @return pointer to process structure of the new process, NULL on error |
488 | */ | 490 | */ |
489 | struct GNUNET_OS_Process * | 491 | struct GNUNET_OS_Process * |
490 | GNUNET_OS_start_process (int pipe_control, | 492 | GNUNET_OS_start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
491 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
492 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 493 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
493 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 494 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
494 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 495 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
@@ -498,7 +499,6 @@ GNUNET_OS_start_process (int pipe_control, | |||
498 | /** | 499 | /** |
499 | * Start a process. | 500 | * Start a process. |
500 | * | 501 | * |
501 | * @param pipe_control should a pipe be used to send signals to the child? | ||
502 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 502 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
503 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 503 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
504 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 504 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
@@ -508,8 +508,7 @@ GNUNET_OS_start_process (int pipe_control, | |||
508 | * @return pointer to process structure of the new process, NULL on error | 508 | * @return pointer to process structure of the new process, NULL on error |
509 | */ | 509 | */ |
510 | struct GNUNET_OS_Process * | 510 | struct GNUNET_OS_Process * |
511 | GNUNET_OS_start_process_va (int pipe_control, | 511 | GNUNET_OS_start_process_va (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
512 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
513 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 512 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
514 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 513 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
515 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 514 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
@@ -518,7 +517,6 @@ GNUNET_OS_start_process_va (int pipe_control, | |||
518 | /** | 517 | /** |
519 | * Start a process. | 518 | * Start a process. |
520 | * | 519 | * |
521 | * @param pipe_control should a pipe be used to send signals to the child? | ||
522 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 520 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
523 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); | 521 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); |
524 | * must be NULL on platforms where dup is not supported | 522 | * must be NULL on platforms where dup is not supported |
@@ -528,8 +526,7 @@ GNUNET_OS_start_process_va (int pipe_control, | |||
528 | * @return pointer to process structure of the new process, NULL on error | 526 | * @return pointer to process structure of the new process, NULL on error |
529 | */ | 527 | */ |
530 | struct GNUNET_OS_Process * | 528 | struct GNUNET_OS_Process * |
531 | GNUNET_OS_start_process_v (int pipe_control, | 529 | GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
532 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
533 | const int *lsocks, | 530 | const int *lsocks, |
534 | const char *filename, | 531 | const char *filename, |
535 | char *const argv[]); | 532 | char *const argv[]); |
@@ -542,7 +539,6 @@ GNUNET_OS_start_process_v (int pipe_control, | |||
542 | * in the order they appear. Arguments containing spaces can be used by | 539 | * in the order they appear. Arguments containing spaces can be used by |
543 | * quoting them with @em ". | 540 | * quoting them with @em ". |
544 | * | 541 | * |
545 | * @param pipe_control should a pipe be used to send signals to the child? | ||
546 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 542 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
547 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); | 543 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); |
548 | * must be NULL on platforms where dup is not supported | 544 | * must be NULL on platforms where dup is not supported |
@@ -554,8 +550,7 @@ GNUNET_OS_start_process_v (int pipe_control, | |||
554 | * @return pointer to process structure of the new process, NULL on error | 550 | * @return pointer to process structure of the new process, NULL on error |
555 | */ | 551 | */ |
556 | struct GNUNET_OS_Process * | 552 | struct GNUNET_OS_Process * |
557 | GNUNET_OS_start_process_s (int pipe_control, | 553 | GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
558 | unsigned int std_inheritance, | ||
559 | const int *lsocks, | 554 | const int *lsocks, |
560 | const char *filename, ...); | 555 | const char *filename, ...); |
561 | 556 | ||
diff --git a/src/include/gnunet_reclaim_lib.h b/src/include/gnunet_reclaim_lib.h index 54d284f3c..4f2d6dba5 100644 --- a/src/include/gnunet_reclaim_lib.h +++ b/src/include/gnunet_reclaim_lib.h | |||
@@ -80,7 +80,7 @@ static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO; | |||
80 | memcmp (a, \ | 80 | memcmp (a, \ |
81 | b, \ | 81 | b, \ |
82 | sizeof (GNUNET_RECLAIM_ID_ZERO))) \ | 82 | sizeof (GNUNET_RECLAIM_ID_ZERO))) \ |
83 | ? \ | 83 | ? \ |
84 | GNUNET_YES : GNUNET_NO) | 84 | GNUNET_YES : GNUNET_NO) |
85 | 85 | ||
86 | 86 | ||
diff --git a/src/include/gnunet_reclaim_plugin.h b/src/include/gnunet_reclaim_plugin.h index 992ad0cc3..7ee9e730f 100644 --- a/src/include/gnunet_reclaim_plugin.h +++ b/src/include/gnunet_reclaim_plugin.h | |||
@@ -172,7 +172,9 @@ typedef const char *(*GNUNET_RECLAIM_AttestationNumberToTypenameFunction) ( | |||
172 | * @param attest the attestation object | 172 | * @param attest the attestation object |
173 | * @return an attribute list | 173 | * @return an attribute list |
174 | */ | 174 | */ |
175 | typedef struct GNUNET_RECLAIM_AttributeList *(*GNUNET_RECLAIM_AttestationGetAttributesFunction) ( | 175 | typedef struct |
176 | GNUNET_RECLAIM_AttributeList *(* | ||
177 | GNUNET_RECLAIM_AttestationGetAttributesFunction) ( | ||
176 | void *cls, | 178 | void *cls, |
177 | const struct GNUNET_RECLAIM_Attestation *attest); | 179 | const struct GNUNET_RECLAIM_Attestation *attest); |
178 | 180 | ||
@@ -201,7 +203,6 @@ typedef int (*GNUNET_RECLAIM_AttestationGetExpirationFunction) ( | |||
201 | struct GNUNET_TIME_Absolute *expiration); | 203 | struct GNUNET_TIME_Absolute *expiration); |
202 | 204 | ||
203 | 205 | ||
204 | |||
205 | /** | 206 | /** |
206 | * Each plugin is required to return a pointer to a struct of this | 207 | * Each plugin is required to return a pointer to a struct of this |
207 | * type as the return value from its entry point. | 208 | * type as the return value from its entry point. |
@@ -283,7 +284,6 @@ struct GNUNET_RECLAIM_AttestationPluginFunctions | |||
283 | }; | 284 | }; |
284 | 285 | ||
285 | 286 | ||
286 | |||
287 | #if 0 /* keep Emacsens' auto-indent happy */ | 287 | #if 0 /* keep Emacsens' auto-indent happy */ |
288 | { | 288 | { |
289 | #endif | 289 | #endif |
diff --git a/src/include/gnunet_reclaim_service.h b/src/include/gnunet_reclaim_service.h index 813bc1a59..139c44ae7 100644 --- a/src/include/gnunet_reclaim_service.h +++ b/src/include/gnunet_reclaim_service.h | |||
@@ -335,7 +335,8 @@ GNUNET_RECLAIM_get_attestations_start ( | |||
335 | * @param it the iterator | 335 | * @param it the iterator |
336 | */ | 336 | */ |
337 | void | 337 | void |
338 | GNUNET_RECLAIM_get_attestations_next (struct GNUNET_RECLAIM_AttestationIterator *ait); | 338 | GNUNET_RECLAIM_get_attestations_next (struct |
339 | GNUNET_RECLAIM_AttestationIterator *ait); | ||
339 | 340 | ||
340 | 341 | ||
341 | /** | 342 | /** |
@@ -346,7 +347,8 @@ GNUNET_RECLAIM_get_attestations_next (struct GNUNET_RECLAIM_AttestationIterator | |||
346 | * @param it the iterator | 347 | * @param it the iterator |
347 | */ | 348 | */ |
348 | void | 349 | void |
349 | GNUNET_RECLAIM_get_attestations_stop (struct GNUNET_RECLAIM_AttestationIterator *ait); | 350 | GNUNET_RECLAIM_get_attestations_stop (struct |
351 | GNUNET_RECLAIM_AttestationIterator *ait); | ||
350 | 352 | ||
351 | 353 | ||
352 | /** | 354 | /** |
diff --git a/src/include/platform.h b/src/include/platform.h index baaf26ad6..10248e5bb 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -233,8 +233,8 @@ atoll (const char *nptr); | |||
233 | 233 | ||
234 | 234 | ||
235 | #if defined(__sparc__) | 235 | #if defined(__sparc__) |
236 | #define MAKE_UNALIGNED(val) ({ __typeof__((val))__tmp; memmove (&__tmp, &(val), \ | 236 | #define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \ |
237 | sizeof((val))); \ | 237 | sizeof((val))); \ |
238 | __tmp; }) | 238 | __tmp; }) |
239 | #else | 239 | #else |
240 | #define MAKE_UNALIGNED(val) val | 240 | #define MAKE_UNALIGNED(val) val |
diff --git a/src/json/Makefile.am b/src/json/Makefile.am index 9cd80851c..2ed05c35a 100644 --- a/src/json/Makefile.am +++ b/src/json/Makefile.am | |||
@@ -27,6 +27,10 @@ libgnunetjson_la_LIBADD = \ | |||
27 | $(MHD_LIBS) \ | 27 | $(MHD_LIBS) \ |
28 | $(XLIB) \ | 28 | $(XLIB) \ |
29 | $(Z_LIBS) | 29 | $(Z_LIBS) |
30 | libgnunetjson_la_DEPENDENCIES = \ | ||
31 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
32 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la | ||
33 | |||
30 | 34 | ||
31 | check_PROGRAMS = \ | 35 | check_PROGRAMS = \ |
32 | test_json \ | 36 | test_json \ |
diff --git a/src/json/json_generator.c b/src/json/json_generator.c index 594fcaf27..3f82a5f17 100644 --- a/src/json/json_generator.c +++ b/src/json/json_generator.c | |||
@@ -254,7 +254,9 @@ GNUNET_JSON_from_gnsrecord (const char*rname, | |||
254 | rel_exp.rel_value_us = rd[i].expiration_time; | 254 | rel_exp.rel_value_us = rd[i].expiration_time; |
255 | expiration_time_str = GNUNET_STRINGS_relative_time_to_string (rel_exp, | 255 | expiration_time_str = GNUNET_STRINGS_relative_time_to_string (rel_exp, |
256 | GNUNET_NO); | 256 | GNUNET_NO); |
257 | } else { | 257 | } |
258 | else | ||
259 | { | ||
258 | abs_exp.abs_value_us = rd[i].expiration_time; | 260 | abs_exp.abs_value_us = rd[i].expiration_time; |
259 | expiration_time_str = GNUNET_STRINGS_absolute_time_to_string (abs_exp); | 261 | expiration_time_str = GNUNET_STRINGS_absolute_time_to_string (abs_exp); |
260 | } | 262 | } |
diff --git a/src/json/json_gnsrecord.c b/src/json/json_gnsrecord.c index fe5858f06..7e11aba94 100644 --- a/src/json/json_gnsrecord.c +++ b/src/json/json_gnsrecord.c | |||
@@ -136,8 +136,8 @@ parse_record (json_t *data, struct GNUNET_GNSRECORD_Data *rd) | |||
136 | } | 136 | } |
137 | else if ((1 != rel_exp) && | 137 | else if ((1 != rel_exp) && |
138 | (GNUNET_OK == | 138 | (GNUNET_OK == |
139 | GNUNET_STRINGS_fancy_time_to_absolute (expiration_time, | 139 | GNUNET_STRINGS_fancy_time_to_absolute (expiration_time, |
140 | &abs_expiration_time))) | 140 | &abs_expiration_time))) |
141 | { | 141 | { |
142 | rd->expiration_time = abs_expiration_time.abs_value_us; | 142 | rd->expiration_time = abs_expiration_time.abs_value_us; |
143 | } | 143 | } |
diff --git a/src/json/json_helper.c b/src/json/json_helper.c index 02bd6bfab..621487f0a 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c | |||
@@ -721,7 +721,7 @@ GNUNET_JSON_spec_absolute_time (const char *name, | |||
721 | .cls = NULL, | 721 | .cls = NULL, |
722 | .field = name, | 722 | .field = name, |
723 | .ptr = at, | 723 | .ptr = at, |
724 | .ptr_size = sizeof(uint64_t), | 724 | .ptr_size = sizeof(struct GNUNET_TIME_Absolute), |
725 | .size_ptr = NULL | 725 | .size_ptr = NULL |
726 | }; | 726 | }; |
727 | 727 | ||
@@ -775,7 +775,7 @@ GNUNET_JSON_spec_absolute_time_nbo (const char *name, | |||
775 | .cls = NULL, | 775 | .cls = NULL, |
776 | .field = name, | 776 | .field = name, |
777 | .ptr = at, | 777 | .ptr = at, |
778 | .ptr_size = sizeof(uint64_t), | 778 | .ptr_size = sizeof(struct GNUNET_TIME_AbsoluteNBO), |
779 | .size_ptr = NULL | 779 | .size_ptr = NULL |
780 | }; | 780 | }; |
781 | 781 | ||
@@ -852,7 +852,7 @@ GNUNET_JSON_spec_relative_time (const char *name, | |||
852 | .cls = NULL, | 852 | .cls = NULL, |
853 | .field = name, | 853 | .field = name, |
854 | .ptr = rt, | 854 | .ptr = rt, |
855 | .ptr_size = sizeof(uint64_t), | 855 | .ptr_size = sizeof(struct GNUNET_TIME_Relative), |
856 | .size_ptr = NULL | 856 | .size_ptr = NULL |
857 | }; | 857 | }; |
858 | 858 | ||
diff --git a/src/mysql/mysql.c b/src/mysql/mysql.c index 76effd95a..713227068 100644 --- a/src/mysql/mysql.c +++ b/src/mysql/mysql.c | |||
@@ -296,9 +296,9 @@ iopen (struct GNUNET_MYSQL_Context *mc) | |||
296 | (unsigned int) mysql_port, | 296 | (unsigned int) mysql_port, |
297 | NULL, | 297 | NULL, |
298 | CLIENT_IGNORE_SIGPIPE); | 298 | CLIENT_IGNORE_SIGPIPE); |
299 | GNUNET_free_non_null (mysql_server); | 299 | GNUNET_free (mysql_server); |
300 | GNUNET_free_non_null (mysql_user); | 300 | GNUNET_free (mysql_user); |
301 | GNUNET_free_non_null (mysql_password); | 301 | GNUNET_free (mysql_password); |
302 | GNUNET_free (mysql_dbname); | 302 | GNUNET_free (mysql_dbname); |
303 | if (mysql_error (mc->dbf)[0]) | 303 | if (mysql_error (mc->dbf)[0]) |
304 | { | 304 | { |
diff --git a/src/namecache/plugin_namecache_sqlite.c b/src/namecache/plugin_namecache_sqlite.c index 8f762cb40..c9d79ba2d 100644 --- a/src/namecache/plugin_namecache_sqlite.c +++ b/src/namecache/plugin_namecache_sqlite.c | |||
@@ -260,7 +260,7 @@ database_shutdown (struct Plugin *plugin) | |||
260 | GNUNET_ERROR_TYPE_ERROR, | 260 | GNUNET_ERROR_TYPE_ERROR, |
261 | "sqlite3_close"); | 261 | "sqlite3_close"); |
262 | 262 | ||
263 | GNUNET_free_non_null (plugin->fn); | 263 | GNUNET_free (plugin->fn); |
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index f4b846065..40ac64197 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -691,8 +691,8 @@ EXTRA_DIST = \ | |||
691 | test_plugin_namestore_postgres.conf \ | 691 | test_plugin_namestore_postgres.conf \ |
692 | test_plugin_namestore_flat.conf \ | 692 | test_plugin_namestore_flat.conf \ |
693 | test_hostkey \ | 693 | test_hostkey \ |
694 | zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \ | 694 | zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey \ |
695 | zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \ | 695 | zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey \ |
696 | zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \ | 696 | zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey \ |
697 | zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey \ | 697 | zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey \ |
698 | $(check_SCRIPTS) | 698 | $(check_SCRIPTS) |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 94fcb8952..07d045b90 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -878,7 +878,7 @@ del_monitor (void *cls, | |||
878 | rd[i].data_size)))) || | 878 | rd[i].data_size)))) || |
879 | (0 == strcmp (vs, value))))) | 879 | (0 == strcmp (vs, value))))) |
880 | rdx[rd_left++] = rd[i]; | 880 | rdx[rd_left++] = rd[i]; |
881 | GNUNET_free_non_null (vs); | 881 | GNUNET_free (vs); |
882 | } | 882 | } |
883 | if (rd_count == rd_left) | 883 | if (rd_count == rd_left) |
884 | { | 884 | { |
@@ -1048,7 +1048,8 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1048 | return; | 1048 | return; |
1049 | } | 1049 | } |
1050 | add = 1; | 1050 | add = 1; |
1051 | typestring = GNUNET_strdup (GNUNET_GNSRECORD_number_to_typename (GNUNET_GNSRECORD_TYPE_NICK)); | 1051 | typestring = GNUNET_strdup (GNUNET_GNSRECORD_number_to_typename ( |
1052 | GNUNET_GNSRECORD_TYPE_NICK)); | ||
1052 | name = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT); | 1053 | name = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT); |
1053 | value = GNUNET_strdup (nickstring); | 1054 | value = GNUNET_strdup (nickstring); |
1054 | is_public = 0; | 1055 | is_public = 0; |
@@ -1087,6 +1088,17 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1087 | ret = 1; | 1088 | ret = 1; |
1088 | return; | 1089 | return; |
1089 | } | 1090 | } |
1091 | if ((GNUNET_DNSPARSER_TYPE_SRV == type) || | ||
1092 | (GNUNET_DNSPARSER_TYPE_TLSA == type) || | ||
1093 | (GNUNET_DNSPARSER_TYPE_OPENPGPKEY == type)) | ||
1094 | { | ||
1095 | fprintf (stderr, | ||
1096 | _ ("For DNS record types `SRV', `TLSA' and `OPENPGPKEY'")); | ||
1097 | fprintf (stderr, ", please use a `BOX' record instead\n"); | ||
1098 | GNUNET_SCHEDULER_shutdown (); | ||
1099 | ret = 1; | ||
1100 | return; | ||
1101 | } | ||
1090 | if (NULL == value) | 1102 | if (NULL == value) |
1091 | { | 1103 | { |
1092 | fprintf (stderr, | 1104 | fprintf (stderr, |
@@ -1296,7 +1308,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
1296 | return; | 1308 | return; |
1297 | } | 1309 | } |
1298 | zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); | 1310 | zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); |
1299 | GNUNET_free_non_null (ego_name); | 1311 | GNUNET_free (ego_name); |
1300 | ego_name = NULL; | 1312 | ego_name = NULL; |
1301 | run_with_zone_pkey (cfg); | 1313 | run_with_zone_pkey (cfg); |
1302 | } | 1314 | } |
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index c57f15f65..bb8138e23 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -540,7 +540,7 @@ cache_nick (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | |||
540 | break; | 540 | break; |
541 | } | 541 | } |
542 | } | 542 | } |
543 | GNUNET_free_non_null (oldest->rd); | 543 | GNUNET_free (oldest->rd); |
544 | oldest->zone = *zone; | 544 | oldest->zone = *zone; |
545 | if (NULL != nick) | 545 | if (NULL != nick) |
546 | { | 546 | { |
@@ -915,7 +915,7 @@ refresh_block (struct NamestoreClient *nc, | |||
915 | nick = get_nick_record (zone_key); | 915 | nick = get_nick_record (zone_key); |
916 | res_count = rd_count; | 916 | res_count = rd_count; |
917 | res = (struct GNUNET_GNSRECORD_Data *) rd; /* fixme: a bit unclean... */ | 917 | res = (struct GNUNET_GNSRECORD_Data *) rd; /* fixme: a bit unclean... */ |
918 | if (NULL != nick && (0 != strcmp (name, GNUNET_GNS_EMPTY_LABEL_AT))) | 918 | if ((NULL != nick) && (0 != strcmp (name, GNUNET_GNS_EMPTY_LABEL_AT))) |
919 | { | 919 | { |
920 | nick->flags = | 920 | nick->flags = |
921 | (nick->flags | GNUNET_GNSRECORD_RF_PRIVATE) ^ GNUNET_GNSRECORD_RF_PRIVATE; | 921 | (nick->flags | GNUNET_GNSRECORD_RF_PRIVATE) ^ GNUNET_GNSRECORD_RF_PRIVATE; |
@@ -1392,7 +1392,7 @@ handle_record_lookup (void *cls, const struct LabelLookupMessage *ll_msg) | |||
1392 | GNUNET_memcpy (&llr_msg[1], name_tmp, name_len); | 1392 | GNUNET_memcpy (&llr_msg[1], name_tmp, name_len); |
1393 | GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len); | 1393 | GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len); |
1394 | GNUNET_MQ_send (nc->mq, env); | 1394 | GNUNET_MQ_send (nc->mq, env); |
1395 | GNUNET_free_non_null (rlc.res_rd); | 1395 | GNUNET_free (rlc.res_rd); |
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | 1398 | ||
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index a909221e2..45fb782f7 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -296,7 +296,7 @@ database_shutdown (struct Plugin *plugin) | |||
296 | GNUNET_ERROR_TYPE_ERROR, | 296 | GNUNET_ERROR_TYPE_ERROR, |
297 | "sqlite3_close"); | 297 | "sqlite3_close"); |
298 | 298 | ||
299 | GNUNET_free_non_null (plugin->fn); | 299 | GNUNET_free (plugin->fn); |
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index 95b9b428f..f1cbfb38b 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -491,7 +491,7 @@ namestore_list_finished (void *cls) | |||
491 | resp = GNUNET_REST_create_response (result_str); | 491 | resp = GNUNET_REST_create_response (result_str); |
492 | MHD_add_response_header (resp, "Content-Type", "application/json"); | 492 | MHD_add_response_header (resp, "Content-Type", "application/json"); |
493 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 493 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
494 | GNUNET_free_non_null (result_str); | 494 | GNUNET_free (result_str); |
495 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); | 495 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); |
496 | } | 496 | } |
497 | 497 | ||
@@ -536,6 +536,7 @@ namestore_list_iteration (void *cls, | |||
536 | GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1); | 536 | GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1); |
537 | } | 537 | } |
538 | 538 | ||
539 | |||
539 | /** | 540 | /** |
540 | * Handle lookup error | 541 | * Handle lookup error |
541 | * | 542 | * |
@@ -553,10 +554,10 @@ ns_lookup_error_cb (void *cls) | |||
553 | 554 | ||
554 | static void | 555 | static void |
555 | ns_get_lookup_cb (void *cls, | 556 | ns_get_lookup_cb (void *cls, |
556 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 557 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
557 | const char *label, | 558 | const char *label, |
558 | unsigned int rd_len, | 559 | unsigned int rd_len, |
559 | const struct GNUNET_GNSRECORD_Data *rd) | 560 | const struct GNUNET_GNSRECORD_Data *rd) |
560 | { | 561 | { |
561 | struct RequestHandle *handle = cls; | 562 | struct RequestHandle *handle = cls; |
562 | struct GNUNET_GNSRECORD_Data rd_filtered[rd_len]; | 563 | struct GNUNET_GNSRECORD_Data rd_filtered[rd_len]; |
@@ -588,8 +589,6 @@ ns_get_lookup_cb (void *cls, | |||
588 | } | 589 | } |
589 | 590 | ||
590 | 591 | ||
591 | |||
592 | |||
593 | /** | 592 | /** |
594 | * Handle namestore GET request | 593 | * Handle namestore GET request |
595 | * | 594 | * |
@@ -666,12 +665,12 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle, | |||
666 | } | 665 | } |
667 | handle->record_name = GNUNET_strdup (labelname + 1); | 666 | handle->record_name = GNUNET_strdup (labelname + 1); |
668 | handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle, | 667 | handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle, |
669 | handle->zone_pkey, | 668 | handle->zone_pkey, |
670 | handle->record_name, | 669 | handle->record_name, |
671 | &ns_lookup_error_cb, | 670 | &ns_lookup_error_cb, |
672 | handle, | 671 | handle, |
673 | &ns_get_lookup_cb, | 672 | &ns_get_lookup_cb, |
674 | handle); | 673 | handle); |
675 | if (NULL == handle->ns_qe) | 674 | if (NULL == handle->ns_qe) |
676 | { | 675 | { |
677 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); | 676 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); |
@@ -681,7 +680,6 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle, | |||
681 | } | 680 | } |
682 | 681 | ||
683 | 682 | ||
684 | |||
685 | static void | 683 | static void |
686 | ns_lookup_cb (void *cls, | 684 | ns_lookup_cb (void *cls, |
687 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 685 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
@@ -702,12 +700,12 @@ ns_lookup_cb (void *cls, | |||
702 | for (j = 0; j < handle->rd_count; j++) | 700 | for (j = 0; j < handle->rd_count; j++) |
703 | rd_new[i + j] = handle->rd[j]; | 701 | rd_new[i + j] = handle->rd[j]; |
704 | handle->ns_qe = GNUNET_NAMESTORE_records_store (handle->ns_handle, | 702 | handle->ns_qe = GNUNET_NAMESTORE_records_store (handle->ns_handle, |
705 | handle->zone_pkey, | 703 | handle->zone_pkey, |
706 | handle->record_name, | 704 | handle->record_name, |
707 | i + j, | 705 | i + j, |
708 | rd_new, | 706 | rd_new, |
709 | &create_finished, | 707 | &create_finished, |
710 | handle); | 708 | handle); |
711 | if (NULL == handle->ns_qe) | 709 | if (NULL == handle->ns_qe) |
712 | { | 710 | { |
713 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); | 711 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); |
@@ -794,12 +792,12 @@ namestore_add_or_update (struct GNUNET_REST_RequestHandle *con_handle, | |||
794 | } | 792 | } |
795 | handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); | 793 | handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); |
796 | handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle, | 794 | handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle, |
797 | handle->zone_pkey, | 795 | handle->zone_pkey, |
798 | handle->record_name, | 796 | handle->record_name, |
799 | &ns_lookup_error_cb, | 797 | &ns_lookup_error_cb, |
800 | handle, | 798 | handle, |
801 | &ns_lookup_cb, | 799 | &ns_lookup_cb, |
802 | handle); | 800 | handle); |
803 | if (NULL == handle->ns_qe) | 801 | if (NULL == handle->ns_qe) |
804 | { | 802 | { |
805 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); | 803 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); |
@@ -898,9 +896,9 @@ namestore_delete (struct GNUNET_REST_RequestHandle *con_handle, | |||
898 | handle->zone_pkey, | 896 | handle->zone_pkey, |
899 | handle->record_name, | 897 | handle->record_name, |
900 | 0, | 898 | 0, |
901 | NULL, | 899 | NULL, |
902 | &del_finished, | 900 | &del_finished, |
903 | handle); | 901 | handle); |
904 | if (NULL == handle->ns_qe) | 902 | if (NULL == handle->ns_qe) |
905 | { | 903 | { |
906 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); | 904 | handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); |
@@ -1109,7 +1107,7 @@ libgnunet_plugin_rest_namestore_done (void *cls) | |||
1109 | 1107 | ||
1110 | plugin->cfg = NULL; | 1108 | plugin->cfg = NULL; |
1111 | 1109 | ||
1112 | GNUNET_free_non_null (allow_methods); | 1110 | GNUNET_free (allow_methods); |
1113 | GNUNET_free (api); | 1111 | GNUNET_free (api); |
1114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n"); | 1112 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n"); |
1115 | return NULL; | 1113 | return NULL; |
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 628e76254..14fe7fc70 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -54,11 +54,12 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
54 | // static const char * name = "dummy.dummy.gnunet"; | 54 | // static const char * name = "dummy.dummy.gnunet"; |
55 | static const char *name = "d"; | 55 | static const char *name = "d"; |
56 | 56 | ||
57 | static char *record_data; | ||
57 | 58 | ||
58 | static void | 59 | static void |
59 | cleanup () | 60 | cleanup () |
60 | { | 61 | { |
61 | GNUNET_free_non_null ((void *) rd_orig.data); | 62 | GNUNET_free (record_data); |
62 | if (NULL != nsh) | 63 | if (NULL != nsh) |
63 | { | 64 | { |
64 | GNUNET_NAMESTORE_disconnect (nsh); | 65 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -264,7 +265,8 @@ nick_cont (void *cls, int32_t success, const char *emsg) | |||
264 | rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; | 265 | rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; |
265 | rd_orig.record_type = TEST_RECORD_TYPE; | 266 | rd_orig.record_type = TEST_RECORD_TYPE; |
266 | rd_orig.data_size = TEST_RECORD_DATALEN; | 267 | rd_orig.data_size = TEST_RECORD_DATALEN; |
267 | rd_orig.data = GNUNET_malloc (TEST_RECORD_DATALEN); | 268 | record_data = GNUNET_malloc (TEST_RECORD_DATALEN); |
269 | rd_orig.data = record_data; | ||
268 | rd_orig.flags = 0; | 270 | rd_orig.flags = 0; |
269 | memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN); | 271 | memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN); |
270 | 272 | ||
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index cc00adf44..3f1be1403 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -88,9 +88,9 @@ do_shutdown () | |||
88 | GNUNET_NAMESTORE_disconnect (nsh); | 88 | GNUNET_NAMESTORE_disconnect (nsh); |
89 | nsh = NULL; | 89 | nsh = NULL; |
90 | } | 90 | } |
91 | GNUNET_free_non_null (s_name_1); | 91 | GNUNET_free (s_name_1); |
92 | GNUNET_free_non_null (s_name_2); | 92 | GNUNET_free (s_name_2); |
93 | GNUNET_free_non_null (s_name_3); | 93 | GNUNET_free (s_name_3); |
94 | 94 | ||
95 | if (s_rd_1 != NULL) | 95 | if (s_rd_1 != NULL) |
96 | { | 96 | { |
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index a363ee28d..5d02b9e49 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -88,9 +88,9 @@ end (void *cls) | |||
88 | GNUNET_SCHEDULER_cancel (endbadly_task); | 88 | GNUNET_SCHEDULER_cancel (endbadly_task); |
89 | endbadly_task = NULL; | 89 | endbadly_task = NULL; |
90 | } | 90 | } |
91 | GNUNET_free_non_null (s_name_1); | 91 | GNUNET_free (s_name_1); |
92 | GNUNET_free_non_null (s_name_2); | 92 | GNUNET_free (s_name_2); |
93 | GNUNET_free_non_null (s_name_3); | 93 | GNUNET_free (s_name_3); |
94 | if (NULL != s_rd_1) | 94 | if (NULL != s_rd_1) |
95 | { | 95 | { |
96 | GNUNET_free_nz ((void *) s_rd_1->data); | 96 | GNUNET_free_nz ((void *) s_rd_1->data); |
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 1ebdfd073..4e54a05d2 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -82,9 +82,9 @@ end (void *cls) | |||
82 | GNUNET_NAMESTORE_disconnect (nsh); | 82 | GNUNET_NAMESTORE_disconnect (nsh); |
83 | nsh = NULL; | 83 | nsh = NULL; |
84 | } | 84 | } |
85 | GNUNET_free_non_null (s_name_1); | 85 | GNUNET_free (s_name_1); |
86 | GNUNET_free_non_null (s_name_2); | 86 | GNUNET_free (s_name_2); |
87 | GNUNET_free_non_null (s_name_3); | 87 | GNUNET_free (s_name_3); |
88 | 88 | ||
89 | if (s_rd_1 != NULL) | 89 | if (s_rd_1 != NULL) |
90 | { | 90 | { |
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 0534da001..30920713f 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -88,9 +88,9 @@ end (void *cls) | |||
88 | GNUNET_SCHEDULER_cancel (endbadly_task); | 88 | GNUNET_SCHEDULER_cancel (endbadly_task); |
89 | endbadly_task = NULL; | 89 | endbadly_task = NULL; |
90 | } | 90 | } |
91 | GNUNET_free_non_null (s_name_1); | 91 | GNUNET_free (s_name_1); |
92 | GNUNET_free_non_null (s_name_2); | 92 | GNUNET_free (s_name_2); |
93 | GNUNET_free_non_null (s_name_3); | 93 | GNUNET_free (s_name_3); |
94 | if (s_rd_1 != NULL) | 94 | if (s_rd_1 != NULL) |
95 | { | 95 | { |
96 | GNUNET_free_nz ((void *) s_rd_1->data); | 96 | GNUNET_free_nz ((void *) s_rd_1->data); |
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index b71a8789c..bdcdd1706 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -75,9 +75,9 @@ end (void *cls) | |||
75 | GNUNET_NAMESTORE_disconnect (nsh); | 75 | GNUNET_NAMESTORE_disconnect (nsh); |
76 | nsh = NULL; | 76 | nsh = NULL; |
77 | } | 77 | } |
78 | GNUNET_free_non_null (s_name_1); | 78 | GNUNET_free (s_name_1); |
79 | GNUNET_free_non_null (s_name_2); | 79 | GNUNET_free (s_name_2); |
80 | GNUNET_free_non_null (s_name_3); | 80 | GNUNET_free (s_name_3); |
81 | if (s_rd_1 != NULL) | 81 | if (s_rd_1 != NULL) |
82 | { | 82 | { |
83 | GNUNET_free_nz ((void *) s_rd_1->data); | 83 | GNUNET_free_nz ((void *) s_rd_1->data); |
diff --git a/src/namestore/test_plugin_rest_namestore.sh b/src/namestore/test_plugin_rest_namestore.sh index 014057e56..12a7fa50c 100755 --- a/src/namestore/test_plugin_rest_namestore.sh +++ b/src/namestore/test_plugin_rest_namestore.sh | |||
@@ -85,17 +85,17 @@ test="$(gnunet-namestore -D -z $TEST_ID -c test_namestore_api.conf)" | |||
85 | name=$TEST_ID | 85 | name=$TEST_ID |
86 | public="$(gnunet-identity -d -c test_namestore_api.conf | grep $TEST_ID | awk 'NR==1{print $3}')" | 86 | public="$(gnunet-identity -d -c test_namestore_api.conf | grep $TEST_ID | awk 'NR==1{print $3}')" |
87 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf | 87 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf |
88 | curl_get "${namestore_link}" "HTTP/1.1 200 OK" | 88 | #curl_get "${namestore_link}" "HTTP/1.1 200 OK" |
89 | curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK" | 89 | curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK" |
90 | curl_get "${namestore_link}/$public" "error" | 90 | curl_get "${namestore_link}/$public" "error" |
91 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf | 91 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf |
92 | 92 | ||
93 | #Test POST with NAME | 93 | #Test POST with NAME |
94 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 94 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "HTTP/1.1 204 No Content" |
95 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 95 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
96 | 96 | ||
97 | # invalid values | 97 | # invalid values |
98 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "error" | 98 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "error" |
99 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 99 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
100 | 100 | ||
101 | 101 | ||
@@ -106,30 +106,30 @@ curl_post "${namestore_link}/$name" '{"data": [{"record_type":"PKEY", "expiratio | |||
106 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 106 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
107 | 107 | ||
108 | #expirations | 108 | #expirations |
109 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"0d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204" | 109 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"0d","private": false, "relative_expiration": true, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "HTTP/1.1 204" |
110 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 110 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
111 | 111 | ||
112 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"10000d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204" | 112 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"10000d","private": false, "relative_expiration": true, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "HTTP/1.1 204" |
113 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 113 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
114 | 114 | ||
115 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"now","flag":0}],"record_name":"test_entry"}' "error" | 115 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"now","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "error" |
116 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 116 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
117 | 117 | ||
118 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time_missing":"1d","flag":0}],"record_name":"test_entry"}' "error" | 118 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time_missing":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "error" |
119 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 119 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
120 | 120 | ||
121 | #record_name | 121 | #record_name |
122 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":""}' "error" | 122 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":""}' "error" |
123 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 123 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
124 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name_missing":"test_entry"}' "error" | 124 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name_missing":"test_entry"}' "error" |
125 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 | 125 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
126 | 126 | ||
127 | #Test DELETE | 127 | #Test DELETE |
128 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf | 128 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf |
129 | curl_delete "${namestore_link}/$name?record_name=test_entry" "HTTP/1.1 204" | 129 | curl_delete "${namestore_link}/$name/test_entry" "HTTP/1.1 204" |
130 | curl_delete "${namestore_link}/$name?record_name=test_entry" "error" | 130 | curl_delete "${namestore_link}/$name/test_entry" "error" |
131 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf | 131 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf |
132 | curl_delete "${namestore_link}/$public?record_name=test_entry" "error" | 132 | curl_delete "${namestore_link}/$public/test_entry" "error" |
133 | 133 | ||
134 | gnunet-arm -e -c test_namestore_api.conf | 134 | gnunet-arm -e -c test_namestore_api.conf |
135 | exit 0; | 135 | exit 0; |
diff --git a/src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey b/src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey deleted file mode 100644 index 7dfee2d0b..000000000 --- a/src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey b/src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey new file mode 100644 index 000000000..0d37aefef --- /dev/null +++ b/src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey | |||
@@ -0,0 +1 @@ | |||
ˆ‘’“ÂÚ Qž”0ÿ·Ò†d Õ/Ô#‰`«ÇËÂ$Éf \ No newline at end of file | |||
diff --git a/src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey b/src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey new file mode 100644 index 000000000..b5b465ea1 --- /dev/null +++ b/src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey | |||
Binary files differ | |||
diff --git a/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey b/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey deleted file mode 100644 index acc877d4f..000000000 --- a/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey b/src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey new file mode 100644 index 000000000..7535efb5e --- /dev/null +++ b/src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey | |||
@@ -0,0 +1 @@ | |||
p‘Ñç¨Â¡8&û„D6£ Vív+XÃì{ A \ No newline at end of file | |||
diff --git a/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey b/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey deleted file mode 100644 index 7dfee2d0b..000000000 --- a/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey b/src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey deleted file mode 100644 index acc877d4f..000000000 --- a/src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey b/src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey new file mode 100644 index 000000000..ac3ed96a3 --- /dev/null +++ b/src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey | |||
@@ -0,0 +1,2 @@ | |||
1 | XJèµMíŠÀ …¬½ | ||
2 | dú胦ӌòB×=ÏB \ No newline at end of file | ||
diff --git a/src/nat-auto/gnunet-service-nat-auto_legacy.c b/src/nat-auto/gnunet-service-nat-auto_legacy.c index 1817c2270..de7910588 100644 --- a/src/nat-auto/gnunet-service-nat-auto_legacy.c +++ b/src/nat-auto/gnunet-service-nat-auto_legacy.c | |||
@@ -791,7 +791,7 @@ test_icmp_server (struct GNUNET_NAT_AutoHandle *ah) | |||
791 | _ ("No working gnunet-helper-nat-server found\n")); | 791 | _ ("No working gnunet-helper-nat-server found\n")); |
792 | } | 792 | } |
793 | err: | 793 | err: |
794 | GNUNET_free_non_null (tmp); | 794 | GNUNET_free (tmp); |
795 | GNUNET_free (helper); | 795 | GNUNET_free (helper); |
796 | 796 | ||
797 | if ((GNUNET_OK == ext_ip) && | 797 | if ((GNUNET_OK == ext_ip) && |
@@ -853,7 +853,7 @@ test_icmp_client (struct GNUNET_NAT_AutoHandle *ah) | |||
853 | _ ("No working gnunet-helper-nat-server found\n")); | 853 | _ ("No working gnunet-helper-nat-server found\n")); |
854 | } | 854 | } |
855 | err: | 855 | err: |
856 | GNUNET_free_non_null (tmp); | 856 | GNUNET_free (tmp); |
857 | GNUNET_free (helper); | 857 | GNUNET_free (helper); |
858 | 858 | ||
859 | next_phase (ah); | 859 | next_phase (ah); |
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c index 5012d6455..0743a478d 100644 --- a/src/nat/gnunet-nat.c +++ b/src/nat/gnunet-nat.c | |||
@@ -392,15 +392,15 @@ run (void *cls, | |||
392 | &stun_read_task, | 392 | &stun_read_task, |
393 | NULL); | 393 | NULL); |
394 | } | 394 | } |
395 | GNUNET_free_non_null (remote_sa); | 395 | GNUNET_free (remote_sa); |
396 | GNUNET_free_non_null (local_sa); | 396 | GNUNET_free (local_sa); |
397 | test_finished (); | 397 | test_finished (); |
398 | return; | 398 | return; |
399 | fail_and_shutdown: | 399 | fail_and_shutdown: |
400 | global_ret = 1; | 400 | global_ret = 1; |
401 | GNUNET_SCHEDULER_shutdown (); | 401 | GNUNET_SCHEDULER_shutdown (); |
402 | GNUNET_free_non_null (remote_sa); | 402 | GNUNET_free (remote_sa); |
403 | GNUNET_free_non_null (local_sa); | 403 | GNUNET_free (local_sa); |
404 | } | 404 | } |
405 | 405 | ||
406 | 406 | ||
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c index 3b7d48c82..4dcc0312f 100644 --- a/src/nat/gnunet-service-nat.c +++ b/src/nat/gnunet-service-nat.c | |||
@@ -2009,7 +2009,7 @@ client_disconnect_cb (void *cls, | |||
2009 | ch->caddrs[i].mh = NULL; | 2009 | ch->caddrs[i].mh = NULL; |
2010 | } | 2010 | } |
2011 | } | 2011 | } |
2012 | GNUNET_free_non_null (ch->caddrs); | 2012 | GNUNET_free (ch->caddrs); |
2013 | while (NULL != (lal = ch->ext_addr_head)) | 2013 | while (NULL != (lal = ch->ext_addr_head)) |
2014 | { | 2014 | { |
2015 | GNUNET_CONTAINER_DLL_remove (ch->ext_addr_head, | 2015 | GNUNET_CONTAINER_DLL_remove (ch->ext_addr_head, |
@@ -2032,8 +2032,8 @@ client_disconnect_cb (void *cls, | |||
2032 | GNUNET_RESOLVER_request_cancel (ch->ext_dns); | 2032 | GNUNET_RESOLVER_request_cancel (ch->ext_dns); |
2033 | ch->ext_dns = NULL; | 2033 | ch->ext_dns = NULL; |
2034 | } | 2034 | } |
2035 | GNUNET_free_non_null (ch->hole_external); | 2035 | GNUNET_free (ch->hole_external); |
2036 | GNUNET_free_non_null (ch->section_name); | 2036 | GNUNET_free (ch->section_name); |
2037 | GNUNET_free (ch); | 2037 | GNUNET_free (ch); |
2038 | } | 2038 | } |
2039 | 2039 | ||
diff --git a/src/nat/gnunet-service-nat_helper.c b/src/nat/gnunet-service-nat_helper.c index 58d7b4c61..bd1645d25 100644 --- a/src/nat/gnunet-service-nat_helper.c +++ b/src/nat/gnunet-service-nat_helper.c | |||
@@ -222,7 +222,7 @@ restart_nat_server (void *cls) | |||
222 | return; | 222 | return; |
223 | } | 223 | } |
224 | h->server_stdout = | 224 | h->server_stdout = |
225 | GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); | 225 | GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); |
226 | if (NULL == h->server_stdout) | 226 | if (NULL == h->server_stdout) |
227 | { | 227 | { |
228 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "pipe"); | 228 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "pipe"); |
@@ -234,8 +234,7 @@ restart_nat_server (void *cls) | |||
234 | "Starting `%s' at `%s'\n", | 234 | "Starting `%s' at `%s'\n", |
235 | "gnunet-helper-nat-server", | 235 | "gnunet-helper-nat-server", |
236 | ia); | 236 | ia); |
237 | h->server_proc = GNUNET_OS_start_process (GNUNET_NO, | 237 | h->server_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE, |
238 | 0, | ||
239 | NULL, | 238 | NULL, |
240 | h->server_stdout, | 239 | h->server_stdout, |
241 | NULL, | 240 | NULL, |
@@ -378,8 +377,7 @@ GN_request_connection_reversal (const struct in_addr *internal_address, | |||
378 | remv4, | 377 | remv4, |
379 | internal_port); | 378 | internal_port); |
380 | binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-nat-client"); | 379 | binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-nat-client"); |
381 | proc = GNUNET_OS_start_process (GNUNET_NO, | 380 | proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE, |
382 | 0, | ||
383 | NULL, | 381 | NULL, |
384 | NULL, | 382 | NULL, |
385 | NULL, | 383 | NULL, |
diff --git a/src/nat/gnunet-service-nat_mini.c b/src/nat/gnunet-service-nat_mini.c index ae94e3f5b..24f77d9cc 100644 --- a/src/nat/gnunet-service-nat_mini.c +++ b/src/nat/gnunet-service-nat_mini.c | |||
@@ -192,15 +192,14 @@ GNUNET_NAT_mini_get_external_ipv4_ (GNUNET_NAT_IPCallback cb, void *cb_cls) | |||
192 | } | 192 | } |
193 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 193 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
194 | "Running `external-ip' to determine our external IP\n"); | 194 | "Running `external-ip' to determine our external IP\n"); |
195 | eh->opipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); | 195 | eh->opipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); |
196 | if (NULL == eh->opipe) | 196 | if (NULL == eh->opipe) |
197 | { | 197 | { |
198 | eh->ret = GNUNET_NAT_ERROR_IPC_FAILURE; | 198 | eh->ret = GNUNET_NAT_ERROR_IPC_FAILURE; |
199 | eh->task = GNUNET_SCHEDULER_add_now (&signal_external_ip_error, eh); | 199 | eh->task = GNUNET_SCHEDULER_add_now (&signal_external_ip_error, eh); |
200 | return eh; | 200 | return eh; |
201 | } | 201 | } |
202 | eh->eip = GNUNET_OS_start_process (GNUNET_NO, | 202 | eh->eip = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE, |
203 | 0, | ||
204 | NULL, | 203 | NULL, |
205 | eh->opipe, | 204 | eh->opipe, |
206 | NULL, | 205 | NULL, |
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c index 69a2f4218..a3072f712 100644 --- a/src/nat/test_nat.c +++ b/src/nat/test_nat.c | |||
@@ -108,7 +108,7 @@ process_if (void *cls, | |||
108 | 108 | ||
109 | if (addr == NULL) | 109 | if (addr == NULL) |
110 | return GNUNET_OK; | 110 | return GNUNET_OK; |
111 | GNUNET_free_non_null (data->addr); | 111 | GNUNET_free (data->addr); |
112 | data->addr = GNUNET_malloc (addrlen); | 112 | data->addr = GNUNET_malloc (addrlen); |
113 | GNUNET_memcpy (data->addr, addr, addrlen); | 113 | GNUNET_memcpy (data->addr, addr, addrlen); |
114 | data->addrlen = addrlen; | 114 | data->addrlen = addrlen; |
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index 43998c97c..2abab4d5f 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c | |||
@@ -117,8 +117,8 @@ main (int argc, char *const argv[]) | |||
117 | return 0; | 117 | return 0; |
118 | } | 118 | } |
119 | 119 | ||
120 | gns = GNUNET_OS_start_process (GNUNET_YES, | 120 | gns = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
121 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 121 | | GNUNET_OS_USE_PIPE_CONTROL, |
122 | NULL, NULL, NULL, | 122 | NULL, NULL, NULL, |
123 | "gnunet-nat-server", | 123 | "gnunet-nat-server", |
124 | "gnunet-nat-server", | 124 | "gnunet-nat-server", |
diff --git a/src/nat/test_stun.c b/src/nat/test_stun.c index a41734af1..75eb877b3 100644 --- a/src/nat/test_stun.c +++ b/src/nat/test_stun.c | |||
@@ -277,8 +277,8 @@ main (int argc, char *const argv[]) | |||
277 | 277 | ||
278 | /* Lets start resolver */ | 278 | /* Lets start resolver */ |
279 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 279 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
280 | proc = GNUNET_OS_start_process (GNUNET_YES, | 280 | proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
281 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 281 | | GNUNET_OS_USE_PIPE_CONTROL, |
282 | NULL, NULL, NULL, | 282 | NULL, NULL, NULL, |
283 | fn, | 283 | fn, |
284 | "gnunet-service-resolver", | 284 | "gnunet-service-resolver", |
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am index dfcdcd3da..74af5890b 100644 --- a/src/peerinfo-tool/Makefile.am +++ b/src/peerinfo-tool/Makefile.am | |||
@@ -21,10 +21,19 @@ libgnunet_plugin_rest_peerinfo_la_LIBADD = \ | |||
21 | $(top_builddir)/src/hello/libgnunethello.la \ | 21 | $(top_builddir)/src/hello/libgnunethello.la \ |
22 | $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ | 22 | $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ |
23 | $(top_builddir)/src/transport/libgnunettransport.la \ | 23 | $(top_builddir)/src/transport/libgnunettransport.la \ |
24 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
24 | $(top_builddir)/src/rest/libgnunetrest.la \ | 25 | $(top_builddir)/src/rest/libgnunetrest.la \ |
25 | $(top_builddir)/src/json/libgnunetjson.la \ | 26 | $(top_builddir)/src/json/libgnunetjson.la \ |
26 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 27 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ |
27 | $(LTLIBINTL) -ljansson $(MHD_LIBS) | 28 | $(LTLIBINTL) -ljansson $(MHD_LIBS) |
29 | libgnunet_plugin_rest_peerinfo_la_DEPENDENCIES = \ | ||
30 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
31 | $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ | ||
32 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
33 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
34 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
35 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
36 | $(top_builddir)/src/util/libgnunetutil.la | ||
28 | libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \ | 37 | libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \ |
29 | $(GN_PLUGIN_LDFLAGS) | 38 | $(GN_PLUGIN_LDFLAGS) |
30 | libgnunet_plugin_rest_peerinfo_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS) | 39 | libgnunet_plugin_rest_peerinfo_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS) |
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index df6c169b5..739249a93 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c | |||
@@ -249,7 +249,7 @@ dump_pc (struct PrintContext *pc) | |||
249 | } | 249 | } |
250 | } | 250 | } |
251 | printf ("\n"); | 251 | printf ("\n"); |
252 | GNUNET_free_non_null (pc->address_list); | 252 | GNUNET_free (pc->address_list); |
253 | GNUNET_CONTAINER_DLL_remove (pc_head, pc_tail, pc); | 253 | GNUNET_CONTAINER_DLL_remove (pc_head, pc_tail, pc); |
254 | GNUNET_free (pc); | 254 | GNUNET_free (pc); |
255 | if ((NULL == pc_head) && (NULL == pic)) | 255 | if ((NULL == pc_head) && (NULL == pic)) |
@@ -619,14 +619,14 @@ shutdown_task (void *cls) | |||
619 | for (i = 0; i < pc->address_list_size; i++) | 619 | for (i = 0; i < pc->address_list_size; i++) |
620 | { | 620 | { |
621 | ar = &pc->address_list[i]; | 621 | ar = &pc->address_list[i]; |
622 | GNUNET_free_non_null (ar->result); | 622 | GNUNET_free (ar->result); |
623 | if (NULL != ar->atsc) | 623 | if (NULL != ar->atsc) |
624 | { | 624 | { |
625 | GNUNET_TRANSPORT_address_to_string_cancel (ar->atsc); | 625 | GNUNET_TRANSPORT_address_to_string_cancel (ar->atsc); |
626 | ar->atsc = NULL; | 626 | ar->atsc = NULL; |
627 | } | 627 | } |
628 | } | 628 | } |
629 | GNUNET_free_non_null (pc->address_list); | 629 | GNUNET_free (pc->address_list); |
630 | GNUNET_free (pc); | 630 | GNUNET_free (pc); |
631 | } | 631 | } |
632 | GPI_plugins_unload (); | 632 | GPI_plugins_unload (); |
diff --git a/src/peerinfo-tool/plugin_rest_peerinfo.c b/src/peerinfo-tool/plugin_rest_peerinfo.c index 514b14313..1ab6d6f75 100644 --- a/src/peerinfo-tool/plugin_rest_peerinfo.c +++ b/src/peerinfo-tool/plugin_rest_peerinfo.c | |||
@@ -359,7 +359,7 @@ peerinfo_list_finished (void *cls) | |||
359 | resp = GNUNET_REST_create_response (result_str); | 359 | resp = GNUNET_REST_create_response (result_str); |
360 | MHD_add_response_header (resp, "Content-Type", "application/json"); | 360 | MHD_add_response_header (resp, "Content-Type", "application/json"); |
361 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 361 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
362 | GNUNET_free_non_null (result_str); | 362 | GNUNET_free (result_str); |
363 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); | 363 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); |
364 | } | 364 | } |
365 | 365 | ||
@@ -452,7 +452,7 @@ dump_pc (struct PrintContext *pc) | |||
452 | json_decref (temp_array); | 452 | json_decref (temp_array); |
453 | json_decref (response_entry); | 453 | json_decref (response_entry); |
454 | 454 | ||
455 | GNUNET_free_non_null (pc->address_list); | 455 | GNUNET_free (pc->address_list); |
456 | GNUNET_CONTAINER_DLL_remove (pc_head, | 456 | GNUNET_CONTAINER_DLL_remove (pc_head, |
457 | pc_tail, | 457 | pc_tail, |
458 | pc); | 458 | pc); |
@@ -813,7 +813,7 @@ libgnunet_plugin_rest_peerinfo_done (void *cls) | |||
813 | 813 | ||
814 | plugin->cfg = NULL; | 814 | plugin->cfg = NULL; |
815 | 815 | ||
816 | GNUNET_free_non_null (allow_methods); | 816 | GNUNET_free (allow_methods); |
817 | GNUNET_free (api); | 817 | GNUNET_free (api); |
818 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 818 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
819 | "Peerinfo REST plugin is finished\n"); | 819 | "Peerinfo REST plugin is finished\n"); |
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index 27e0337ee..79af90dd4 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -443,8 +443,8 @@ add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity) | |||
443 | update_hello (identity, r.hello); | 443 | update_hello (identity, r.hello); |
444 | if (NULL != r.friend_only_hello) | 444 | if (NULL != r.friend_only_hello) |
445 | update_hello (identity, r.friend_only_hello); | 445 | update_hello (identity, r.friend_only_hello); |
446 | GNUNET_free_non_null (r.hello); | 446 | GNUNET_free (r.hello); |
447 | GNUNET_free_non_null (r.friend_only_hello); | 447 | GNUNET_free (r.friend_only_hello); |
448 | GNUNET_free (fn); | 448 | GNUNET_free (fn); |
449 | } | 449 | } |
450 | } | 450 | } |
@@ -825,7 +825,7 @@ update_hello (const struct GNUNET_PeerIdentity *peer, | |||
825 | GNUNET_free (buffer); | 825 | GNUNET_free (buffer); |
826 | } | 826 | } |
827 | } | 827 | } |
828 | GNUNET_free_non_null (fn); | 828 | GNUNET_free (fn); |
829 | notify_all (host); | 829 | notify_all (host); |
830 | } | 830 | } |
831 | 831 | ||
@@ -982,7 +982,7 @@ discard_hosts_helper (void *cls, const char *fn) | |||
982 | write_pos += new_hello_size; | 982 | write_pos += new_hello_size; |
983 | } | 983 | } |
984 | read_pos += cur_hello_size; | 984 | read_pos += cur_hello_size; |
985 | GNUNET_free_non_null (new_hello); | 985 | GNUNET_free (new_hello); |
986 | } | 986 | } |
987 | 987 | ||
988 | if (0 < write_pos) | 988 | if (0 < write_pos) |
@@ -1209,8 +1209,8 @@ free_host_entry (void *cls, const struct GNUNET_PeerIdentity *key, void *value) | |||
1209 | 1209 | ||
1210 | (void) cls; | 1210 | (void) cls; |
1211 | (void) key; | 1211 | (void) key; |
1212 | GNUNET_free_non_null (he->hello); | 1212 | GNUNET_free (he->hello); |
1213 | GNUNET_free_non_null (he->friend_only_hello); | 1213 | GNUNET_free (he->friend_only_hello); |
1214 | GNUNET_free (he); | 1214 | GNUNET_free (he); |
1215 | return GNUNET_YES; | 1215 | return GNUNET_YES; |
1216 | } | 1216 | } |
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c index 17f73d70a..db5aee0d5 100644 --- a/src/peerstore/peerstore_api.c +++ b/src/peerstore/peerstore_api.c | |||
@@ -676,7 +676,7 @@ GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic) | |||
676 | { | 676 | { |
677 | GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic); | 677 | GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic); |
678 | GNUNET_free (ic->sub_system); | 678 | GNUNET_free (ic->sub_system); |
679 | GNUNET_free_non_null (ic->key); | 679 | GNUNET_free (ic->key); |
680 | GNUNET_free (ic); | 680 | GNUNET_free (ic); |
681 | } | 681 | } |
682 | else | 682 | else |
diff --git a/src/peerstore/plugin_peerstore_flat.c b/src/peerstore/plugin_peerstore_flat.c index 5efe9dddc..cc5b8b76b 100644 --- a/src/peerstore/plugin_peerstore_flat.c +++ b/src/peerstore/plugin_peerstore_flat.c | |||
@@ -450,7 +450,7 @@ database_setup (struct Plugin *plugin) | |||
450 | s); | 450 | s); |
451 | else | 451 | else |
452 | GNUNET_break (0); | 452 | GNUNET_break (0); |
453 | GNUNET_free_non_null (o); | 453 | GNUNET_free (o); |
454 | } | 454 | } |
455 | entry->value_size = GNUNET_STRINGS_base64_decode (value, | 455 | entry->value_size = GNUNET_STRINGS_base64_decode (value, |
456 | strlen (value), | 456 | strlen (value), |
diff --git a/src/peerstore/plugin_peerstore_sqlite.c b/src/peerstore/plugin_peerstore_sqlite.c index cf499a5df..ad69efdf4 100644 --- a/src/peerstore/plugin_peerstore_sqlite.c +++ b/src/peerstore/plugin_peerstore_sqlite.c | |||
@@ -639,7 +639,7 @@ database_shutdown (struct Plugin *plugin) | |||
639 | LOG_SQLITE (plugin, | 639 | LOG_SQLITE (plugin, |
640 | GNUNET_ERROR_TYPE_ERROR, | 640 | GNUNET_ERROR_TYPE_ERROR, |
641 | "sqlite3_close"); | 641 | "sqlite3_close"); |
642 | GNUNET_free_non_null (plugin->fn); | 642 | GNUNET_free (plugin->fn); |
643 | } | 643 | } |
644 | 644 | ||
645 | 645 | ||
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index 8da273b2b..e3a610922 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c | |||
@@ -125,7 +125,7 @@ GNUNET_PQ_connect (const char *config_str, | |||
125 | GNUNET_PQ_reconnect (db); | 125 | GNUNET_PQ_reconnect (db); |
126 | if (NULL == db->conn) | 126 | if (NULL == db->conn) |
127 | { | 127 | { |
128 | GNUNET_free_non_null (db->load_path); | 128 | GNUNET_free (db->load_path); |
129 | GNUNET_free (db->config_str); | 129 | GNUNET_free (db->config_str); |
130 | GNUNET_free (db); | 130 | GNUNET_free (db); |
131 | return NULL; | 131 | return NULL; |
@@ -162,8 +162,7 @@ apply_patch (struct GNUNET_PQ_Context *db, | |||
162 | "Applying SQL file `%s' on database %s\n", | 162 | "Applying SQL file `%s' on database %s\n", |
163 | buf, | 163 | buf, |
164 | db->config_str); | 164 | db->config_str); |
165 | psql = GNUNET_OS_start_process (GNUNET_NO, | 165 | psql = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE, |
166 | GNUNET_OS_INHERIT_STD_NONE, | ||
167 | NULL, | 166 | NULL, |
168 | NULL, | 167 | NULL, |
169 | NULL, | 168 | NULL, |
@@ -495,9 +494,9 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
495 | load_path, | 494 | load_path, |
496 | es, | 495 | es, |
497 | ps); | 496 | ps); |
498 | GNUNET_free_non_null (load_path); | 497 | GNUNET_free (load_path); |
499 | GNUNET_free_non_null (sp); | 498 | GNUNET_free (sp); |
500 | GNUNET_free_non_null (conninfo); | 499 | GNUNET_free (conninfo); |
501 | return db; | 500 | return db; |
502 | } | 501 | } |
503 | 502 | ||
@@ -511,10 +510,10 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
511 | void | 510 | void |
512 | GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) | 511 | GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) |
513 | { | 512 | { |
514 | GNUNET_free_non_null (db->es); | 513 | GNUNET_free (db->es); |
515 | GNUNET_free_non_null (db->ps); | 514 | GNUNET_free (db->ps); |
516 | GNUNET_free_non_null (db->load_path); | 515 | GNUNET_free (db->load_path); |
517 | GNUNET_free_non_null (db->config_str); | 516 | GNUNET_free (db->config_str); |
518 | PQfinish (db->conn); | 517 | PQfinish (db->conn); |
519 | GNUNET_free (db); | 518 | GNUNET_free (db); |
520 | } | 519 | } |
diff --git a/src/pq/pq_prepare.c b/src/pq/pq_prepare.c index b7003fb69..63087456f 100644 --- a/src/pq/pq_prepare.c +++ b/src/pq/pq_prepare.c | |||
@@ -83,7 +83,7 @@ GNUNET_PQ_prepare_statements (struct GNUNET_PQ_Context *db, | |||
83 | memcpy (&rps[olen], | 83 | memcpy (&rps[olen], |
84 | ps, | 84 | ps, |
85 | nlen * sizeof (struct GNUNET_PQ_PreparedStatement)); | 85 | nlen * sizeof (struct GNUNET_PQ_PreparedStatement)); |
86 | GNUNET_free_non_null (db->ps); | 86 | GNUNET_free (db->ps); |
87 | db->ps = rps; | 87 | db->ps = rps; |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 69afca789..cf0455477 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -194,7 +194,7 @@ do_shutdown (void *cls) | |||
194 | GNUNET_NAMESTORE_disconnect (namestore); | 194 | GNUNET_NAMESTORE_disconnect (namestore); |
195 | namestore = NULL; | 195 | namestore = NULL; |
196 | } | 196 | } |
197 | GNUNET_free_non_null (url); | 197 | GNUNET_free (url); |
198 | url = NULL; | 198 | url = NULL; |
199 | } | 199 | } |
200 | 200 | ||
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index cb9bb61fe..8ffadeca4 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c | |||
@@ -165,7 +165,7 @@ do_shutdown (void *cls) | |||
165 | GNUNET_VPN_disconnect (vpn); | 165 | GNUNET_VPN_disconnect (vpn); |
166 | vpn = NULL; | 166 | vpn = NULL; |
167 | } | 167 | } |
168 | GNUNET_free_non_null (url); | 168 | GNUNET_free (url); |
169 | url = NULL; | 169 | url = NULL; |
170 | } | 170 | } |
171 | 171 | ||
diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am index b6d73bdf7..a9829c47e 100644 --- a/src/reclaim/Makefile.am +++ b/src/reclaim/Makefile.am | |||
@@ -51,10 +51,19 @@ libgnunet_plugin_rest_reclaim_la_LIBADD = \ | |||
51 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 51 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
52 | libgnunetreclaim.la \ | 52 | libgnunetreclaim.la \ |
53 | $(top_builddir)/src/json/libgnunetjson.la \ | 53 | $(top_builddir)/src/json/libgnunetjson.la \ |
54 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
54 | $(top_builddir)/src/rest/libgnunetrest.la \ | 55 | $(top_builddir)/src/rest/libgnunetrest.la \ |
55 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 56 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
56 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 57 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ |
57 | $(LTLIBINTL) -ljansson $(MHD_LIBS) | 58 | $(LTLIBINTL) -ljansson $(MHD_LIBS) |
59 | libgnunet_plugin_rest_reclaim_la_DEPENDENCIES = \ | ||
60 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
61 | libgnunetreclaim.la \ | ||
62 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
63 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
64 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
65 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | ||
66 | $(top_builddir)/src/util/libgnunetutil.la | ||
58 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ | 67 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ |
59 | $(GN_PLUGIN_LDFLAGS) | 68 | $(GN_PLUGIN_LDFLAGS) |
60 | libgnunet_plugin_rest_reclaim_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS) | 69 | libgnunet_plugin_rest_reclaim_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS) |
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c index e7ee814b6..6bef5b6fe 100644 --- a/src/reclaim/gnunet-reclaim.c +++ b/src/reclaim/gnunet-reclaim.c | |||
@@ -313,7 +313,7 @@ process_attrs (void *cls, | |||
313 | attr->flag, | 313 | attr->flag, |
314 | id, | 314 | id, |
315 | (NULL == attest) ? "" : "(ATTESTED)"); | 315 | (NULL == attest) ? "" : "(ATTESTED)"); |
316 | GNUNET_free_non_null (value_str); | 316 | GNUNET_free (value_str); |
317 | GNUNET_free (id); | 317 | GNUNET_free (id); |
318 | } | 318 | } |
319 | 319 | ||
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c index 205886c78..7e6b07514 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.c +++ b/src/reclaim/gnunet-service-reclaim_tickets.c | |||
@@ -971,7 +971,7 @@ cleanup_cth (struct RECLAIM_TICKETS_ConsumeHandle *cth) | |||
971 | { | 971 | { |
972 | if (NULL != lu->lookup_request) | 972 | if (NULL != lu->lookup_request) |
973 | GNUNET_GNS_lookup_cancel (lu->lookup_request); | 973 | GNUNET_GNS_lookup_cancel (lu->lookup_request); |
974 | GNUNET_free_non_null (lu->label); | 974 | GNUNET_free (lu->label); |
975 | GNUNET_CONTAINER_DLL_remove (cth->parallel_lookups_head, | 975 | GNUNET_CONTAINER_DLL_remove (cth->parallel_lookups_head, |
976 | cth->parallel_lookups_tail, | 976 | cth->parallel_lookups_tail, |
977 | lu); | 977 | lu); |
@@ -1292,7 +1292,7 @@ issue_ticket (struct TicketIssueHandle *ih) | |||
1292 | for (le = ih->attrs->list_head; NULL != le; le = le->next) | 1292 | for (le = ih->attrs->list_head; NULL != le; le = le->next) |
1293 | attrs_count++; | 1293 | attrs_count++; |
1294 | 1294 | ||
1295 | //Worst case we have one attestation per attribute | 1295 | // Worst case we have one attestation per attribute |
1296 | attrs_record = | 1296 | attrs_record = |
1297 | GNUNET_malloc (2 * attrs_count * sizeof(struct GNUNET_GNSRECORD_Data)); | 1297 | GNUNET_malloc (2 * attrs_count * sizeof(struct GNUNET_GNSRECORD_Data)); |
1298 | i = 0; | 1298 | i = 0; |
diff --git a/src/reclaim/json_reclaim.h b/src/reclaim/json_reclaim.h index 61ddb4378..c57971dcb 100644 --- a/src/reclaim/json_reclaim.h +++ b/src/reclaim/json_reclaim.h | |||
@@ -56,4 +56,3 @@ GNUNET_RECLAIM_JSON_spec_ticket (struct GNUNET_RECLAIM_Ticket **ticket); | |||
56 | struct GNUNET_JSON_Specification | 56 | struct GNUNET_JSON_Specification |
57 | GNUNET_RECLAIM_JSON_spec_claim_attest (struct | 57 | GNUNET_RECLAIM_JSON_spec_claim_attest (struct |
58 | GNUNET_RECLAIM_Attestation **attr); | 58 | GNUNET_RECLAIM_Attestation **attr); |
59 | |||
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index e309ed01d..ad2839200 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -616,7 +616,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, | |||
616 | + sizeof(struct GNUNET_CRYPTO_EcdsaSignature)) | 616 | + sizeof(struct GNUNET_CRYPTO_EcdsaSignature)) |
617 | { | 617 | { |
618 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n"); | 618 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n"); |
619 | GNUNET_free_non_null (code_payload); | 619 | GNUNET_free (code_payload); |
620 | return GNUNET_SYSERR; | 620 | return GNUNET_SYSERR; |
621 | } | 621 | } |
622 | 622 | ||
@@ -646,7 +646,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, | |||
646 | { | 646 | { |
647 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 647 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
648 | "Expected code verifier!\n"); | 648 | "Expected code verifier!\n"); |
649 | GNUNET_free_non_null (code_payload); | 649 | GNUNET_free (code_payload); |
650 | return GNUNET_SYSERR; | 650 | return GNUNET_SYSERR; |
651 | } | 651 | } |
652 | code_verifier_hash = GNUNET_malloc (256 / 8); | 652 | code_verifier_hash = GNUNET_malloc (256 / 8); |
@@ -669,7 +669,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, | |||
669 | expected_code_challenge, | 669 | expected_code_challenge, |
670 | code_challenge_len, | 670 | code_challenge_len, |
671 | code_challenge); | 671 | code_challenge); |
672 | GNUNET_free_non_null (code_payload); | 672 | GNUNET_free (code_payload); |
673 | GNUNET_free (expected_code_challenge); | 673 | GNUNET_free (expected_code_challenge); |
674 | return GNUNET_SYSERR; | 674 | return GNUNET_SYSERR; |
675 | } | 675 | } |
diff --git a/src/reclaim/plugin_reclaim_attribute_basic.c b/src/reclaim/plugin_reclaim_attribute_basic.c index 47fdd5f11..286186a93 100644 --- a/src/reclaim/plugin_reclaim_attribute_basic.c +++ b/src/reclaim/plugin_reclaim_attribute_basic.c | |||
@@ -90,6 +90,7 @@ basic_string_to_value (void *cls, | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | |||
93 | /** | 94 | /** |
94 | * Mapping of attribute type numbers to human-readable | 95 | * Mapping of attribute type numbers to human-readable |
95 | * attribute type names. | 96 | * attribute type names. |
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index 563bdd749..36ae937c1 100644 --- a/src/reclaim/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
@@ -557,12 +557,12 @@ cleanup_handle (struct RequestHandle *handle) | |||
557 | GNUNET_RECLAIM_cancel (handle->idp_op); | 557 | GNUNET_RECLAIM_cancel (handle->idp_op); |
558 | if (NULL != handle->idp) | 558 | if (NULL != handle->idp) |
559 | GNUNET_RECLAIM_disconnect (handle->idp); | 559 | GNUNET_RECLAIM_disconnect (handle->idp); |
560 | GNUNET_free_non_null (handle->url); | 560 | GNUNET_free (handle->url); |
561 | GNUNET_free_non_null (handle->tld); | 561 | GNUNET_free (handle->tld); |
562 | GNUNET_free_non_null (handle->redirect_prefix); | 562 | GNUNET_free (handle->redirect_prefix); |
563 | GNUNET_free_non_null (handle->redirect_suffix); | 563 | GNUNET_free (handle->redirect_suffix); |
564 | GNUNET_free_non_null (handle->emsg); | 564 | GNUNET_free (handle->emsg); |
565 | GNUNET_free_non_null (handle->edesc); | 565 | GNUNET_free (handle->edesc); |
566 | if (NULL != handle->gns_op) | 566 | if (NULL != handle->gns_op) |
567 | GNUNET_GNS_lookup_cancel (handle->gns_op); | 567 | GNUNET_GNS_lookup_cancel (handle->gns_op); |
568 | if (NULL != handle->gns_handle) | 568 | if (NULL != handle->gns_handle) |
@@ -572,13 +572,13 @@ cleanup_handle (struct RequestHandle *handle) | |||
572 | GNUNET_NAMESTORE_disconnect (handle->namestore_handle); | 572 | GNUNET_NAMESTORE_disconnect (handle->namestore_handle); |
573 | if (NULL != handle->oidc) | 573 | if (NULL != handle->oidc) |
574 | { | 574 | { |
575 | GNUNET_free_non_null (handle->oidc->client_id); | 575 | GNUNET_free (handle->oidc->client_id); |
576 | GNUNET_free_non_null (handle->oidc->login_identity); | 576 | GNUNET_free (handle->oidc->login_identity); |
577 | GNUNET_free_non_null (handle->oidc->nonce); | 577 | GNUNET_free (handle->oidc->nonce); |
578 | GNUNET_free_non_null (handle->oidc->redirect_uri); | 578 | GNUNET_free (handle->oidc->redirect_uri); |
579 | GNUNET_free_non_null (handle->oidc->response_type); | 579 | GNUNET_free (handle->oidc->response_type); |
580 | GNUNET_free_non_null (handle->oidc->scope); | 580 | GNUNET_free (handle->oidc->scope); |
581 | GNUNET_free_non_null (handle->oidc->state); | 581 | GNUNET_free (handle->oidc->state); |
582 | json_decref (handle->oidc->response); | 582 | json_decref (handle->oidc->response); |
583 | GNUNET_free (handle->oidc); | 583 | GNUNET_free (handle->oidc); |
584 | } | 584 | } |
@@ -594,8 +594,8 @@ cleanup_handle (struct RequestHandle *handle) | |||
594 | GNUNET_CONTAINER_DLL_remove (handle->ego_head, | 594 | GNUNET_CONTAINER_DLL_remove (handle->ego_head, |
595 | handle->ego_tail, | 595 | handle->ego_tail, |
596 | ego_entry); | 596 | ego_entry); |
597 | GNUNET_free_non_null (ego_entry->identifier); | 597 | GNUNET_free (ego_entry->identifier); |
598 | GNUNET_free_non_null (ego_entry->keystring); | 598 | GNUNET_free (ego_entry->keystring); |
599 | GNUNET_free (ego_entry); | 599 | GNUNET_free (ego_entry); |
600 | } | 600 | } |
601 | GNUNET_free (handle); | 601 | GNUNET_free (handle); |
@@ -1734,7 +1734,7 @@ login_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1734 | OIDC_COOKIE_EXPIRATION)); | 1734 | OIDC_COOKIE_EXPIRATION)); |
1735 | last_time = | 1735 | last_time = |
1736 | GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key); | 1736 | GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key); |
1737 | GNUNET_free_non_null (last_time); | 1737 | GNUNET_free (last_time); |
1738 | GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map, | 1738 | GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map, |
1739 | &cache_key, | 1739 | &cache_key, |
1740 | current_time, | 1740 | current_time, |
@@ -1804,7 +1804,7 @@ check_authorization (struct RequestHandle *handle, | |||
1804 | client_id = strtok (basic_authorization, ":"); | 1804 | client_id = strtok (basic_authorization, ":"); |
1805 | if (NULL == client_id) | 1805 | if (NULL == client_id) |
1806 | { | 1806 | { |
1807 | GNUNET_free_non_null (basic_authorization); | 1807 | GNUNET_free (basic_authorization); |
1808 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1808 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1809 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1809 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
1810 | return GNUNET_SYSERR; | 1810 | return GNUNET_SYSERR; |
@@ -1812,7 +1812,7 @@ check_authorization (struct RequestHandle *handle, | |||
1812 | pass = strtok (NULL, ":"); | 1812 | pass = strtok (NULL, ":"); |
1813 | if (NULL == pass) | 1813 | if (NULL == pass) |
1814 | { | 1814 | { |
1815 | GNUNET_free_non_null (basic_authorization); | 1815 | GNUNET_free (basic_authorization); |
1816 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1816 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1817 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1817 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
1818 | return GNUNET_SYSERR; | 1818 | return GNUNET_SYSERR; |
@@ -1826,7 +1826,7 @@ check_authorization (struct RequestHandle *handle, | |||
1826 | { | 1826 | { |
1827 | if (0 != strcmp (expected_pass, pass)) | 1827 | if (0 != strcmp (expected_pass, pass)) |
1828 | { | 1828 | { |
1829 | GNUNET_free_non_null (basic_authorization); | 1829 | GNUNET_free (basic_authorization); |
1830 | GNUNET_free (expected_pass); | 1830 | GNUNET_free (expected_pass); |
1831 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1831 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1832 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1832 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
@@ -1836,7 +1836,7 @@ check_authorization (struct RequestHandle *handle, | |||
1836 | } | 1836 | } |
1837 | else | 1837 | else |
1838 | { | 1838 | { |
1839 | GNUNET_free_non_null (basic_authorization); | 1839 | GNUNET_free (basic_authorization); |
1840 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR); | 1840 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR); |
1841 | handle->edesc = GNUNET_strdup ("gnunet configuration failed"); | 1841 | handle->edesc = GNUNET_strdup ("gnunet configuration failed"); |
1842 | handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; | 1842 | handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; |
@@ -1852,7 +1852,7 @@ check_authorization (struct RequestHandle *handle, | |||
1852 | } | 1852 | } |
1853 | if (NULL == handle->ego_entry) | 1853 | if (NULL == handle->ego_entry) |
1854 | { | 1854 | { |
1855 | GNUNET_free_non_null (basic_authorization); | 1855 | GNUNET_free (basic_authorization); |
1856 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1856 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1857 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1857 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
1858 | return GNUNET_SYSERR; | 1858 | return GNUNET_SYSERR; |
@@ -2504,7 +2504,7 @@ libgnunet_plugin_rest_openid_connect_done (void *cls) | |||
2504 | while (GNUNET_YES == | 2504 | while (GNUNET_YES == |
2505 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, | 2505 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, |
2506 | value)) | 2506 | value)) |
2507 | GNUNET_free_non_null (value); | 2507 | GNUNET_free (value); |
2508 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); | 2508 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); |
2509 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map); | 2509 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map); |
2510 | 2510 | ||
@@ -2513,10 +2513,10 @@ libgnunet_plugin_rest_openid_connect_done (void *cls) | |||
2513 | while (GNUNET_YES == | 2513 | while (GNUNET_YES == |
2514 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, | 2514 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, |
2515 | value)) | 2515 | value)) |
2516 | GNUNET_free_non_null (value); | 2516 | GNUNET_free (value); |
2517 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map); | 2517 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map); |
2518 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); | 2518 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); |
2519 | GNUNET_free_non_null (allow_methods); | 2519 | GNUNET_free (allow_methods); |
2520 | GNUNET_free (api); | 2520 | GNUNET_free (api); |
2521 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2521 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2522 | "OpenID Connect REST plugin is finished\n"); | 2522 | "OpenID Connect REST plugin is finished\n"); |
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 863dd0450..10ee2f801 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -576,7 +576,8 @@ attest_collect (void *cls, | |||
576 | if (GNUNET_OK == GNUNET_RECLAIM_attestation_get_expiration (attest, | 576 | if (GNUNET_OK == GNUNET_RECLAIM_attestation_get_expiration (attest, |
577 | &exp)) | 577 | &exp)) |
578 | { | 578 | { |
579 | json_object_set_new (attest_obj, "expiration", json_integer (exp.abs_value_us)); | 579 | json_object_set_new (attest_obj, "expiration", json_integer ( |
580 | exp.abs_value_us)); | ||
580 | } | 581 | } |
581 | id_str = GNUNET_STRINGS_data_to_string_alloc (&attest->id, | 582 | id_str = GNUNET_STRINGS_data_to_string_alloc (&attest->id, |
582 | sizeof(attest->id)); | 583 | sizeof(attest->id)); |
@@ -597,7 +598,7 @@ attest_collect (void *cls, | |||
597 | json_object_set_new (attr_obj, "name", json_string ( | 598 | json_object_set_new (attr_obj, "name", json_string ( |
598 | ale->attribute->name)); | 599 | ale->attribute->name)); |
599 | 600 | ||
600 | json_object_set_new (attr_obj, "flag", json_string ("1")); //FIXME | 601 | json_object_set_new (attr_obj, "flag", json_string ("1")); // FIXME |
601 | type = GNUNET_RECLAIM_attribute_number_to_typename (ale->attribute->type); | 602 | type = GNUNET_RECLAIM_attribute_number_to_typename (ale->attribute->type); |
602 | json_object_set_new (attr_obj, "type", json_string (type)); | 603 | json_object_set_new (attr_obj, "type", json_string (type)); |
603 | json_object_set_new (attr_obj, "id", json_string ("")); | 604 | json_object_set_new (attr_obj, "id", json_string ("")); |
@@ -1492,7 +1493,7 @@ libgnunet_plugin_rest_reclaim_done (void *cls) | |||
1492 | 1493 | ||
1493 | plugin->cfg = NULL; | 1494 | plugin->cfg = NULL; |
1494 | 1495 | ||
1495 | GNUNET_free_non_null (allow_methods); | 1496 | GNUNET_free (allow_methods); |
1496 | GNUNET_free (api); | 1497 | GNUNET_free (api); |
1497 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1498 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1498 | "Identity Provider REST plugin is finished\n"); | 1499 | "Identity Provider REST plugin is finished\n"); |
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c index cfe137949..ff549fa71 100644 --- a/src/reclaim/reclaim_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -658,7 +658,7 @@ handle_consume_ticket_result (void *cls, | |||
658 | } | 658 | } |
659 | GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); | 659 | GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); |
660 | free_op (op); | 660 | free_op (op); |
661 | GNUNET_free_non_null (attrs); | 661 | GNUNET_free (attrs); |
662 | return; | 662 | return; |
663 | } | 663 | } |
664 | GNUNET_assert (0); | 664 | GNUNET_assert (0); |
diff --git a/src/reclaim/reclaim_attestation.c b/src/reclaim/reclaim_attestation.c index bdf80a709..1f2b1890b 100644 --- a/src/reclaim/reclaim_attestation.c +++ b/src/reclaim/reclaim_attestation.c | |||
@@ -552,7 +552,7 @@ GNUNET_RECLAIM_attestation_get_issuer (const struct | |||
552 | int | 552 | int |
553 | GNUNET_RECLAIM_attestation_get_expiration (const struct | 553 | GNUNET_RECLAIM_attestation_get_expiration (const struct |
554 | GNUNET_RECLAIM_Attestation *attest, | 554 | GNUNET_RECLAIM_Attestation *attest, |
555 | struct GNUNET_TIME_Absolute* exp) | 555 | struct GNUNET_TIME_Absolute*exp) |
556 | { | 556 | { |
557 | unsigned int i; | 557 | unsigned int i; |
558 | struct Plugin *plugin; | 558 | struct Plugin *plugin; |
diff --git a/src/reclaim/reclaim_attribute.c b/src/reclaim/reclaim_attribute.c index 69c5351d3..05bdc1ac6 100644 --- a/src/reclaim/reclaim_attribute.c +++ b/src/reclaim/reclaim_attribute.c | |||
@@ -230,7 +230,8 @@ GNUNET_RECLAIM_attribute_value_to_string (uint32_t type, | |||
230 | */ | 230 | */ |
231 | struct GNUNET_RECLAIM_Attribute * | 231 | struct GNUNET_RECLAIM_Attribute * |
232 | GNUNET_RECLAIM_attribute_new (const char *attr_name, | 232 | GNUNET_RECLAIM_attribute_new (const char *attr_name, |
233 | const struct GNUNET_RECLAIM_Identifier *attestation, | 233 | const struct |
234 | GNUNET_RECLAIM_Identifier *attestation, | ||
234 | uint32_t type, | 235 | uint32_t type, |
235 | const void *data, | 236 | const void *data, |
236 | size_t data_size) | 237 | size_t data_size) |
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index 3f8133d61..e82e10e3b 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -448,9 +448,9 @@ do_shutdown (void *cls) | |||
448 | search_str_cnt < num_peers && NULL != search_strings; | 448 | search_str_cnt < num_peers && NULL != search_strings; |
449 | search_str_cnt++) | 449 | search_str_cnt++) |
450 | { | 450 | { |
451 | GNUNET_free_non_null (search_strings[search_str_cnt]); | 451 | GNUNET_free (search_strings[search_str_cnt]); |
452 | } | 452 | } |
453 | GNUNET_free_non_null (search_strings); | 453 | GNUNET_free (search_strings); |
454 | search_strings = NULL; | 454 | search_strings = NULL; |
455 | 455 | ||
456 | if (NULL != reg_handle) | 456 | if (NULL != reg_handle) |
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c index 9adde99bd..3d449a04e 100644 --- a/src/regex/gnunet-regex-simulation-profiler.c +++ b/src/regex/gnunet-regex-simulation-profiler.c | |||
@@ -255,7 +255,7 @@ reset_meter (struct ProgressMeter *meter) | |||
255 | static void | 255 | static void |
256 | free_meter (struct ProgressMeter *meter) | 256 | free_meter (struct ProgressMeter *meter) |
257 | { | 257 | { |
258 | GNUNET_free_non_null (meter->startup_string); | 258 | GNUNET_free (meter->startup_string); |
259 | GNUNET_free (meter); | 259 | GNUNET_free (meter); |
260 | } | 260 | } |
261 | 261 | ||
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c index 1dd4f6a97..cd33281e2 100644 --- a/src/regex/regex_internal.c +++ b/src/regex/regex_internal.c | |||
@@ -168,7 +168,7 @@ state_remove_transition (struct REGEX_INTERNAL_State *state, | |||
168 | if (transition->from_state != state) | 168 | if (transition->from_state != state) |
169 | return; | 169 | return; |
170 | 170 | ||
171 | GNUNET_free_non_null (transition->label); | 171 | GNUNET_free (transition->label); |
172 | 172 | ||
173 | state->transition_count--; | 173 | state->transition_count--; |
174 | GNUNET_CONTAINER_DLL_remove (state->transitions_head, | 174 | GNUNET_CONTAINER_DLL_remove (state->transitions_head, |
@@ -310,8 +310,8 @@ automaton_destroy_state (struct REGEX_INTERNAL_State *s) | |||
310 | if (NULL == s) | 310 | if (NULL == s) |
311 | return; | 311 | return; |
312 | 312 | ||
313 | GNUNET_free_non_null (s->name); | 313 | GNUNET_free (s->name); |
314 | GNUNET_free_non_null (s->proof); | 314 | GNUNET_free (s->proof); |
315 | state_set_clear (&s->nfa_set); | 315 | state_set_clear (&s->nfa_set); |
316 | for (t = s->transitions_head; NULL != t; t = next_t) | 316 | for (t = s->transitions_head; NULL != t; t = next_t) |
317 | { | 317 | { |
@@ -658,7 +658,7 @@ sb_realloc (struct StringBuffer *ret, size_t nlen) | |||
658 | ret->blen = nlen; | 658 | ret->blen = nlen; |
659 | GNUNET_memcpy (ret->abuf, ret->sbuf, ret->slen); | 659 | GNUNET_memcpy (ret->abuf, ret->sbuf, ret->slen); |
660 | ret->sbuf = ret->abuf; | 660 | ret->sbuf = ret->abuf; |
661 | GNUNET_free_non_null (old); | 661 | GNUNET_free (old); |
662 | } | 662 | } |
663 | 663 | ||
664 | 664 | ||
@@ -726,7 +726,7 @@ sb_wrap (struct StringBuffer *ret, const char *format, size_t extra_chars) | |||
726 | format, | 726 | format, |
727 | (int) ret->slen, | 727 | (int) ret->slen, |
728 | ret->sbuf); | 728 | ret->sbuf); |
729 | GNUNET_free_non_null (ret->abuf); | 729 | GNUNET_free (ret->abuf); |
730 | ret->abuf = temp; | 730 | ret->abuf = temp; |
731 | ret->sbuf = temp; | 731 | ret->sbuf = temp; |
732 | ret->blen = ret->slen + extra_chars + 1; | 732 | ret->blen = ret->slen + extra_chars + 1; |
@@ -1592,8 +1592,8 @@ automaton_create_proofs (struct REGEX_INTERNAL_Automaton *a) | |||
1592 | if ((NULL == R_last) || (NULL == R_cur)) | 1592 | if ((NULL == R_last) || (NULL == R_cur)) |
1593 | { | 1593 | { |
1594 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "malloc"); | 1594 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "malloc"); |
1595 | GNUNET_free_non_null (R_cur); | 1595 | GNUNET_free (R_cur); |
1596 | GNUNET_free_non_null (R_last); | 1596 | GNUNET_free (R_last); |
1597 | return GNUNET_SYSERR; | 1597 | return GNUNET_SYSERR; |
1598 | } | 1598 | } |
1599 | 1599 | ||
@@ -2159,7 +2159,7 @@ dfa_add_multi_strides_helper (void *cls, | |||
2159 | t->to_state); | 2159 | t->to_state); |
2160 | } | 2160 | } |
2161 | } | 2161 | } |
2162 | GNUNET_free_non_null (label); | 2162 | GNUNET_free (label); |
2163 | } | 2163 | } |
2164 | 2164 | ||
2165 | 2165 | ||
@@ -2213,7 +2213,7 @@ REGEX_INTERNAL_dfa_add_multi_strides (struct REGEX_INTERNAL_Context *regex_ctx, | |||
2213 | t_next = t->next; | 2213 | t_next = t->next; |
2214 | state_add_transition (regex_ctx, t->from_state, t->label, t->to_state); | 2214 | state_add_transition (regex_ctx, t->from_state, t->label, t->to_state); |
2215 | GNUNET_CONTAINER_DLL_remove (ctx.transitions_head, ctx.transitions_tail, t); | 2215 | GNUNET_CONTAINER_DLL_remove (ctx.transitions_head, ctx.transitions_tail, t); |
2216 | GNUNET_free_non_null (t->label); | 2216 | GNUNET_free (t->label); |
2217 | GNUNET_free (t); | 2217 | GNUNET_free (t); |
2218 | } | 2218 | } |
2219 | 2219 | ||
@@ -2361,7 +2361,7 @@ dfa_compress_paths (struct REGEX_INTERNAL_Context *regex_ctx, | |||
2361 | t_next = t->next; | 2361 | t_next = t->next; |
2362 | state_add_transition (regex_ctx, t->from_state, t->label, t->to_state); | 2362 | state_add_transition (regex_ctx, t->from_state, t->label, t->to_state); |
2363 | GNUNET_CONTAINER_DLL_remove (transitions_head, transitions_tail, t); | 2363 | GNUNET_CONTAINER_DLL_remove (transitions_head, transitions_tail, t); |
2364 | GNUNET_free_non_null (t->label); | 2364 | GNUNET_free (t->label); |
2365 | GNUNET_free (t); | 2365 | GNUNET_free (t); |
2366 | } | 2366 | } |
2367 | 2367 | ||
@@ -2972,7 +2972,7 @@ error: | |||
2972 | if (NULL != error_msg) | 2972 | if (NULL != error_msg) |
2973 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", error_msg); | 2973 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", error_msg); |
2974 | 2974 | ||
2975 | GNUNET_free_non_null (p); | 2975 | GNUNET_free (p); |
2976 | 2976 | ||
2977 | while (NULL != (nfa = ctx.stack_head)) | 2977 | while (NULL != (nfa = ctx.stack_head)) |
2978 | { | 2978 | { |
@@ -3133,8 +3133,8 @@ REGEX_INTERNAL_automaton_destroy (struct REGEX_INTERNAL_Automaton *a) | |||
3133 | if (NULL == a) | 3133 | if (NULL == a) |
3134 | return; | 3134 | return; |
3135 | 3135 | ||
3136 | GNUNET_free_non_null (a->regex); | 3136 | GNUNET_free (a->regex); |
3137 | GNUNET_free_non_null (a->canonical_regex); | 3137 | GNUNET_free (a->canonical_regex); |
3138 | 3138 | ||
3139 | for (s = a->states_head; NULL != s; s = next_state) | 3139 | for (s = a->states_head; NULL != s; s = next_state) |
3140 | { | 3140 | { |
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c index 05001b5d2..58cd8dc10 100644 --- a/src/regex/regex_test_lib.c +++ b/src/regex/regex_test_lib.c | |||
@@ -222,10 +222,10 @@ regex_combine (struct RegexCombineCtx *ctx) | |||
222 | else | 222 | else |
223 | { | 223 | { |
224 | GNUNET_asprintf (&tmp, "%s%s|", regex, s); | 224 | GNUNET_asprintf (&tmp, "%s%s|", regex, s); |
225 | GNUNET_free_non_null (regex); | 225 | GNUNET_free (regex); |
226 | regex = tmp; | 226 | regex = tmp; |
227 | } | 227 | } |
228 | GNUNET_free_non_null (s); | 228 | GNUNET_free (s); |
229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " so far '%s' for inner %s\n", regex, | 229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " so far '%s' for inner %s\n", regex, |
230 | ctx->s); | 230 | ctx->s); |
231 | } | 231 | } |
@@ -517,7 +517,7 @@ regex_ctx_destroy (struct RegexCombineCtx *ctx) | |||
517 | { | 517 | { |
518 | regex_ctx_destroy (ctx->children[i]); | 518 | regex_ctx_destroy (ctx->children[i]); |
519 | } | 519 | } |
520 | GNUNET_free_non_null (ctx->s); /* 's' on root node is null */ | 520 | GNUNET_free (ctx->s); /* 's' on root node is null */ |
521 | GNUNET_free (ctx->children); | 521 | GNUNET_free (ctx->children); |
522 | GNUNET_free (ctx); | 522 | GNUNET_free (ctx); |
523 | } | 523 | } |
@@ -632,7 +632,7 @@ REGEX_TEST_read_from_file (const char *filename) | |||
632 | regex = NULL; | 632 | regex = NULL; |
633 | } | 633 | } |
634 | while (offset < size); | 634 | while (offset < size); |
635 | GNUNET_free_non_null (regex); | 635 | GNUNET_free (regex); |
636 | GNUNET_free (buffer); | 636 | GNUNET_free (buffer); |
637 | 637 | ||
638 | return regexes; | 638 | return regexes; |
diff --git a/src/regex/test_regex_eval_api.c b/src/regex/test_regex_eval_api.c index 767571156..7cd081269 100644 --- a/src/regex/test_regex_eval_api.c +++ b/src/regex/test_regex_eval_api.c | |||
@@ -178,9 +178,9 @@ test_random (unsigned int rx_length, unsigned int max_str_len, | |||
178 | return result; | 178 | return result; |
179 | 179 | ||
180 | error: | 180 | error: |
181 | GNUNET_free_non_null (matching_str); | 181 | GNUNET_free (matching_str); |
182 | GNUNET_free_non_null (rand_rx); | 182 | GNUNET_free (rand_rx); |
183 | GNUNET_free_non_null (canonical_regex); | 183 | GNUNET_free (canonical_regex); |
184 | return -1; | 184 | return -1; |
185 | } | 185 | } |
186 | 186 | ||
@@ -371,7 +371,7 @@ main (int argc, char *argv[]) | |||
371 | REGEX_INTERNAL_automaton_destroy (a); | 371 | REGEX_INTERNAL_automaton_destroy (a); |
372 | if (0 != check_dfa) | 372 | if (0 != check_dfa) |
373 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "check_proof: %s\n", check_proof); | 373 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "check_proof: %s\n", check_proof); |
374 | GNUNET_free_non_null (check_proof); | 374 | GNUNET_free (check_proof); |
375 | 375 | ||
376 | regfree (&rx); | 376 | regfree (&rx); |
377 | } | 377 | } |
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 30eade623..875509536 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c | |||
@@ -209,7 +209,7 @@ plugin_callback (void *cls, struct MHD_Response *resp, int status) | |||
209 | static int | 209 | static int |
210 | cleanup_url_map (void *cls, const struct GNUNET_HashCode *key, void *value) | 210 | cleanup_url_map (void *cls, const struct GNUNET_HashCode *key, void *value) |
211 | { | 211 | { |
212 | GNUNET_free_non_null (value); | 212 | GNUNET_free (value); |
213 | return GNUNET_YES; | 213 | return GNUNET_YES; |
214 | } | 214 | } |
215 | 215 | ||
@@ -728,8 +728,8 @@ do_shutdown (void *cls) | |||
728 | { | 728 | { |
729 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n"); | 729 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n"); |
730 | kill_httpd (); | 730 | kill_httpd (); |
731 | GNUNET_free_non_null (allow_credentials); | 731 | GNUNET_free (allow_credentials); |
732 | GNUNET_free_non_null (allow_headers); | 732 | GNUNET_free (allow_headers); |
733 | } | 733 | } |
734 | 734 | ||
735 | 735 | ||
@@ -1055,7 +1055,7 @@ main (int argc, char *const *argv) | |||
1055 | ? 0 | 1055 | ? 0 |
1056 | : 1; | 1056 | : 1; |
1057 | MHD_destroy_response (failure_response); | 1057 | MHD_destroy_response (failure_response); |
1058 | GNUNET_free_non_null ((char *) argv); | 1058 | GNUNET_free_nz ((char *) argv); |
1059 | return ret; | 1059 | return ret; |
1060 | } | 1060 | } |
1061 | 1061 | ||
diff --git a/src/revocation/Makefile.am b/src/revocation/Makefile.am index 6efd461c1..a90f8cd79 100644 --- a/src/revocation/Makefile.am +++ b/src/revocation/Makefile.am | |||
@@ -28,8 +28,14 @@ libgnunet_plugin_block_revocation_la_SOURCES = \ | |||
28 | libgnunet_plugin_block_revocation_la_LIBADD = \ | 28 | libgnunet_plugin_block_revocation_la_LIBADD = \ |
29 | libgnunetrevocation.la \ | 29 | libgnunetrevocation.la \ |
30 | $(top_builddir)/src/block/libgnunetblockgroup.la \ | 30 | $(top_builddir)/src/block/libgnunetblockgroup.la \ |
31 | $(top_builddir)/src/block/libgnunetblock.la \ | ||
31 | $(top_builddir)/src/util/libgnunetutil.la \ | 32 | $(top_builddir)/src/util/libgnunetutil.la \ |
32 | $(LTLIBINTL) | 33 | $(LTLIBINTL) |
34 | libgnunet_plugin_block_revocation_la_DEPENDENCIES = \ | ||
35 | libgnunetrevocation.la \ | ||
36 | $(top_builddir)/src/block/libgnunetblockgroup.la \ | ||
37 | $(top_builddir)/src/block/libgnunetblock.la \ | ||
38 | $(top_builddir)/src/util/libgnunetutil.la | ||
33 | libgnunet_plugin_block_revocation_la_LDFLAGS = \ | 39 | libgnunet_plugin_block_revocation_la_LDFLAGS = \ |
34 | $(GN_PLUGIN_LDFLAGS) | 40 | $(GN_PLUGIN_LDFLAGS) |
35 | 41 | ||
diff --git a/src/revocation/gnunet-revocation-tvg.c b/src/revocation/gnunet-revocation-tvg.c index b8f462b28..29df1bb4d 100644 --- a/src/revocation/gnunet-revocation-tvg.c +++ b/src/revocation/gnunet-revocation-tvg.c | |||
@@ -43,13 +43,14 @@ print_bytes (void *buf, | |||
43 | 43 | ||
44 | for (i = 0; i < buf_len; i++) | 44 | for (i = 0; i < buf_len; i++) |
45 | { | 45 | { |
46 | if ((0 != i) && (0 != fold) && (i%fold == 0)) | 46 | if ((0 != i) && (0 != fold) && (i % fold == 0)) |
47 | printf("\n"); | 47 | printf ("\n"); |
48 | printf("%02x", ((unsigned char*)buf)[i]); | 48 | printf ("%02x", ((unsigned char*) buf)[i]); |
49 | } | 49 | } |
50 | printf("\n"); | 50 | printf ("\n"); |
51 | } | 51 | } |
52 | 52 | ||
53 | |||
53 | /** | 54 | /** |
54 | * Main function that will be run. | 55 | * Main function that will be run. |
55 | * | 56 | * |
@@ -73,12 +74,12 @@ run (void *cls, | |||
73 | GNUNET_CRYPTO_ecdsa_key_create (&id_priv); | 74 | GNUNET_CRYPTO_ecdsa_key_create (&id_priv); |
74 | GNUNET_CRYPTO_ecdsa_key_get_public (&id_priv, | 75 | GNUNET_CRYPTO_ecdsa_key_get_public (&id_priv, |
75 | &id_pub); | 76 | &id_pub); |
76 | fprintf(stdout, "Zone private key (d, little-endian scalar):\n"); | 77 | fprintf (stdout, "Zone private key (d, little-endian scalar):\n"); |
77 | print_bytes (&id_priv, sizeof(id_priv), 0); | 78 | print_bytes (&id_priv, sizeof(id_priv), 0); |
78 | fprintf(stdout, "\n"); | 79 | fprintf (stdout, "\n"); |
79 | fprintf(stdout, "Zone public key (zk):\n"); | 80 | fprintf (stdout, "Zone public key (zk):\n"); |
80 | print_bytes (&id_pub, sizeof(id_pub), 0); | 81 | print_bytes (&id_pub, sizeof(id_pub), 0); |
81 | fprintf(stdout, "\n"); | 82 | fprintf (stdout, "\n"); |
82 | memset (&pow, 0, sizeof (pow)); | 83 | memset (&pow, 0, sizeof (pow)); |
83 | GNUNET_REVOCATION_pow_init (&id_priv, | 84 | GNUNET_REVOCATION_pow_init (&id_priv, |
84 | &pow); | 85 | &pow); |
@@ -99,7 +100,7 @@ run (void *cls, | |||
99 | GNUNET_assert (GNUNET_OK == GNUNET_REVOCATION_check_pow (&pow, | 100 | GNUNET_assert (GNUNET_OK == GNUNET_REVOCATION_check_pow (&pow, |
100 | TEST_DIFFICULTY, | 101 | TEST_DIFFICULTY, |
101 | exp)); | 102 | exp)); |
102 | fprintf(stdout, "Proof:\n"); | 103 | fprintf (stdout, "Proof:\n"); |
103 | print_bytes (&pow, | 104 | print_bytes (&pow, |
104 | sizeof (pow), | 105 | sizeof (pow), |
105 | 8); | 106 | 8); |
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 3815e47b0..e0b195aa9 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -468,9 +468,9 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow, | |||
468 | /** | 468 | /** |
469 | * First, check if PoW set is strictly monotically increasing | 469 | * First, check if PoW set is strictly monotically increasing |
470 | */ | 470 | */ |
471 | for (unsigned int i = 0; i < POW_COUNT-1; i++) | 471 | for (unsigned int i = 0; i < POW_COUNT - 1; i++) |
472 | { | 472 | { |
473 | if (GNUNET_ntohll (pow->pow[i]) >= GNUNET_ntohll (pow->pow[i+1])) | 473 | if (GNUNET_ntohll (pow->pow[i]) >= GNUNET_ntohll (pow->pow[i + 1])) |
474 | return GNUNET_NO; | 474 | return GNUNET_NO; |
475 | } | 475 | } |
476 | GNUNET_memcpy (&buf[sizeof(uint64_t)], | 476 | GNUNET_memcpy (&buf[sizeof(uint64_t)], |
@@ -592,6 +592,7 @@ GNUNET_REVOCATION_pow_start (struct GNUNET_REVOCATION_PowP *pow, | |||
592 | return pc; | 592 | return pc; |
593 | } | 593 | } |
594 | 594 | ||
595 | |||
595 | /** | 596 | /** |
596 | * Comparison function for quicksort | 597 | * Comparison function for quicksort |
597 | * | 598 | * |
@@ -602,9 +603,10 @@ GNUNET_REVOCATION_pow_start (struct GNUNET_REVOCATION_PowP *pow, | |||
602 | static int | 603 | static int |
603 | cmp_pow_value (const void *a, const void *b) | 604 | cmp_pow_value (const void *a, const void *b) |
604 | { | 605 | { |
605 | return ( GNUNET_ntohll(*(uint64_t*)a) - GNUNET_ntohll(*(uint64_t*)b)); | 606 | return (GNUNET_ntohll (*(uint64_t*) a) - GNUNET_ntohll (*(uint64_t*) b)); |
606 | } | 607 | } |
607 | 608 | ||
609 | |||
608 | /** | 610 | /** |
609 | * Calculate a key revocation valid for broadcasting for a number | 611 | * Calculate a key revocation valid for broadcasting for a number |
610 | * of epochs. | 612 | * of epochs. |
diff --git a/src/revocation/test_revocation.c b/src/revocation/test_revocation.c index 1c2efa60f..b65567d79 100644 --- a/src/revocation/test_revocation.c +++ b/src/revocation/test_revocation.c | |||
@@ -141,11 +141,11 @@ revocation_cb (void *cls, enum GNUNET_GenericReturnValue is_valid) | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | struct GNUNET_REVOCATION_Pow proof_of_work; | ||
145 | 144 | ||
145 | static struct GNUNET_REVOCATION_PowP proof_of_work; | ||
146 | 146 | ||
147 | static void | 147 | static void |
148 | ego_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego) | 148 | ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) |
149 | { | 149 | { |
150 | static int completed = 0; | 150 | static int completed = 0; |
151 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; | 151 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; |
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index af43a0fa1..08d1d2d34 100644 --- a/src/rps/gnunet-rps-profiler.c +++ b/src/rps/gnunet-rps-profiler.c | |||
@@ -924,10 +924,10 @@ tofile_ (const char *file_name, const char *line) | |||
924 | int size; \ | 924 | int size; \ |
925 | size = GNUNET_snprintf (tmp_buf, sizeof(tmp_buf), __VA_ARGS__); \ | 925 | size = GNUNET_snprintf (tmp_buf, sizeof(tmp_buf), __VA_ARGS__); \ |
926 | if (0 > size) \ | 926 | if (0 > size) \ |
927 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ | 927 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ |
928 | "Failed to create tmp_buf\n"); \ | 928 | "Failed to create tmp_buf\n"); \ |
929 | else \ | 929 | else \ |
930 | tofile_ (file_name, tmp_buf); \ | 930 | tofile_ (file_name, tmp_buf); \ |
931 | } while (0); | 931 | } while (0); |
932 | 932 | ||
933 | 933 | ||
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c index da24ca4c9..8b69dae96 100644 --- a/src/rps/rps_api.c +++ b/src/rps/rps_api.c | |||
@@ -674,7 +674,7 @@ handle_stream_input (void *cls, | |||
674 | // peers = (struct GNUNET_PeerIdentity *) &msg[1]; | 674 | // peers = (struct GNUNET_PeerIdentity *) &msg[1]; |
675 | num_peers = ntohl (msg->num_peers); | 675 | num_peers = ntohl (msg->num_peers); |
676 | srh_callback_num_peers = num_peers; | 676 | srh_callback_num_peers = num_peers; |
677 | GNUNET_free_non_null (srh_callback_peers); | 677 | GNUNET_free (srh_callback_peers); |
678 | srh_callback_peers = GNUNET_new_array (num_peers, | 678 | srh_callback_peers = GNUNET_new_array (num_peers, |
679 | struct GNUNET_PeerIdentity); | 679 | struct GNUNET_PeerIdentity); |
680 | GNUNET_memcpy (srh_callback_peers, | 680 | GNUNET_memcpy (srh_callback_peers, |
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 81cf63c72..a7dc3aa00 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c | |||
@@ -656,10 +656,10 @@ tofile_ (const char *file_name, const char *line) | |||
656 | int size; \ | 656 | int size; \ |
657 | size = GNUNET_snprintf (tmp_buf, sizeof(tmp_buf), __VA_ARGS__); \ | 657 | size = GNUNET_snprintf (tmp_buf, sizeof(tmp_buf), __VA_ARGS__); \ |
658 | if (0 > size) \ | 658 | if (0 > size) \ |
659 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ | 659 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ |
660 | "Failed to create tmp_buf\n"); \ | 660 | "Failed to create tmp_buf\n"); \ |
661 | else \ | 661 | else \ |
662 | tofile_ (file_name, tmp_buf); \ | 662 | tofile_ (file_name, tmp_buf); \ |
663 | } while (0); | 663 | } while (0); |
664 | 664 | ||
665 | 665 | ||
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 8b46f68de..2b859d81a 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -492,7 +492,7 @@ destroy_elements_iterator (void *cls, | |||
492 | { | 492 | { |
493 | struct ElementEntry *ee = value; | 493 | struct ElementEntry *ee = value; |
494 | 494 | ||
495 | GNUNET_free_non_null (ee->mutations); | 495 | GNUNET_free (ee->mutations); |
496 | GNUNET_free (ee); | 496 | GNUNET_free (ee); |
497 | return GNUNET_YES; | 497 | return GNUNET_YES; |
498 | } | 498 | } |
@@ -570,7 +570,7 @@ client_disconnect_cb (void *cls, | |||
570 | content->elements = NULL; | 570 | content->elements = NULL; |
571 | GNUNET_free (content); | 571 | GNUNET_free (content); |
572 | } | 572 | } |
573 | GNUNET_free_non_null (set->excluded_generations); | 573 | GNUNET_free (set->excluded_generations); |
574 | set->excluded_generations = NULL; | 574 | set->excluded_generations = NULL; |
575 | 575 | ||
576 | /* remove set from pending copy requests */ | 576 | /* remove set from pending copy requests */ |
diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c index 993cead11..9313483bb 100644 --- a/src/set/gnunet-service-set_intersection.c +++ b/src/set/gnunet-service-set_intersection.c | |||
@@ -868,7 +868,7 @@ process_bf (struct Operation *op) | |||
868 | GNUNET_CONTAINER_multihashmap_size (op->state->my_elements)); | 868 | GNUNET_CONTAINER_multihashmap_size (op->state->my_elements)); |
869 | op->state->full_result_iter | 869 | op->state->full_result_iter |
870 | = GNUNET_CONTAINER_multihashmap_iterator_create ( | 870 | = GNUNET_CONTAINER_multihashmap_iterator_create ( |
871 | op->state->my_elements); | 871 | op->state->my_elements); |
872 | send_remaining_elements (op); | 872 | send_remaining_elements (op); |
873 | return; | 873 | return; |
874 | } | 874 | } |
diff --git a/src/set/gnunet-service-set_union_strata_estimator.c b/src/set/gnunet-service-set_union_strata_estimator.c index a59dbbd57..97b4a1f98 100644 --- a/src/set/gnunet-service-set_union_strata_estimator.c +++ b/src/set/gnunet-service-set_union_strata_estimator.c | |||
@@ -120,7 +120,7 @@ strata_estimator_read (const void *buf, | |||
120 | if (buf_len != se->strata_count * se->ibf_size * IBF_BUCKET_SIZE) | 120 | if (buf_len != se->strata_count * se->ibf_size * IBF_BUCKET_SIZE) |
121 | { | 121 | { |
122 | GNUNET_break (0); /* very odd error */ | 122 | GNUNET_break (0); /* very odd error */ |
123 | GNUNET_free_non_null (dbuf); | 123 | GNUNET_free (dbuf); |
124 | return GNUNET_SYSERR; | 124 | return GNUNET_SYSERR; |
125 | } | 125 | } |
126 | 126 | ||
@@ -129,7 +129,7 @@ strata_estimator_read (const void *buf, | |||
129 | ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]); | 129 | ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]); |
130 | buf += se->ibf_size * IBF_BUCKET_SIZE; | 130 | buf += se->ibf_size * IBF_BUCKET_SIZE; |
131 | } | 131 | } |
132 | GNUNET_free_non_null (dbuf); | 132 | GNUNET_free (dbuf); |
133 | return GNUNET_OK; | 133 | return GNUNET_OK; |
134 | } | 134 | } |
135 | 135 | ||
@@ -149,7 +149,7 @@ strata_estimator_insert (struct StrataEstimator *se, | |||
149 | 149 | ||
150 | v = key.key_val; | 150 | v = key.key_val; |
151 | /* count trailing '1'-bits of v */ | 151 | /* count trailing '1'-bits of v */ |
152 | for (i = 0; v &1; v >>= 1, i++) | 152 | for (i = 0; v & 1; v >>= 1, i++) |
153 | /* empty */; | 153 | /* empty */; |
154 | ibf_insert (se->strata[i], key); | 154 | ibf_insert (se->strata[i], key); |
155 | } | 155 | } |
@@ -170,7 +170,7 @@ strata_estimator_remove (struct StrataEstimator *se, | |||
170 | 170 | ||
171 | v = key.key_val; | 171 | v = key.key_val; |
172 | /* count trailing '1'-bits of v */ | 172 | /* count trailing '1'-bits of v */ |
173 | for (i = 0; v &1; v >>= 1, i++) | 173 | for (i = 0; v & 1; v >>= 1, i++) |
174 | /* empty */; | 174 | /* empty */; |
175 | ibf_remove (se->strata[i], key); | 175 | ibf_remove (se->strata[i], key); |
176 | } | 176 | } |
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index d40f74aaf..31c367e91 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c | |||
@@ -290,7 +290,8 @@ save () | |||
290 | msg->flags = | 290 | msg->flags = |
291 | htonl (pos->persistent ? GNUNET_STATISTICS_SETFLAG_PERSISTENT : 0); | 291 | htonl (pos->persistent ? GNUNET_STATISTICS_SETFLAG_PERSISTENT : 0); |
292 | msg->value = GNUNET_htonll (pos->value); | 292 | msg->value = GNUNET_htonll (pos->value); |
293 | if (GNUNET_OK != GNUNET_BIO_write (wh, "statistics-save-msg", msg, size)) | 293 | if (GNUNET_OK != GNUNET_BIO_write (wh, "statistics-save-msg", msg, |
294 | size)) | ||
294 | { | 295 | { |
295 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn); | 296 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn); |
296 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) | 297 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) |
@@ -319,7 +320,7 @@ save () | |||
319 | total, | 320 | total, |
320 | fn); | 321 | fn); |
321 | } | 322 | } |
322 | GNUNET_free_non_null (fn); | 323 | GNUNET_free (fn); |
323 | } | 324 | } |
324 | 325 | ||
325 | 326 | ||
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 63afde877..b9aedb4e7 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -880,7 +880,7 @@ main (int argc, char *const *argv) | |||
880 | GNUNET_array_grow (nodes, | 880 | GNUNET_array_grow (nodes, |
881 | num_nodes, | 881 | num_nodes, |
882 | 0); | 882 | 0); |
883 | GNUNET_free_non_null (remote_host); | 883 | GNUNET_free (remote_host); |
884 | GNUNET_free_nz ((void *) argv); | 884 | GNUNET_free_nz ((void *) argv); |
885 | return ret; | 885 | return ret; |
886 | } | 886 | } |
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 869d51544..12c09b7d2 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -374,8 +374,8 @@ schedule_watch_request (struct GNUNET_STATISTICS_Handle *h, | |||
374 | static void | 374 | static void |
375 | free_action_item (struct GNUNET_STATISTICS_GetHandle *gh) | 375 | free_action_item (struct GNUNET_STATISTICS_GetHandle *gh) |
376 | { | 376 | { |
377 | GNUNET_free_non_null (gh->subsystem); | 377 | GNUNET_free (gh->subsystem); |
378 | GNUNET_free_non_null (gh->name); | 378 | GNUNET_free (gh->name); |
379 | GNUNET_free (gh); | 379 | GNUNET_free (gh); |
380 | } | 380 | } |
381 | 381 | ||
diff --git a/src/statistics/test_statistics_api.c b/src/statistics/test_statistics_api.c index fcdeccad6..c9e568870 100644 --- a/src/statistics/test_statistics_api.c +++ b/src/statistics/test_statistics_api.c | |||
@@ -197,8 +197,8 @@ main (int argc, char *argv_ign[]) | |||
197 | NULL); | 197 | NULL); |
198 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); | 198 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); |
199 | proc = | 199 | proc = |
200 | GNUNET_OS_start_process (GNUNET_YES, | 200 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
201 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 201 | | GNUNET_OS_USE_PIPE_CONTROL, |
202 | NULL, NULL, NULL, | 202 | NULL, NULL, NULL, |
203 | binary, | 203 | binary, |
204 | "gnunet-service-statistics", | 204 | "gnunet-service-statistics", |
@@ -225,8 +225,8 @@ main (int argc, char *argv_ign[]) | |||
225 | ok = 1; | 225 | ok = 1; |
226 | /* restart to check persistence! */ | 226 | /* restart to check persistence! */ |
227 | proc = | 227 | proc = |
228 | GNUNET_OS_start_process (GNUNET_YES, | 228 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
229 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 229 | | GNUNET_OS_USE_PIPE_CONTROL, |
230 | NULL, NULL, NULL, | 230 | NULL, NULL, NULL, |
231 | binary, | 231 | binary, |
232 | "gnunet-service-statistics", | 232 | "gnunet-service-statistics", |
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c index 50507bdc4..ad273287d 100644 --- a/src/statistics/test_statistics_api_loop.c +++ b/src/statistics/test_statistics_api_loop.c | |||
@@ -98,7 +98,8 @@ main (int argc, char *argv_ign[]) | |||
98 | 98 | ||
99 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); | 99 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); |
100 | proc = | 100 | proc = |
101 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 101 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
102 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
102 | NULL, NULL, NULL, | 103 | NULL, NULL, NULL, |
103 | binary, | 104 | binary, |
104 | "gnunet-service-statistics", | 105 | "gnunet-service-statistics", |
diff --git a/src/statistics/test_statistics_api_watch.c b/src/statistics/test_statistics_api_watch.c index 06e639599..2d9d08305 100644 --- a/src/statistics/test_statistics_api_watch.c +++ b/src/statistics/test_statistics_api_watch.c | |||
@@ -130,7 +130,8 @@ main (int argc, char *argv_ign[]) | |||
130 | 130 | ||
131 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); | 131 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); |
132 | proc = | 132 | proc = |
133 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 133 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
134 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
134 | NULL, NULL, NULL, | 135 | NULL, NULL, NULL, |
135 | binary, | 136 | binary, |
136 | "gnunet-service-statistics", | 137 | "gnunet-service-statistics", |
diff --git a/src/statistics/test_statistics_api_watch_zero_value.c b/src/statistics/test_statistics_api_watch_zero_value.c index 80ca57c18..cb2694f8f 100644 --- a/src/statistics/test_statistics_api_watch_zero_value.c +++ b/src/statistics/test_statistics_api_watch_zero_value.c | |||
@@ -168,7 +168,8 @@ main (int argc, char *argv_ign[]) | |||
168 | 168 | ||
169 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); | 169 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics"); |
170 | proc = | 170 | proc = |
171 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 171 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
172 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
172 | NULL, NULL, NULL, | 173 | NULL, NULL, NULL, |
173 | binary, | 174 | binary, |
174 | "gnunet-service-statistics", | 175 | "gnunet-service-statistics", |
diff --git a/src/testbed-logger/test_testbed_logger_api.c b/src/testbed-logger/test_testbed_logger_api.c index 7496184c0..085f83d0e 100644 --- a/src/testbed-logger/test_testbed_logger_api.c +++ b/src/testbed-logger/test_testbed_logger_api.c | |||
@@ -88,7 +88,7 @@ shutdown_now () | |||
88 | { | 88 | { |
89 | CANCEL_TASK (abort_task); | 89 | CANCEL_TASK (abort_task); |
90 | CANCEL_TASK (write_task); | 90 | CANCEL_TASK (write_task); |
91 | GNUNET_free_non_null (search_dir); | 91 | GNUNET_free (search_dir); |
92 | if (NULL != h) | 92 | if (NULL != h) |
93 | GNUNET_TESTBED_LOGGER_disconnect (h); | 93 | GNUNET_TESTBED_LOGGER_disconnect (h); |
94 | GNUNET_SCHEDULER_shutdown (); | 94 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index 62b49af78..7c1e217bb 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -111,6 +111,12 @@ libgnunettestbed_la_LIBADD = $(XLIB) \ | |||
111 | $(top_builddir)/src/util/libgnunetutil.la \ | 111 | $(top_builddir)/src/util/libgnunetutil.la \ |
112 | $(top_builddir)/src/testing/libgnunettesting.la \ | 112 | $(top_builddir)/src/testing/libgnunettesting.la \ |
113 | $(LTLIBINTL) | 113 | $(LTLIBINTL) |
114 | libgnunettestbed_la_DEPENDENCIES = \ | ||
115 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | ||
116 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
117 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
118 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
119 | $(top_builddir)/src/testing/libgnunettesting.la | ||
114 | libgnunettestbed_la_LDFLAGS = \ | 120 | libgnunettestbed_la_LDFLAGS = \ |
115 | $(GN_LIB_LDFLAGS) \ | 121 | $(GN_LIB_LDFLAGS) \ |
116 | -version-info 0:0:0 | 122 | -version-info 0:0:0 |
diff --git a/src/testbed/generate-underlay-topology.c b/src/testbed/generate-underlay-topology.c index 726bed179..97c3c1e67 100644 --- a/src/testbed/generate-underlay-topology.c +++ b/src/testbed/generate-underlay-topology.c | |||
@@ -51,12 +51,12 @@ | |||
51 | __LINE__, \ | 51 | __LINE__, \ |
52 | sqlite3_errmsg (db)); \ | 52 | sqlite3_errmsg (db)); \ |
53 | if (msg != NULL) \ | 53 | if (msg != NULL) \ |
54 | GNUNET_asprintf (msg, \ | 54 | GNUNET_asprintf (msg, \ |
55 | _ ("`%s' failed at %s:%u with error: %s"), \ | 55 | _ ("`%s' failed at %s:%u with error: %s"), \ |
56 | cmd, \ | 56 | cmd, \ |
57 | __FILE__, \ | 57 | __FILE__, \ |
58 | __LINE__, \ | 58 | __LINE__, \ |
59 | sqlite3_errmsg (db)); \ | 59 | sqlite3_errmsg (db)); \ |
60 | } while (0) | 60 | } while (0) |
61 | 61 | ||
62 | 62 | ||
diff --git a/src/testbed/gnunet-daemon-latency-logger.c b/src/testbed/gnunet-daemon-latency-logger.c index c13750db7..cbc9cfdbf 100644 --- a/src/testbed/gnunet-daemon-latency-logger.c +++ b/src/testbed/gnunet-daemon-latency-logger.c | |||
@@ -53,8 +53,8 @@ | |||
53 | "`%s' failed at %s:%d with error: %s\n"), \ | 53 | "`%s' failed at %s:%d with error: %s\n"), \ |
54 | cmd, __FILE__, __LINE__, sqlite3_errmsg (db)); \ | 54 | cmd, __FILE__, __LINE__, sqlite3_errmsg (db)); \ |
55 | if (msg != NULL) \ | 55 | if (msg != NULL) \ |
56 | GNUNET_asprintf (msg, _ ("`%s' failed at %s:%u with error: %s"), cmd, \ | 56 | GNUNET_asprintf (msg, _ ("`%s' failed at %s:%u with error: %s"), cmd, \ |
57 | __FILE__, __LINE__, sqlite3_errmsg (db)); \ | 57 | __FILE__, __LINE__, sqlite3_errmsg (db)); \ |
58 | } while (0) | 58 | } while (0) |
59 | 59 | ||
60 | 60 | ||
diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c index 2bff7cdd4..c3b424c9b 100644 --- a/src/testbed/gnunet-daemon-testbed-underlay.c +++ b/src/testbed/gnunet-daemon-testbed-underlay.c | |||
@@ -57,8 +57,8 @@ | |||
57 | "`%s' failed at %s:%d with error: %s\n"), \ | 57 | "`%s' failed at %s:%d with error: %s\n"), \ |
58 | cmd, __FILE__, __LINE__, sqlite3_errmsg (db)); \ | 58 | cmd, __FILE__, __LINE__, sqlite3_errmsg (db)); \ |
59 | if (msg != NULL) \ | 59 | if (msg != NULL) \ |
60 | GNUNET_asprintf (msg, _ ("`%s' failed at %s:%u with error: %s"), cmd, \ | 60 | GNUNET_asprintf (msg, _ ("`%s' failed at %s:%u with error: %s"), cmd, \ |
61 | __FILE__, __LINE__, sqlite3_errmsg (db)); \ | 61 | __FILE__, __LINE__, sqlite3_errmsg (db)); \ |
62 | } while (0) | 62 | } while (0) |
63 | 63 | ||
64 | 64 | ||
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c index 4c1637db6..5d0c3b048 100644 --- a/src/testbed/gnunet-helper-testbed.c +++ b/src/testbed/gnunet-helper-testbed.c | |||
@@ -58,12 +58,6 @@ | |||
58 | 58 | ||
59 | 59 | ||
60 | /** | 60 | /** |
61 | * We need pipe control only on WINDOWS | ||
62 | */ | ||
63 | #define PIPE_CONTROL GNUNET_NO | ||
64 | |||
65 | |||
66 | /** | ||
67 | * Context for a single write on a chunk of memory | 61 | * Context for a single write on a chunk of memory |
68 | */ | 62 | */ |
69 | struct WriteContext | 63 | struct WriteContext |
@@ -405,7 +399,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
405 | GNUNET_free (evstr); | 399 | GNUNET_free (evstr); |
406 | evstr = NULL; | 400 | evstr = NULL; |
407 | } | 401 | } |
408 | GNUNET_free_non_null (hostname); | 402 | GNUNET_free (hostname); |
409 | hostname = NULL; | 403 | hostname = NULL; |
410 | GNUNET_assert (NULL != test_system); | 404 | GNUNET_assert (NULL != test_system); |
411 | GNUNET_assert (GNUNET_OK == | 405 | GNUNET_assert (GNUNET_OK == |
@@ -435,8 +429,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
435 | see putenv(): becomes part of envrionment! */ | 429 | see putenv(): becomes part of envrionment! */ |
436 | evstr = NULL; | 430 | evstr = NULL; |
437 | } | 431 | } |
438 | testbed = GNUNET_OS_start_process (PIPE_CONTROL, | 432 | testbed = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR /*verbose? */, |
439 | GNUNET_OS_INHERIT_STD_ERR /*verbose? */, | ||
440 | NULL, | 433 | NULL, |
441 | NULL, | 434 | NULL, |
442 | NULL, | 435 | NULL, |
@@ -594,7 +587,7 @@ main (int argc, char **argv) | |||
594 | 587 | ||
595 | status = GNUNET_OK; | 588 | status = GNUNET_OK; |
596 | if (NULL == | 589 | if (NULL == |
597 | (sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO))) | 590 | (sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE))) |
598 | { | 591 | { |
599 | GNUNET_break (0); | 592 | GNUNET_break (0); |
600 | return 1; | 593 | return 1; |
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 21a9d0a51..3ef99ae25 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -550,8 +550,8 @@ handle_add_host (void *cls, | |||
550 | GNUNET_strlcpy (hostname, ptr, hostname_length + 1); | 550 | GNUNET_strlcpy (hostname, ptr, hostname_length + 1); |
551 | if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header))) | 551 | if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header))) |
552 | { | 552 | { |
553 | GNUNET_free_non_null (username); | 553 | GNUNET_free (username); |
554 | GNUNET_free_non_null (hostname); | 554 | GNUNET_free (hostname); |
555 | GNUNET_break_op (0); | 555 | GNUNET_break_op (0); |
556 | GNUNET_SERVICE_client_drop (client); | 556 | GNUNET_SERVICE_client_drop (client); |
557 | return; | 557 | return; |
@@ -570,7 +570,7 @@ handle_add_host (void *cls, | |||
570 | username, | 570 | username, |
571 | host_cfg, | 571 | host_cfg, |
572 | ntohs (msg->ssh_port)); | 572 | ntohs (msg->ssh_port)); |
573 | GNUNET_free_non_null (username); | 573 | GNUNET_free (username); |
574 | GNUNET_free (hostname); | 574 | GNUNET_free (hostname); |
575 | GNUNET_CONFIGURATION_destroy (host_cfg); | 575 | GNUNET_CONFIGURATION_destroy (host_cfg); |
576 | if (NULL == host) | 576 | if (NULL == host) |
@@ -757,17 +757,17 @@ shutdown_task (void *cls) | |||
757 | for (id = 0; id < GST_host_list_size; id++) | 757 | for (id = 0; id < GST_host_list_size; id++) |
758 | if (NULL != GST_host_list[id]) | 758 | if (NULL != GST_host_list[id]) |
759 | GNUNET_TESTBED_host_destroy (GST_host_list[id]); | 759 | GNUNET_TESTBED_host_destroy (GST_host_list[id]); |
760 | GNUNET_free_non_null (GST_host_list); | 760 | GNUNET_free (GST_host_list); |
761 | if (NULL != GST_context) | 761 | if (NULL != GST_context) |
762 | { | 762 | { |
763 | GNUNET_free_non_null (GST_context->master_ip); | 763 | GNUNET_free (GST_context->master_ip); |
764 | if (NULL != GST_context->system) | 764 | if (NULL != GST_context->system) |
765 | GNUNET_TESTING_system_destroy (GST_context->system, | 765 | GNUNET_TESTING_system_destroy (GST_context->system, |
766 | GNUNET_YES); | 766 | GNUNET_YES); |
767 | GNUNET_free (GST_context); | 767 | GNUNET_free (GST_context); |
768 | GST_context = NULL; | 768 | GST_context = NULL; |
769 | } | 769 | } |
770 | GNUNET_free_non_null (hostname); | 770 | GNUNET_free (hostname); |
771 | /* Free hello cache */ | 771 | /* Free hello cache */ |
772 | GST_cache_clear (); | 772 | GST_cache_clear (); |
773 | GST_connection_pool_destroy (); | 773 | GST_connection_pool_destroy (); |
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h index 03955327c..ae477ccb4 100644 --- a/src/testbed/gnunet-service-testbed.h +++ b/src/testbed/gnunet-service-testbed.h | |||
@@ -498,7 +498,7 @@ extern char *GST_stats_dir; | |||
498 | GNUNET_assert (size <= accommodate_size); \ | 498 | GNUNET_assert (size <= accommodate_size); \ |
499 | growth_size = size; \ | 499 | growth_size = size; \ |
500 | while (growth_size <= accommodate_size) \ | 500 | while (growth_size <= accommodate_size) \ |
501 | growth_size += LIST_GROW_STEP; \ | 501 | growth_size += LIST_GROW_STEP; \ |
502 | GNUNET_array_grow (ptr, size, growth_size); \ | 502 | GNUNET_array_grow (ptr, size, growth_size); \ |
503 | GNUNET_assert (size > accommodate_size); \ | 503 | GNUNET_assert (size > accommodate_size); \ |
504 | } while (0) | 504 | } while (0) |
diff --git a/src/testbed/gnunet-service-testbed_cache.c b/src/testbed/gnunet-service-testbed_cache.c index f87f39067..5e74b865a 100644 --- a/src/testbed/gnunet-service-testbed_cache.c +++ b/src/testbed/gnunet-service-testbed_cache.c | |||
@@ -120,7 +120,7 @@ static void | |||
120 | free_entry (struct CacheEntry *entry) | 120 | free_entry (struct CacheEntry *entry) |
121 | { | 121 | { |
122 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry); | 122 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry); |
123 | GNUNET_free_non_null (entry->hello); | 123 | GNUNET_free (entry->hello); |
124 | GNUNET_free (entry); | 124 | GNUNET_free (entry); |
125 | } | 125 | } |
126 | 126 | ||
@@ -261,7 +261,7 @@ GST_cache_add_hello (const unsigned int peer_id, | |||
261 | entry = cache_lookup (peer_id); | 261 | entry = cache_lookup (peer_id); |
262 | if (NULL == entry) | 262 | if (NULL == entry) |
263 | entry = add_entry (peer_id); | 263 | entry = add_entry (peer_id); |
264 | GNUNET_free_non_null (entry->hello); | 264 | GNUNET_free (entry->hello); |
265 | entry->hello = GNUNET_copy_message (hello); | 265 | entry->hello = GNUNET_copy_message (hello); |
266 | } | 266 | } |
267 | 267 | ||
diff --git a/src/testbed/gnunet-service-testbed_connectionpool.c b/src/testbed/gnunet-service-testbed_connectionpool.c index 7f9c9fd57..7318971b3 100644 --- a/src/testbed/gnunet-service-testbed_connectionpool.c +++ b/src/testbed/gnunet-service-testbed_connectionpool.c | |||
@@ -687,7 +687,7 @@ oprelease_get_handle_core (void *cls) | |||
687 | return; | 687 | return; |
688 | GNUNET_CORE_disconnect (entry->handle_core); | 688 | GNUNET_CORE_disconnect (entry->handle_core); |
689 | entry->handle_core = NULL; | 689 | entry->handle_core = NULL; |
690 | GNUNET_free_non_null (entry->peer_identity); | 690 | GNUNET_free (entry->peer_identity); |
691 | entry->peer_identity = NULL; | 691 | entry->peer_identity = NULL; |
692 | } | 692 | } |
693 | 693 | ||
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index 2d490ba8c..70b865c73 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c | |||
@@ -649,7 +649,7 @@ GST_stats_destroy () | |||
649 | proc_stat = NULL; | 649 | proc_stat = NULL; |
650 | } | 650 | } |
651 | #elif OSX | 651 | #elif OSX |
652 | GNUNET_free_non_null (prev_cpu_load); | 652 | GNUNET_free (prev_cpu_load); |
653 | #endif | 653 | #endif |
654 | if (NULL != sample_load_task_id) | 654 | if (NULL != sample_load_task_id) |
655 | { | 655 | { |
diff --git a/src/testbed/gnunet-service-testbed_links.c b/src/testbed/gnunet-service-testbed_links.c index ee00e4be0..fb25d7bcb 100644 --- a/src/testbed/gnunet-service-testbed_links.c +++ b/src/testbed/gnunet-service-testbed_links.c | |||
@@ -401,7 +401,7 @@ GST_route_list_clear () | |||
401 | for (id = 0; id < route_list_size; id++) | 401 | for (id = 0; id < route_list_size; id++) |
402 | if (NULL != route_list[id]) | 402 | if (NULL != route_list[id]) |
403 | GNUNET_free (route_list[id]); | 403 | GNUNET_free (route_list[id]); |
404 | GNUNET_free_non_null (route_list); | 404 | GNUNET_free (route_list); |
405 | route_list = NULL; | 405 | route_list = NULL; |
406 | } | 406 | } |
407 | 407 | ||
@@ -508,7 +508,7 @@ GST_slave_list_clear () | |||
508 | continue; | 508 | continue; |
509 | destroy_slave (slave); | 509 | destroy_slave (slave); |
510 | } | 510 | } |
511 | GNUNET_free_non_null (GST_slave_list); | 511 | GNUNET_free (GST_slave_list); |
512 | GST_slave_list = NULL; | 512 | GST_slave_list = NULL; |
513 | } | 513 | } |
514 | 514 | ||
@@ -1104,7 +1104,7 @@ GST_neighbour_list_clean () | |||
1104 | GNUNET_free (n); | 1104 | GNUNET_free (n); |
1105 | neighbour_list[id] = NULL; | 1105 | neighbour_list[id] = NULL; |
1106 | } | 1106 | } |
1107 | GNUNET_free_non_null (neighbour_list); | 1107 | GNUNET_free (neighbour_list); |
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | 1110 | ||
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 262fcfc00..3d13ac8cc 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -360,7 +360,7 @@ GST_cleanup_focc (struct ForwardedOverlayConnectContext *focc) | |||
360 | GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head, | 360 | GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head, |
361 | rhc->focc_dll_tail, | 361 | rhc->focc_dll_tail, |
362 | focc); | 362 | focc); |
363 | GNUNET_free_non_null (focc->orig_msg); | 363 | GNUNET_free (focc->orig_msg); |
364 | GNUNET_free (focc); | 364 | GNUNET_free (focc); |
365 | } | 365 | } |
366 | 366 | ||
@@ -536,8 +536,8 @@ cleanup_occ (struct OverlayConnectContext *occ) | |||
536 | 536 | ||
537 | LOG_DEBUG ("0x%llx: Cleaning up occ\n", | 537 | LOG_DEBUG ("0x%llx: Cleaning up occ\n", |
538 | occ->op_id); | 538 | occ->op_id); |
539 | GNUNET_free_non_null (occ->emsg); | 539 | GNUNET_free (occ->emsg); |
540 | GNUNET_free_non_null (occ->hello); | 540 | GNUNET_free (occ->hello); |
541 | if (NULL != occ->send_hello_task) | 541 | if (NULL != occ->send_hello_task) |
542 | GNUNET_SCHEDULER_cancel (occ->send_hello_task); | 542 | GNUNET_SCHEDULER_cancel (occ->send_hello_task); |
543 | if (NULL != occ->cleanup_task) | 543 | if (NULL != occ->cleanup_task) |
@@ -727,7 +727,7 @@ overlay_connect_notify (void *cls, | |||
727 | cleanup_occ_rp2c (&occ->p2ctx.remote); | 727 | cleanup_occ_rp2c (&occ->p2ctx.remote); |
728 | break; | 728 | break; |
729 | } | 729 | } |
730 | GNUNET_free_non_null (occ->emsg); | 730 | GNUNET_free (occ->emsg); |
731 | occ->emsg = NULL; | 731 | occ->emsg = NULL; |
732 | send_overlay_connect_success_msg (occ); | 732 | send_overlay_connect_success_msg (occ); |
733 | occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ, | 733 | occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ, |
@@ -758,7 +758,7 @@ occ_cache_get_handle_ats_occ_cb (void *cls, | |||
758 | 758 | ||
759 | GNUNET_assert (OCC_TYPE_LOCAL == occ->type); | 759 | GNUNET_assert (OCC_TYPE_LOCAL == occ->type); |
760 | GNUNET_assert (NULL != occ->timeout_task); | 760 | GNUNET_assert (NULL != occ->timeout_task); |
761 | GNUNET_free_non_null (occ->emsg); | 761 | GNUNET_free (occ->emsg); |
762 | if (NULL == ac) | 762 | if (NULL == ac) |
763 | { | 763 | { |
764 | GNUNET_asprintf (&occ->emsg, | 764 | GNUNET_asprintf (&occ->emsg, |
@@ -842,7 +842,7 @@ occ_hello_sent_cb (void *cls) | |||
842 | lp2c->ohh = NULL; | 842 | lp2c->ohh = NULL; |
843 | 843 | ||
844 | GNUNET_assert (NULL == occ->send_hello_task); | 844 | GNUNET_assert (NULL == occ->send_hello_task); |
845 | GNUNET_free_non_null (occ->emsg); | 845 | GNUNET_free (occ->emsg); |
846 | 846 | ||
847 | GNUNET_asprintf (&occ->emsg, | 847 | GNUNET_asprintf (&occ->emsg, |
848 | "0x%llx: Timeout while acquiring ATS of %s from cache", | 848 | "0x%llx: Timeout while acquiring ATS of %s from cache", |
@@ -1092,7 +1092,7 @@ hello_update_cb (void *cls, | |||
1092 | GST_connection_pool_get_handle_done (occ->cgh_p1th); | 1092 | GST_connection_pool_get_handle_done (occ->cgh_p1th); |
1093 | occ->cgh_p1th = NULL; | 1093 | occ->cgh_p1th = NULL; |
1094 | occ->p1th_ = NULL; | 1094 | occ->p1th_ = NULL; |
1095 | GNUNET_free_non_null (occ->emsg); | 1095 | GNUNET_free (occ->emsg); |
1096 | occ->emsg = NULL; | 1096 | occ->emsg = NULL; |
1097 | p2_transport_connect (occ); | 1097 | p2_transport_connect (occ); |
1098 | } | 1098 | } |
@@ -1118,7 +1118,7 @@ p1_transport_connect_cache_callback (void *cls, | |||
1118 | { | 1118 | { |
1119 | struct OverlayConnectContext *occ = cls; | 1119 | struct OverlayConnectContext *occ = cls; |
1120 | 1120 | ||
1121 | GNUNET_free_non_null (occ->emsg); | 1121 | GNUNET_free (occ->emsg); |
1122 | occ->emsg = NULL; | 1122 | occ->emsg = NULL; |
1123 | if (NULL == th) | 1123 | if (NULL == th) |
1124 | { | 1124 | { |
@@ -1166,7 +1166,7 @@ occ_cache_get_handle_core_cb (void *cls, | |||
1166 | const struct GNUNET_MessageHeader *hello; | 1166 | const struct GNUNET_MessageHeader *hello; |
1167 | 1167 | ||
1168 | GNUNET_assert (NULL != occ->timeout_task); | 1168 | GNUNET_assert (NULL != occ->timeout_task); |
1169 | GNUNET_free_non_null (occ->emsg); | 1169 | GNUNET_free (occ->emsg); |
1170 | if ((NULL == ch) || (NULL == my_identity)) | 1170 | if ((NULL == ch) || (NULL == my_identity)) |
1171 | { | 1171 | { |
1172 | GNUNET_asprintf (&occ->emsg, | 1172 | GNUNET_asprintf (&occ->emsg, |
@@ -1249,7 +1249,7 @@ overlay_connect_get_config (void *cls, | |||
1249 | cmsg = | 1249 | cmsg = |
1250 | (const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg; | 1250 | (const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg; |
1251 | occ->other_peer_identity = cmsg->peer_identity; | 1251 | occ->other_peer_identity = cmsg->peer_identity; |
1252 | GNUNET_free_non_null (occ->emsg); | 1252 | GNUNET_free (occ->emsg); |
1253 | GNUNET_asprintf (&occ->emsg, | 1253 | GNUNET_asprintf (&occ->emsg, |
1254 | "0x%llx: Timeout while connecting to CORE of peer with " | 1254 | "0x%llx: Timeout while connecting to CORE of peer with " |
1255 | "id: %u", | 1255 | "id: %u", |
@@ -1508,7 +1508,7 @@ p2_controller_connect_cb (void *cls, | |||
1508 | &cmsg.header, | 1508 | &cmsg.header, |
1509 | &overlay_connect_get_config, | 1509 | &overlay_connect_get_config, |
1510 | occ); | 1510 | occ); |
1511 | GNUNET_free_non_null (occ->emsg); | 1511 | GNUNET_free (occ->emsg); |
1512 | GNUNET_asprintf (&occ->emsg, | 1512 | GNUNET_asprintf (&occ->emsg, |
1513 | "0x%llx: Timeout while getting peer identity of peer " | 1513 | "0x%llx: Timeout while getting peer identity of peer " |
1514 | "with id: %u", | 1514 | "with id: %u", |
@@ -1674,7 +1674,7 @@ cleanup_rocc (struct RemoteOverlayConnectCtx *rocc) | |||
1674 | if ((GNUNET_YES == rocc->peer->destroy_flag) && | 1674 | if ((GNUNET_YES == rocc->peer->destroy_flag) && |
1675 | (0 == rocc->peer->reference_cnt)) | 1675 | (0 == rocc->peer->reference_cnt)) |
1676 | GST_destroy_peer (rocc->peer); | 1676 | GST_destroy_peer (rocc->peer); |
1677 | GNUNET_free_non_null (rocc->hello); | 1677 | GNUNET_free (rocc->hello); |
1678 | GNUNET_CONTAINER_DLL_remove (roccq_head, | 1678 | GNUNET_CONTAINER_DLL_remove (roccq_head, |
1679 | roccq_tail, | 1679 | roccq_tail, |
1680 | rocc); | 1680 | rocc); |
diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c index d3d597d4f..0184635fa 100644 --- a/src/testbed/gnunet-service-testbed_peers.c +++ b/src/testbed/gnunet-service-testbed_peers.c | |||
@@ -1084,7 +1084,7 @@ handle_peer_reconfigure (void *cls, | |||
1084 | GST_send_operation_success_msg (client, | 1084 | GST_send_operation_success_msg (client, |
1085 | op_id); | 1085 | op_id); |
1086 | GNUNET_SERVICE_client_continue (client); | 1086 | GNUNET_SERVICE_client_continue (client); |
1087 | GNUNET_free_non_null (emsg); | 1087 | GNUNET_free (emsg); |
1088 | return; | 1088 | return; |
1089 | } | 1089 | } |
1090 | prc = GNUNET_new (struct PeerReconfigureContext); | 1090 | prc = GNUNET_new (struct PeerReconfigureContext); |
@@ -1264,7 +1264,7 @@ ret: | |||
1264 | else | 1264 | else |
1265 | GST_send_operation_success_msg (mctx->client, | 1265 | GST_send_operation_success_msg (mctx->client, |
1266 | mctx->op_id); | 1266 | mctx->op_id); |
1267 | GNUNET_free_non_null (emsg); | 1267 | GNUNET_free (emsg); |
1268 | cleanup_mctx (mctx); | 1268 | cleanup_mctx (mctx); |
1269 | } | 1269 | } |
1270 | 1270 | ||
@@ -1459,7 +1459,7 @@ GST_destroy_peers () | |||
1459 | } | 1459 | } |
1460 | GNUNET_free (peer); | 1460 | GNUNET_free (peer); |
1461 | } | 1461 | } |
1462 | GNUNET_free_non_null (GST_peer_list); | 1462 | GNUNET_free (GST_peer_list); |
1463 | GST_peer_list = NULL; | 1463 | GST_peer_list = NULL; |
1464 | GST_peer_list_size = 0; | 1464 | GST_peer_list_size = 0; |
1465 | } | 1465 | } |
diff --git a/src/testbed/gnunet_testbed_mpi_spawn.c b/src/testbed/gnunet_testbed_mpi_spawn.c index 8b67523a1..577ffbeba 100644 --- a/src/testbed/gnunet_testbed_mpi_spawn.c +++ b/src/testbed/gnunet_testbed_mpi_spawn.c | |||
@@ -299,8 +299,7 @@ main (int argc, char *argv[]) | |||
299 | GNUNET_break (0); | 299 | GNUNET_break (0); |
300 | return 1; | 300 | return 1; |
301 | } | 301 | } |
302 | if (NULL == (sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, | 302 | if (NULL == (sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE))) |
303 | GNUNET_NO, GNUNET_NO))) | ||
304 | { | 303 | { |
305 | GNUNET_break (0); | 304 | GNUNET_break (0); |
306 | ret = GNUNET_SYSERR; | 305 | ret = GNUNET_SYSERR; |
@@ -321,7 +320,7 @@ main (int argc, char *argv[]) | |||
321 | GNUNET_SIGNAL_handler_uninstall (shc_chld); | 320 | GNUNET_SIGNAL_handler_uninstall (shc_chld); |
322 | shc_chld = NULL; | 321 | shc_chld = NULL; |
323 | GNUNET_DISK_pipe_close (sigpipe); | 322 | GNUNET_DISK_pipe_close (sigpipe); |
324 | GNUNET_free_non_null (fn); | 323 | GNUNET_free (fn); |
325 | if (GNUNET_OK != ret) | 324 | if (GNUNET_OK != ret) |
326 | return ret; | 325 | return ret; |
327 | return 0; | 326 | return 0; |
diff --git a/src/testbed/test_gnunet_helper_testbed.c b/src/testbed/test_gnunet_helper_testbed.c index 7c4d4bad5..d4eec0269 100644 --- a/src/testbed/test_gnunet_helper_testbed.c +++ b/src/testbed/test_gnunet_helper_testbed.c | |||
@@ -88,7 +88,7 @@ do_shutdown (void *cls) | |||
88 | GNUNET_SCHEDULER_cancel (abort_task); | 88 | GNUNET_SCHEDULER_cancel (abort_task); |
89 | if (NULL != helper) | 89 | if (NULL != helper) |
90 | GNUNET_HELPER_stop (helper, GNUNET_NO); | 90 | GNUNET_HELPER_stop (helper, GNUNET_NO); |
91 | GNUNET_free_non_null (msg); | 91 | GNUNET_free (msg); |
92 | if (NULL != cfg) | 92 | if (NULL != cfg) |
93 | GNUNET_CONFIGURATION_destroy (cfg); | 93 | GNUNET_CONFIGURATION_destroy (cfg); |
94 | } | 94 | } |
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c index dd270df17..49f1d9ae9 100644 --- a/src/testbed/test_testbed_api.c +++ b/src/testbed/test_testbed_api.c | |||
@@ -163,7 +163,7 @@ do_shutdown (void *cls) | |||
163 | if (! (cond)) { \ | 163 | if (! (cond)) { \ |
164 | GNUNET_break (0); \ | 164 | GNUNET_break (0); \ |
165 | if (NULL != abort_task) \ | 165 | if (NULL != abort_task) \ |
166 | GNUNET_SCHEDULER_cancel (abort_task); \ | 166 | GNUNET_SCHEDULER_cancel (abort_task); \ |
167 | abort_task = NULL; \ | 167 | abort_task = NULL; \ |
168 | GNUNET_SCHEDULER_add_now (do_shutdown, NULL); \ | 168 | GNUNET_SCHEDULER_add_now (do_shutdown, NULL); \ |
169 | ret; \ | 169 | ret; \ |
diff --git a/src/testbed/test_testbed_api_2peers_1controller.c b/src/testbed/test_testbed_api_2peers_1controller.c index c854d1ccc..4a8b8a584 100644 --- a/src/testbed/test_testbed_api_2peers_1controller.c +++ b/src/testbed/test_testbed_api_2peers_1controller.c | |||
@@ -173,7 +173,7 @@ static enum Stage result; | |||
173 | if (! (cond)) { \ | 173 | if (! (cond)) { \ |
174 | GNUNET_break (0); \ | 174 | GNUNET_break (0); \ |
175 | if (NULL != abort_task) \ | 175 | if (NULL != abort_task) \ |
176 | GNUNET_SCHEDULER_cancel (abort_task); \ | 176 | GNUNET_SCHEDULER_cancel (abort_task); \ |
177 | abort_task = NULL; \ | 177 | abort_task = NULL; \ |
178 | GNUNET_SCHEDULER_add_now (do_shutdown, NULL); \ | 178 | GNUNET_SCHEDULER_add_now (do_shutdown, NULL); \ |
179 | return; \ | 179 | return; \ |
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index 16a3f7b91..784407520 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c | |||
@@ -298,7 +298,7 @@ static enum Stage result; | |||
298 | { \ | 298 | { \ |
299 | GNUNET_break (0); \ | 299 | GNUNET_break (0); \ |
300 | if (NULL != abort_task) \ | 300 | if (NULL != abort_task) \ |
301 | GNUNET_SCHEDULER_cancel (abort_task); \ | 301 | GNUNET_SCHEDULER_cancel (abort_task); \ |
302 | abort_task = NULL; \ | 302 | abort_task = NULL; \ |
303 | GNUNET_SCHEDULER_shutdown (); \ | 303 | GNUNET_SCHEDULER_shutdown (); \ |
304 | return; \ | 304 | return; \ |
diff --git a/src/testbed/test_testbed_api_peer_reconfiguration.c b/src/testbed/test_testbed_api_peer_reconfiguration.c index 91955c13d..22dd46b53 100644 --- a/src/testbed/test_testbed_api_peer_reconfiguration.c +++ b/src/testbed/test_testbed_api_peer_reconfiguration.c | |||
@@ -77,7 +77,7 @@ enum | |||
77 | if (! (cond)) { \ | 77 | if (! (cond)) { \ |
78 | GNUNET_break (0); \ | 78 | GNUNET_break (0); \ |
79 | if (NULL != abort_task) \ | 79 | if (NULL != abort_task) \ |
80 | GNUNET_SCHEDULER_cancel (abort_task); \ | 80 | GNUNET_SCHEDULER_cancel (abort_task); \ |
81 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); \ | 81 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); \ |
82 | ret; \ | 82 | ret; \ |
83 | } \ | 83 | } \ |
diff --git a/src/testbed/test_testbed_api_peers_manage_services.c b/src/testbed/test_testbed_api_peers_manage_services.c index 6d4f8196a..93b0da550 100644 --- a/src/testbed/test_testbed_api_peers_manage_services.c +++ b/src/testbed/test_testbed_api_peers_manage_services.c | |||
@@ -92,7 +92,7 @@ enum | |||
92 | if (! (cond)) { \ | 92 | if (! (cond)) { \ |
93 | GNUNET_break (0); \ | 93 | GNUNET_break (0); \ |
94 | if (NULL != abort_task) \ | 94 | if (NULL != abort_task) \ |
95 | GNUNET_SCHEDULER_cancel (abort_task); \ | 95 | GNUNET_SCHEDULER_cancel (abort_task); \ |
96 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); \ | 96 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); \ |
97 | ret; \ | 97 | ret; \ |
98 | } \ | 98 | } \ |
diff --git a/src/testbed/test_testbed_api_statistics.c b/src/testbed/test_testbed_api_statistics.c index 2d0e2d6b8..4d42cda6a 100644 --- a/src/testbed/test_testbed_api_statistics.c +++ b/src/testbed/test_testbed_api_statistics.c | |||
@@ -76,7 +76,7 @@ static unsigned int num_seen_peers; | |||
76 | if (! (cond)) { \ | 76 | if (! (cond)) { \ |
77 | GNUNET_break (0); \ | 77 | GNUNET_break (0); \ |
78 | if (NULL != abort_task) \ | 78 | if (NULL != abort_task) \ |
79 | GNUNET_SCHEDULER_cancel (abort_task); \ | 79 | GNUNET_SCHEDULER_cancel (abort_task); \ |
80 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); \ | 80 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); \ |
81 | ret; \ | 81 | ret; \ |
82 | } \ | 82 | } \ |
@@ -198,7 +198,7 @@ main (int argc, char **argv) | |||
198 | NUM_PEERS, | 198 | NUM_PEERS, |
199 | 1LL, NULL, NULL, | 199 | 1LL, NULL, NULL, |
200 | &test_master, NULL); | 200 | &test_master, NULL); |
201 | GNUNET_free_non_null (seen_peers); | 201 | GNUNET_free (seen_peers); |
202 | if (GNUNET_OK != result) | 202 | if (GNUNET_OK != result) |
203 | return 1; | 203 | return 1; |
204 | return 0; | 204 | return 0; |
diff --git a/src/testbed/test_testbed_api_template.conf b/src/testbed/test_testbed_api_template.conf index 43ae06f81..255c1b766 100644 --- a/src/testbed/test_testbed_api_template.conf +++ b/src/testbed/test_testbed_api_template.conf | |||
@@ -14,7 +14,7 @@ QUOTA = 1 MB | |||
14 | DATABASE = heap | 14 | DATABASE = heap |
15 | 15 | ||
16 | [transport] | 16 | [transport] |
17 | PLUGINS = udp | 17 | PLUGINS = tcp |
18 | ACCEPT_FROM6 = ::1; | 18 | ACCEPT_FROM6 = ::1; |
19 | ACCEPT_FROM = 127.0.0.1; | 19 | ACCEPT_FROM = 127.0.0.1; |
20 | NEIGHBOUR_LIMIT = 50 | 20 | NEIGHBOUR_LIMIT = 50 |
diff --git a/src/testbed/test_testbed_api_test.c b/src/testbed/test_testbed_api_test.c index d3fec78d9..aefbd340e 100644 --- a/src/testbed/test_testbed_api_test.c +++ b/src/testbed/test_testbed_api_test.c | |||
@@ -90,10 +90,10 @@ do_shutdown (void *cls) | |||
90 | if (! (cond)) { \ | 90 | if (! (cond)) { \ |
91 | GNUNET_break (0); \ | 91 | GNUNET_break (0); \ |
92 | if (NULL != abort_task) \ | 92 | if (NULL != abort_task) \ |
93 | GNUNET_SCHEDULER_cancel (abort_task); \ | 93 | GNUNET_SCHEDULER_cancel (abort_task); \ |
94 | abort_task = NULL; \ | 94 | abort_task = NULL; \ |
95 | if (NULL == shutdown_task) \ | 95 | if (NULL == shutdown_task) \ |
96 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); \ | 96 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); \ |
97 | return; \ | 97 | return; \ |
98 | } \ | 98 | } \ |
99 | } while (0) | 99 | } while (0) |
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 9fe5bccdc..697783d96 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -1178,7 +1178,7 @@ handle_link_controllers_result ( | |||
1178 | LOG_DEBUG ("Not calling callback\n"); | 1178 | LOG_DEBUG ("Not calling callback\n"); |
1179 | if (NULL != cfg) | 1179 | if (NULL != cfg) |
1180 | GNUNET_CONFIGURATION_destroy (cfg); | 1180 | GNUNET_CONFIGURATION_destroy (cfg); |
1181 | GNUNET_free_non_null (emsg); | 1181 | GNUNET_free (emsg); |
1182 | } | 1182 | } |
1183 | 1183 | ||
1184 | 1184 | ||
@@ -1314,7 +1314,7 @@ handle_barrier_status (void *cls, | |||
1314 | return; /* just initialised; skip cleanup */ | 1314 | return; /* just initialised; skip cleanup */ |
1315 | 1315 | ||
1316 | cleanup: | 1316 | cleanup: |
1317 | GNUNET_free_non_null (emsg); | 1317 | GNUNET_free (emsg); |
1318 | /** | 1318 | /** |
1319 | * Do not remove the barrier if we did not echo the status back; this is | 1319 | * Do not remove the barrier if we did not echo the status back; this is |
1320 | * required at the chained testbed controller setup to ensure the only the | 1320 | * required at the chained testbed controller setup to ensure the only the |
@@ -1459,7 +1459,7 @@ oprelease_link_controllers (void *cls) | |||
1459 | case OPC_STATE_FINISHED: | 1459 | case OPC_STATE_FINISHED: |
1460 | break; | 1460 | break; |
1461 | } | 1461 | } |
1462 | GNUNET_free_non_null (data); | 1462 | GNUNET_free (data); |
1463 | GNUNET_free (opc); | 1463 | GNUNET_free (opc); |
1464 | } | 1464 | } |
1465 | 1465 | ||
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 95463e44d..95a6bf76f 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -56,7 +56,7 @@ | |||
56 | do \ | 56 | do \ |
57 | { \ | 57 | { \ |
58 | if (cond) \ | 58 | if (cond) \ |
59 | break; \ | 59 | break; \ |
60 | LOG (GNUNET_ERROR_TYPE_ERROR, "API violation detected: %s\n", errstr); \ | 60 | LOG (GNUNET_ERROR_TYPE_ERROR, "API violation detected: %s\n", errstr); \ |
61 | GNUNET_assert (0); \ | 61 | GNUNET_assert (0); \ |
62 | } while (0) | 62 | } while (0) |
@@ -506,7 +506,7 @@ GNUNET_TESTBED_hosts_load_from_file ( | |||
506 | else | 506 | else |
507 | (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); | 507 | (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); |
508 | count++; | 508 | count++; |
509 | GNUNET_free_non_null (username); | 509 | GNUNET_free (username); |
510 | GNUNET_free (hostname); | 510 | GNUNET_free (hostname); |
511 | buf = &data[offset + 1]; | 511 | buf = &data[offset + 1]; |
512 | } | 512 | } |
@@ -611,26 +611,27 @@ GNUNET_TESTBED_hosts_load_from_loadleveler ( | |||
611 | void | 611 | void |
612 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) | 612 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) |
613 | { | 613 | { |
614 | struct RegisteredController *rc; | ||
615 | uint32_t id; | ||
616 | |||
617 | GNUNET_assert (host->id < host_list_size); | 614 | GNUNET_assert (host->id < host_list_size); |
618 | GNUNET_assert (host_list[host->id] == host); | 615 | GNUNET_assert (host_list[host->id] == host); |
619 | host_list[host->id] = NULL; | 616 | host_list[host->id] = NULL; |
620 | /* clear registered controllers list */ | 617 | /* clear registered controllers list */ |
621 | for (rc = host->rc_head; NULL != rc; rc = host->rc_head) | 618 | for (struct RegisteredController *rc = host->rc_head; |
619 | NULL != rc; | ||
620 | rc = host->rc_head) | ||
622 | { | 621 | { |
623 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); | 622 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); |
624 | GNUNET_free (rc); | 623 | GNUNET_free (rc); |
625 | } | 624 | } |
626 | GNUNET_free_non_null ((char *) host->username); | 625 | GNUNET_free_nz ((char *) host->username); |
627 | GNUNET_free_non_null ((char *) host->hostname); | 626 | GNUNET_free_nz ((char *) host->hostname); |
628 | GNUNET_TESTBED_operation_queue_destroy_ ( | 627 | GNUNET_TESTBED_operation_queue_destroy_ ( |
629 | host->opq_parallel_overlay_connect_operations); | 628 | host->opq_parallel_overlay_connect_operations); |
630 | GNUNET_CONFIGURATION_destroy (host->cfg); | 629 | GNUNET_CONFIGURATION_destroy (host->cfg); |
631 | GNUNET_free (host); | 630 | GNUNET_free (host); |
632 | while (host_list_size >= HOST_LIST_GROW_STEP) | 631 | while (host_list_size >= HOST_LIST_GROW_STEP) |
633 | { | 632 | { |
633 | uint32_t id; | ||
634 | |||
634 | for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; | 635 | for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; |
635 | id--) | 636 | id--) |
636 | if (NULL != host_list[id]) | 637 | if (NULL != host_list[id]) |
@@ -1223,7 +1224,7 @@ GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc *cproc) | |||
1223 | free_argv (cproc->helper_argv); | 1224 | free_argv (cproc->helper_argv); |
1224 | cproc->host->controller_started = GNUNET_NO; | 1225 | cproc->host->controller_started = GNUNET_NO; |
1225 | cproc->host->locked = GNUNET_NO; | 1226 | cproc->host->locked = GNUNET_NO; |
1226 | GNUNET_free_non_null (cproc->msg); | 1227 | GNUNET_free (cproc->msg); |
1227 | GNUNET_free (cproc); | 1228 | GNUNET_free (cproc); |
1228 | } | 1229 | } |
1229 | 1230 | ||
@@ -1383,8 +1384,7 @@ GNUNET_TESTBED_is_host_habitable ( | |||
1383 | join_argv ((const char **) rsh_args, (const char **) rsh_suffix_args); | 1384 | join_argv ((const char **) rsh_args, (const char **) rsh_suffix_args); |
1384 | free_argv (rsh_suffix_args); | 1385 | free_argv (rsh_suffix_args); |
1385 | free_argv (rsh_args); | 1386 | free_argv (rsh_args); |
1386 | h->auxp = GNUNET_OS_start_process_vap (GNUNET_NO, | 1387 | h->auxp = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR, |
1387 | GNUNET_OS_INHERIT_STD_ERR, | ||
1388 | NULL, | 1388 | NULL, |
1389 | NULL, | 1389 | NULL, |
1390 | NULL, | 1390 | NULL, |
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c index a406c0e0b..ae85e0842 100644 --- a/src/testbed/testbed_api_operations.c +++ b/src/testbed/testbed_api_operations.c | |||
@@ -696,7 +696,7 @@ decide_capacity (struct OperationQueue *opq, | |||
696 | } | 696 | } |
697 | 697 | ||
698 | ret: | 698 | ret: |
699 | GNUNET_free_non_null (evict_entries); | 699 | GNUNET_free (evict_entries); |
700 | if (NULL != ops_) | 700 | if (NULL != ops_) |
701 | *ops_ = ops; | 701 | *ops_ = ops; |
702 | else | 702 | else |
@@ -771,7 +771,7 @@ check_readiness (struct GNUNET_TESTBED_Operation *op) | |||
771 | if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i], | 771 | if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i], |
772 | &ops, &n_ops)) | 772 | &ops, &n_ops)) |
773 | { | 773 | { |
774 | GNUNET_free_non_null (evict_ops); | 774 | GNUNET_free (evict_ops); |
775 | return GNUNET_NO; | 775 | return GNUNET_NO; |
776 | } | 776 | } |
777 | if (NULL == ops) | 777 | if (NULL == ops) |
@@ -842,7 +842,7 @@ cleanup_tslots (struct OperationQueue *queue) | |||
842 | continue; | 842 | continue; |
843 | GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot); | 843 | GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot); |
844 | } | 844 | } |
845 | GNUNET_free_non_null (fctx->tslots_freeptr); | 845 | GNUNET_free (fctx->tslots_freeptr); |
846 | fctx->tslots_freeptr = NULL; | 846 | fctx->tslots_freeptr = NULL; |
847 | fctx->alloc_head = NULL; | 847 | fctx->alloc_head = NULL; |
848 | fctx->alloc_tail = NULL; | 848 | fctx->alloc_tail = NULL; |
@@ -1337,7 +1337,7 @@ GNUNET_TESTBED_operation_release_ (struct GNUNET_TESTBED_Operation *op) | |||
1337 | } | 1337 | } |
1338 | GNUNET_free (entry); | 1338 | GNUNET_free (entry); |
1339 | } | 1339 | } |
1340 | GNUNET_free_non_null (op->qentries); | 1340 | GNUNET_free (op->qentries); |
1341 | GNUNET_free (op->queues); | 1341 | GNUNET_free (op->queues); |
1342 | GNUNET_free (op->nres); | 1342 | GNUNET_free (op->nres); |
1343 | if (NULL != op->release) | 1343 | if (NULL != op->release) |
@@ -1376,7 +1376,7 @@ GNUNET_TESTBED_operations_fini () | |||
1376 | warn = 1; | 1376 | warn = 1; |
1377 | queue_destroy (queue); | 1377 | queue_destroy (queue); |
1378 | } | 1378 | } |
1379 | GNUNET_free_non_null (expired_opqs); | 1379 | GNUNET_free (expired_opqs); |
1380 | n_expired_opqs = 0; | 1380 | n_expired_opqs = 0; |
1381 | if (warn) | 1381 | if (warn) |
1382 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1382 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c index 7bd895871..99d30e85b 100644 --- a/src/testbed/testbed_api_peers.c +++ b/src/testbed/testbed_api_peers.c | |||
@@ -952,7 +952,7 @@ oprelease_manage_service (void *cls) | |||
952 | case OPC_STATE_FINISHED: | 952 | case OPC_STATE_FINISHED: |
953 | break; | 953 | break; |
954 | } | 954 | } |
955 | GNUNET_free_non_null (data); | 955 | GNUNET_free (data); |
956 | GNUNET_free (opc); | 956 | GNUNET_free (opc); |
957 | } | 957 | } |
958 | 958 | ||
diff --git a/src/testbed/testbed_api_statistics.c b/src/testbed/testbed_api_statistics.c index 4858208cc..7fe47d2a0 100644 --- a/src/testbed/testbed_api_statistics.c +++ b/src/testbed/testbed_api_statistics.c | |||
@@ -378,8 +378,8 @@ oprelease_get_stats (void *cls) | |||
378 | } | 378 | } |
379 | GNUNET_free (sc->ops); | 379 | GNUNET_free (sc->ops); |
380 | } | 380 | } |
381 | GNUNET_free_non_null (sc->subsystem); | 381 | GNUNET_free (sc->subsystem); |
382 | GNUNET_free_non_null (sc->name); | 382 | GNUNET_free (sc->name); |
383 | GNUNET_free (sc); | 383 | GNUNET_free (sc); |
384 | if (GNUNET_YES == | 384 | if (GNUNET_YES == |
385 | GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue)) | 385 | GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue)) |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 7be8054ca..7ae30e0c6 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -472,11 +472,11 @@ cleanup (struct GNUNET_TESTBED_RunHandle *rc) | |||
472 | GNUNET_TESTBED_host_destroy (rc->h); | 472 | GNUNET_TESTBED_host_destroy (rc->h); |
473 | for (hid = 0; hid < rc->num_hosts; hid++) | 473 | for (hid = 0; hid < rc->num_hosts; hid++) |
474 | GNUNET_TESTBED_host_destroy (rc->hosts[hid]); | 474 | GNUNET_TESTBED_host_destroy (rc->hosts[hid]); |
475 | GNUNET_free_non_null (rc->hosts); | 475 | GNUNET_free (rc->hosts); |
476 | if (NULL != rc->cfg) | 476 | if (NULL != rc->cfg) |
477 | GNUNET_CONFIGURATION_destroy (rc->cfg); | 477 | GNUNET_CONFIGURATION_destroy (rc->cfg); |
478 | GNUNET_free_non_null (rc->topo_file); | 478 | GNUNET_free (rc->topo_file); |
479 | GNUNET_free_non_null (rc->trusted_ip); | 479 | GNUNET_free (rc->trusted_ip); |
480 | GNUNET_free (rc); | 480 | GNUNET_free (rc); |
481 | } | 481 | } |
482 | 482 | ||
@@ -863,7 +863,7 @@ event_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
863 | case RC_PEERS_CREATED: | 863 | case RC_PEERS_CREATED: |
864 | case RC_READY: | 864 | case RC_READY: |
865 | rc->state = RC_PEERS_SHUTDOWN; | 865 | rc->state = RC_PEERS_SHUTDOWN; |
866 | GNUNET_free_non_null (rc->peers); | 866 | GNUNET_free (rc->peers); |
867 | rc->peers = NULL; | 867 | rc->peers = NULL; |
868 | DEBUG ("Peers shut down in %s\n", prof_time (rc)); | 868 | DEBUG ("Peers shut down in %s\n", prof_time (rc)); |
869 | GNUNET_SCHEDULER_shutdown (); | 869 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c index 9ffe7f47d..1d765af92 100644 --- a/src/testbed/testbed_api_topology.c +++ b/src/testbed/testbed_api_topology.c | |||
@@ -1183,7 +1183,7 @@ _exit: | |||
1183 | struct TopologyContextOverlay *overlay; | 1183 | struct TopologyContextOverlay *overlay; |
1184 | 1184 | ||
1185 | overlay = &tc->u.overlay; | 1185 | overlay = &tc->u.overlay; |
1186 | GNUNET_free_non_null (overlay->link_array); | 1186 | GNUNET_free (overlay->link_array); |
1187 | overlay->link_array = NULL; | 1187 | overlay->link_array = NULL; |
1188 | } | 1188 | } |
1189 | break; | 1189 | break; |
@@ -1193,7 +1193,7 @@ _exit: | |||
1193 | struct TopologyContextUnderlay *underlay; | 1193 | struct TopologyContextUnderlay *underlay; |
1194 | 1194 | ||
1195 | underlay = &tc->u.underlay; | 1195 | underlay = &tc->u.underlay; |
1196 | GNUNET_free_non_null (underlay->link_array); | 1196 | GNUNET_free (underlay->link_array); |
1197 | underlay->link_array = NULL; | 1197 | underlay->link_array = NULL; |
1198 | } | 1198 | } |
1199 | break; | 1199 | break; |
@@ -1428,7 +1428,7 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, | |||
1428 | default: | 1428 | default: |
1429 | GNUNET_break (0); /* Should not use any other option apart from | 1429 | GNUNET_break (0); /* Should not use any other option apart from |
1430 | * the ones handled here */ | 1430 | * the ones handled here */ |
1431 | GNUNET_free_non_null (overlay->link_array); | 1431 | GNUNET_free (overlay->link_array); |
1432 | GNUNET_free (tc); | 1432 | GNUNET_free (tc); |
1433 | return NULL; | 1433 | return NULL; |
1434 | } | 1434 | } |
@@ -1653,7 +1653,7 @@ GNUNET_TESTBED_underlay_construct_ (int num_peers, | |||
1653 | break; | 1653 | break; |
1654 | } | 1654 | } |
1655 | } | 1655 | } |
1656 | GNUNET_free_non_null (underlay->link_array); | 1656 | GNUNET_free (underlay->link_array); |
1657 | return ret; | 1657 | return ret; |
1658 | } | 1658 | } |
1659 | 1659 | ||
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index 9c6357455..2b599f55b 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am | |||
@@ -20,6 +20,9 @@ libgnunettesting_la_LIBADD = \ | |||
20 | $(top_builddir)/src/arm/libgnunetarm.la \ | 20 | $(top_builddir)/src/arm/libgnunetarm.la \ |
21 | $(top_builddir)/src/util/libgnunetutil.la \ | 21 | $(top_builddir)/src/util/libgnunetutil.la \ |
22 | $(LTLIBINTL) | 22 | $(LTLIBINTL) |
23 | libgnunettesting_la_DEPENDENCIES = \ | ||
24 | $(top_builddir)/src/arm/libgnunetarm.la \ | ||
25 | $(top_builddir)/src/util/libgnunetutil.la | ||
23 | libgnunettesting_la_LDFLAGS = \ | 26 | libgnunettesting_la_LDFLAGS = \ |
24 | $(GN_LIB_LDFLAGS) \ | 27 | $(GN_LIB_LDFLAGS) \ |
25 | -version-info 2:0:1 | 28 | -version-info 2:0:1 |
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c index a9e5042b2..88906e5fa 100644 --- a/src/testing/gnunet-testing.c +++ b/src/testing/gnunet-testing.c | |||
@@ -365,7 +365,7 @@ run_no_scheduler (void *cls, | |||
365 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Extracting hostkey %u\n", create_no); | 365 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Extracting hostkey %u\n", create_no); |
366 | ret = create_hostkeys (create_no); | 366 | ret = create_hostkeys (create_no); |
367 | } | 367 | } |
368 | GNUNET_free_non_null (create_cfg_template); | 368 | GNUNET_free (create_cfg_template); |
369 | } | 369 | } |
370 | 370 | ||
371 | 371 | ||
diff --git a/src/testing/test_testing_peerstartup.c b/src/testing/test_testing_peerstartup.c index 4e21fedc9..25cbb2a9f 100644 --- a/src/testing/test_testing_peerstartup.c +++ b/src/testing/test_testing_peerstartup.c | |||
@@ -118,7 +118,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
118 | 118 | ||
119 | end: | 119 | end: |
120 | GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); | 120 | GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); |
121 | GNUNET_free_non_null (emsg); | 121 | GNUNET_free (emsg); |
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
diff --git a/src/testing/test_testing_peerstartup2.c b/src/testing/test_testing_peerstartup2.c index 26948b7c5..8d357cb08 100644 --- a/src/testing/test_testing_peerstartup2.c +++ b/src/testing/test_testing_peerstartup2.c | |||
@@ -197,7 +197,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
197 | end: | 197 | end: |
198 | FAIL_TEST (0); | 198 | FAIL_TEST (0); |
199 | GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); | 199 | GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); |
200 | GNUNET_free_non_null (emsg); | 200 | GNUNET_free (emsg); |
201 | } | 201 | } |
202 | 202 | ||
203 | 203 | ||
diff --git a/src/testing/test_testing_sharedservices.c b/src/testing/test_testing_sharedservices.c index 77def3453..d2f760d7a 100644 --- a/src/testing/test_testing_sharedservices.c +++ b/src/testing/test_testing_sharedservices.c | |||
@@ -139,7 +139,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
139 | 139 | ||
140 | end: | 140 | end: |
141 | GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); | 141 | GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); |
142 | GNUNET_free_non_null (emsg); | 142 | GNUNET_free (emsg); |
143 | } | 143 | } |
144 | 144 | ||
145 | 145 | ||
diff --git a/src/testing/testing.c b/src/testing/testing.c index 23bc40d7e..9724fb55b 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -38,12 +38,6 @@ | |||
38 | 38 | ||
39 | 39 | ||
40 | /** | 40 | /** |
41 | * We need pipe control only on WINDOWS | ||
42 | */ | ||
43 | #define PIPE_CONTROL GNUNET_NO | ||
44 | |||
45 | |||
46 | /** | ||
47 | * Lowest port used for GNUnet testing. Should be high enough to not | 41 | * Lowest port used for GNUnet testing. Should be high enough to not |
48 | * conflict with other applications running on the hosts but be low | 42 | * conflict with other applications running on the hosts but be low |
49 | * enough to not conflict with client-ports (typically starting around | 43 | * enough to not conflict with client-ports (typically starting around |
@@ -473,8 +467,8 @@ cleanup_shared_service_instance (struct SharedServiceInstance *i) | |||
473 | (void) unlink (i->cfg_fn); | 467 | (void) unlink (i->cfg_fn); |
474 | GNUNET_free (i->cfg_fn); | 468 | GNUNET_free (i->cfg_fn); |
475 | } | 469 | } |
476 | GNUNET_free_non_null (i->unix_sock); | 470 | GNUNET_free (i->unix_sock); |
477 | GNUNET_free_non_null (i->port_str); | 471 | GNUNET_free (i->port_str); |
478 | GNUNET_break (NULL == i->proc); | 472 | GNUNET_break (NULL == i->proc); |
479 | GNUNET_break (0 == i->n_refs); | 473 | GNUNET_break (0 == i->n_refs); |
480 | GNUNET_free (i); | 474 | GNUNET_free (i); |
@@ -492,8 +486,7 @@ start_shared_service_instance (struct SharedServiceInstance *i) | |||
492 | (void) GNUNET_asprintf (&binary, "gnunet-service-%s", i->ss->sname); | 486 | (void) GNUNET_asprintf (&binary, "gnunet-service-%s", i->ss->sname); |
493 | libexec_binary = GNUNET_OS_get_libexec_binary_path (binary); | 487 | libexec_binary = GNUNET_OS_get_libexec_binary_path (binary); |
494 | GNUNET_free (binary); | 488 | GNUNET_free (binary); |
495 | i->proc = GNUNET_OS_start_process (PIPE_CONTROL, | 489 | i->proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
496 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
497 | NULL, | 490 | NULL, |
498 | NULL, | 491 | NULL, |
499 | NULL, | 492 | NULL, |
@@ -551,17 +544,17 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system, | |||
551 | stop_shared_service_instance (i); | 544 | stop_shared_service_instance (i); |
552 | cleanup_shared_service_instance (i); | 545 | cleanup_shared_service_instance (i); |
553 | } | 546 | } |
554 | GNUNET_free_non_null (ss->instances); | 547 | GNUNET_free (ss->instances); |
555 | GNUNET_CONFIGURATION_destroy (ss->cfg); | 548 | GNUNET_CONFIGURATION_destroy (ss->cfg); |
556 | GNUNET_free (ss->sname); | 549 | GNUNET_free (ss->sname); |
557 | GNUNET_free (ss); | 550 | GNUNET_free (ss); |
558 | } | 551 | } |
559 | GNUNET_free_non_null (system->shared_services); | 552 | GNUNET_free (system->shared_services); |
560 | if (GNUNET_YES == remove_paths) | 553 | if (GNUNET_YES == remove_paths) |
561 | GNUNET_DISK_directory_remove (system->tmppath); | 554 | GNUNET_DISK_directory_remove (system->tmppath); |
562 | GNUNET_free (system->tmppath); | 555 | GNUNET_free (system->tmppath); |
563 | GNUNET_free_non_null (system->trusted_ip); | 556 | GNUNET_free (system->trusted_ip); |
564 | GNUNET_free_non_null (system->hostname); | 557 | GNUNET_free (system->hostname); |
565 | GNUNET_free (system); | 558 | GNUNET_free (system); |
566 | } | 559 | } |
567 | 560 | ||
@@ -957,7 +950,7 @@ update_config_sections (void *cls, const char *section) | |||
957 | } | 950 | } |
958 | GNUNET_free (ikeys); | 951 | GNUNET_free (ikeys); |
959 | } | 952 | } |
960 | GNUNET_free_non_null (val); | 953 | GNUNET_free (val); |
961 | ACCEPT_FROM_key = "ACCEPT_FROM"; | 954 | ACCEPT_FROM_key = "ACCEPT_FROM"; |
962 | if ((NULL != uc->system->trusted_ip) && | 955 | if ((NULL != uc->system->trusted_ip) && |
963 | (NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */ | 956 | (NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */ |
@@ -1120,7 +1113,7 @@ GNUNET_TESTING_configuration_create_ (struct GNUNET_TESTING_System *system, | |||
1120 | *nports = uc.nports; | 1113 | *nports = uc.nports; |
1121 | } | 1114 | } |
1122 | else | 1115 | else |
1123 | GNUNET_free_non_null (uc.ports); | 1116 | GNUNET_free (uc.ports); |
1124 | return uc.status; | 1117 | return uc.status; |
1125 | } | 1118 | } |
1126 | 1119 | ||
@@ -1316,8 +1309,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, | |||
1316 | return peer; | 1309 | return peer; |
1317 | 1310 | ||
1318 | err_ret: | 1311 | err_ret: |
1319 | GNUNET_free_non_null (ss_instances); | 1312 | GNUNET_free (ss_instances); |
1320 | GNUNET_free_non_null (ports); | 1313 | GNUNET_free (ports); |
1321 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_); | 1314 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_); |
1322 | if (NULL != emsg) | 1315 | if (NULL != emsg) |
1323 | *emsg = emsg_; | 1316 | *emsg = emsg_; |
@@ -1378,8 +1371,7 @@ GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer) | |||
1378 | peer->main_binary = | 1371 | peer->main_binary = |
1379 | GNUNET_CONFIGURATION_expand_dollar (peer->cfg, peer->main_binary); | 1372 | GNUNET_CONFIGURATION_expand_dollar (peer->cfg, peer->main_binary); |
1380 | peer->main_process = | 1373 | peer->main_process = |
1381 | GNUNET_OS_start_process_s (PIPE_CONTROL, | 1374 | GNUNET_OS_start_process_s (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
1382 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
1383 | NULL, | 1375 | NULL, |
1384 | peer->main_binary, | 1376 | peer->main_binary, |
1385 | peer->args, | 1377 | peer->args, |
@@ -1566,8 +1558,8 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer) | |||
1566 | GNUNET_CONFIGURATION_destroy (peer->cfg); | 1558 | GNUNET_CONFIGURATION_destroy (peer->cfg); |
1567 | GNUNET_free (peer->main_binary); | 1559 | GNUNET_free (peer->main_binary); |
1568 | GNUNET_free (peer->args); | 1560 | GNUNET_free (peer->args); |
1569 | GNUNET_free_non_null (peer->id); | 1561 | GNUNET_free (peer->id); |
1570 | GNUNET_free_non_null (peer->ss_instances); | 1562 | GNUNET_free (peer->ss_instances); |
1571 | if (NULL != peer->ports) | 1563 | if (NULL != peer->ports) |
1572 | { | 1564 | { |
1573 | for (cnt = 0; cnt < peer->nports; cnt++) | 1565 | for (cnt = 0; cnt < peer->nports; cnt++) |
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index c6f600df1..b380c0bd4 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -275,7 +275,7 @@ free_peer (void *cls, const struct GNUNET_PeerIdentity *pid, void *value) | |||
275 | } | 275 | } |
276 | if (NULL != pos->hello) | 276 | if (NULL != pos->hello) |
277 | { | 277 | { |
278 | GNUNET_free_non_null (pos->hello); | 278 | GNUNET_free (pos->hello); |
279 | pos->hello = NULL; | 279 | pos->hello = NULL; |
280 | } | 280 | } |
281 | if (NULL != pos->filter) | 281 | if (NULL != pos->filter) |
@@ -812,7 +812,7 @@ process_peer (void *cls, | |||
812 | pos = GNUNET_CONTAINER_multipeermap_get (peers, peer); | 812 | pos = GNUNET_CONTAINER_multipeermap_get (peers, peer); |
813 | if (NULL != pos) | 813 | if (NULL != pos) |
814 | { | 814 | { |
815 | GNUNET_free_non_null (pos->hello); | 815 | GNUNET_free (pos->hello); |
816 | pos->hello = NULL; | 816 | pos->hello = NULL; |
817 | if (NULL != pos->filter) | 817 | if (NULL != pos->filter) |
818 | { | 818 | { |
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 127ba9516..e0369059d 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -155,7 +155,15 @@ libgnunettransporttesting_la_LIBADD = \ | |||
155 | $(top_builddir)/src/ats/libgnunetats.la \ | 155 | $(top_builddir)/src/ats/libgnunetats.la \ |
156 | $(top_builddir)/src/util/libgnunetutil.la \ | 156 | $(top_builddir)/src/util/libgnunetutil.la \ |
157 | $(top_builddir)/src/testing/libgnunettesting.la \ | 157 | $(top_builddir)/src/testing/libgnunettesting.la \ |
158 | $(top_builddir)/src/arm/libgnunetarm.la \ | ||
158 | $(GN_LIBINTL) | 159 | $(GN_LIBINTL) |
160 | libgnunettransporttesting_la_DEPENDENCIES = \ | ||
161 | libgnunettransport.la \ | ||
162 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
163 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
164 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
165 | $(top_builddir)/src/testing/libgnunettesting.la \ | ||
166 | $(top_builddir)/src/arm/libgnunetarm.la | ||
159 | libgnunettransporttesting_la_LDFLAGS = \ | 167 | libgnunettransporttesting_la_LDFLAGS = \ |
160 | $(GN_LIB_LDFLAGS) | 168 | $(GN_LIB_LDFLAGS) |
161 | 169 | ||
@@ -185,6 +193,10 @@ libgnunettransport_la_LIBADD = \ | |||
185 | $(top_builddir)/src/ats/libgnunetats.la \ | 193 | $(top_builddir)/src/ats/libgnunetats.la \ |
186 | $(top_builddir)/src/util/libgnunetutil.la \ | 194 | $(top_builddir)/src/util/libgnunetutil.la \ |
187 | $(GN_LIBINTL) | 195 | $(GN_LIBINTL) |
196 | libgnunettransport_la_DEPENDENCIES = \ | ||
197 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
198 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
199 | $(top_builddir)/src/util/libgnunetutil.la | ||
188 | libgnunettransport_la_LDFLAGS = \ | 200 | libgnunettransport_la_LDFLAGS = \ |
189 | $(GN_LIB_LDFLAGS) \ | 201 | $(GN_LIB_LDFLAGS) \ |
190 | -version-info 4:0:2 | 202 | -version-info 4:0:2 |
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index 9da14dcb0..ec9f5986a 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c | |||
@@ -707,7 +707,6 @@ struct Addresses | |||
707 | }; | 707 | }; |
708 | 708 | ||
709 | 709 | ||
710 | |||
711 | /** | 710 | /** |
712 | * Maximum queue length before we stop reading towards the transport service. | 711 | * Maximum queue length before we stop reading towards the transport service. |
713 | */ | 712 | */ |
@@ -1618,6 +1617,7 @@ queue_read (void *cls) | |||
1618 | queue_finish (queue); | 1617 | queue_finish (queue); |
1619 | } | 1618 | } |
1620 | 1619 | ||
1620 | |||
1621 | /** | 1621 | /** |
1622 | * Convert a `struct sockaddr_in6 to a `struct sockaddr *` | 1622 | * Convert a `struct sockaddr_in6 to a `struct sockaddr *` |
1623 | * | 1623 | * |
@@ -1642,6 +1642,7 @@ tcp_address_to_sockaddr_numeric_v6 (socklen_t *sock_len, struct sockaddr_in6 v6, | |||
1642 | return in; | 1642 | return in; |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | |||
1645 | /** | 1646 | /** |
1646 | * Convert a `struct sockaddr_in4 to a `struct sockaddr *` | 1647 | * Convert a `struct sockaddr_in4 to a `struct sockaddr *` |
1647 | * | 1648 | * |
@@ -1665,6 +1666,7 @@ tcp_address_to_sockaddr_numeric_v4 (socklen_t *sock_len, struct sockaddr_in v4, | |||
1665 | return in; | 1666 | return in; |
1666 | } | 1667 | } |
1667 | 1668 | ||
1669 | |||
1668 | /** | 1670 | /** |
1669 | * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *` | 1671 | * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *` |
1670 | * | 1672 | * |
@@ -1724,6 +1726,7 @@ tcp_address_to_sockaddr_port_only (const char *bindto, unsigned int *port) | |||
1724 | return po; | 1726 | return po; |
1725 | } | 1727 | } |
1726 | 1728 | ||
1729 | |||
1727 | /** | 1730 | /** |
1728 | * This Method extracts the address part of the BINDTO string. | 1731 | * This Method extracts the address part of the BINDTO string. |
1729 | * | 1732 | * |
@@ -1750,7 +1753,8 @@ extract_address (const char *bindto) | |||
1750 | start++; /* skip over '['*/ | 1753 | start++; /* skip over '['*/ |
1751 | cp[strlen (cp) - 1] = '\0'; /* eat ']'*/ | 1754 | cp[strlen (cp) - 1] = '\0'; /* eat ']'*/ |
1752 | } | 1755 | } |
1753 | else { | 1756 | else |
1757 | { | ||
1754 | token = strtok_r (cp, "]", &rest); | 1758 | token = strtok_r (cp, "]", &rest); |
1755 | if (strlen (bindto) == strlen (token)) | 1759 | if (strlen (bindto) == strlen (token)) |
1756 | { | 1760 | { |
@@ -1768,6 +1772,7 @@ extract_address (const char *bindto) | |||
1768 | return start; | 1772 | return start; |
1769 | } | 1773 | } |
1770 | 1774 | ||
1775 | |||
1771 | /** | 1776 | /** |
1772 | * This Method extracts the port part of the BINDTO string. | 1777 | * This Method extracts the port part of the BINDTO string. |
1773 | * | 1778 | * |
@@ -1846,6 +1851,7 @@ extract_port (const char *addr_and_port) | |||
1846 | return port; | 1851 | return port; |
1847 | } | 1852 | } |
1848 | 1853 | ||
1854 | |||
1849 | /** | 1855 | /** |
1850 | * Convert TCP bind specification to a `struct sockaddr *` | 1856 | * Convert TCP bind specification to a `struct sockaddr *` |
1851 | * | 1857 | * |
@@ -2683,6 +2689,7 @@ queue_read_kx (void *cls) | |||
2683 | queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue); | 2689 | queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue); |
2684 | } | 2690 | } |
2685 | 2691 | ||
2692 | |||
2686 | /** | 2693 | /** |
2687 | * Function called by the transport service to initialize a | 2694 | * Function called by the transport service to initialize a |
2688 | * message queue given address information about another peer. | 2695 | * message queue given address information about another peer. |
@@ -2777,6 +2784,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) | |||
2777 | return GNUNET_OK; | 2784 | return GNUNET_OK; |
2778 | } | 2785 | } |
2779 | 2786 | ||
2787 | |||
2780 | /** | 2788 | /** |
2781 | * Iterator over all message queues to clean up. | 2789 | * Iterator over all message queues to clean up. |
2782 | * | 2790 | * |
@@ -2911,6 +2919,7 @@ nat_address_cb (void *cls, | |||
2911 | } | 2919 | } |
2912 | } | 2920 | } |
2913 | 2921 | ||
2922 | |||
2914 | /** | 2923 | /** |
2915 | * This method launch network interactions for each address we like to bind to. | 2924 | * This method launch network interactions for each address we like to bind to. |
2916 | * | 2925 | * |
@@ -3015,7 +3024,7 @@ init_socket (const struct sockaddr *addr, | |||
3015 | if (NULL == queue_map) | 3024 | if (NULL == queue_map) |
3016 | queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); | 3025 | queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); |
3017 | 3026 | ||
3018 | if (NULL == ch ) | 3027 | if (NULL == ch) |
3019 | ch = GNUNET_TRANSPORT_communicator_connect (cfg, | 3028 | ch = GNUNET_TRANSPORT_communicator_connect (cfg, |
3020 | COMMUNICATOR_CONFIG_SECTION, | 3029 | COMMUNICATOR_CONFIG_SECTION, |
3021 | COMMUNICATOR_ADDRESS_PREFIX, | 3030 | COMMUNICATOR_ADDRESS_PREFIX, |
@@ -3038,6 +3047,7 @@ init_socket (const struct sockaddr *addr, | |||
3038 | 3047 | ||
3039 | } | 3048 | } |
3040 | 3049 | ||
3050 | |||
3041 | /** | 3051 | /** |
3042 | * This method reads from the DLL addrs_head to register them at the NAT service. | 3052 | * This method reads from the DLL addrs_head to register them at the NAT service. |
3043 | */ | 3053 | */ |
@@ -3092,6 +3102,7 @@ nat_register () | |||
3092 | } | 3102 | } |
3093 | } | 3103 | } |
3094 | 3104 | ||
3105 | |||
3095 | /** | 3106 | /** |
3096 | * This method adds addresses to the DLL, that are later register at the NAT service. | 3107 | * This method adds addresses to the DLL, that are later register at the NAT service. |
3097 | */ | 3108 | */ |
@@ -3108,6 +3119,7 @@ add_addr (struct sockaddr *in, socklen_t in_len) | |||
3108 | addrs_lens++; | 3119 | addrs_lens++; |
3109 | } | 3120 | } |
3110 | 3121 | ||
3122 | |||
3111 | /** | 3123 | /** |
3112 | * This method is the callback called by the resolver API, and wraps method init_socket. | 3124 | * This method is the callback called by the resolver API, and wraps method init_socket. |
3113 | * | 3125 | * |
@@ -3160,6 +3172,7 @@ init_socket_resolv (void *cls, | |||
3160 | } | 3172 | } |
3161 | } | 3173 | } |
3162 | 3174 | ||
3175 | |||
3163 | /** | 3176 | /** |
3164 | * Setup communicator and launch network interactions. | 3177 | * Setup communicator and launch network interactions. |
3165 | * | 3178 | * |
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c index 585b29c2d..03c120cc9 100644 --- a/src/transport/gnunet-communicator-udp.c +++ b/src/transport/gnunet-communicator-udp.c | |||
@@ -783,7 +783,7 @@ bi_destroy (struct BroadcastInterface *bi) | |||
783 | GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi); | 783 | GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi); |
784 | GNUNET_SCHEDULER_cancel (bi->broadcast_task); | 784 | GNUNET_SCHEDULER_cancel (bi->broadcast_task); |
785 | GNUNET_free (bi->sa); | 785 | GNUNET_free (bi->sa); |
786 | GNUNET_free_non_null (bi->ba); | 786 | GNUNET_free (bi->ba); |
787 | GNUNET_free (bi); | 787 | GNUNET_free (bi); |
788 | } | 788 | } |
789 | 789 | ||
@@ -1309,7 +1309,8 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value) | |||
1309 | "Tell transport we have more acks!\n"); | 1309 | "Tell transport we have more acks!\n"); |
1310 | GNUNET_TRANSPORT_communicator_mq_update (ch, | 1310 | GNUNET_TRANSPORT_communicator_mq_update (ch, |
1311 | receiver->d_qh, | 1311 | receiver->d_qh, |
1312 | (allowed - ss->sequence_allowed), | 1312 | (allowed |
1313 | - ss->sequence_allowed), | ||
1313 | 1); | 1314 | 1); |
1314 | ss->sequence_allowed = allowed; | 1315 | ss->sequence_allowed = allowed; |
1315 | /* move ss to head to avoid discarding it anytime soon! */ | 1316 | /* move ss to head to avoid discarding it anytime soon! */ |
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c index 6ea0ea360..d7e18f87a 100644 --- a/src/transport/gnunet-communicator-unix.c +++ b/src/transport/gnunet-communicator-unix.c | |||
@@ -673,7 +673,8 @@ setup_queue (const struct GNUNET_PeerIdentity *target, | |||
673 | queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, | 673 | queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, |
674 | &queue->target, | 674 | &queue->target, |
675 | foreign_addr, | 675 | foreign_addr, |
676 | UNIX_MTU - sizeof (struct UNIXMessage), | 676 | UNIX_MTU - sizeof (struct |
677 | UNIXMessage), | ||
677 | GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, | 678 | GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, |
678 | 0, | 679 | 0, |
679 | GNUNET_NT_LOOPBACK, | 680 | GNUNET_NT_LOOPBACK, |
@@ -799,7 +800,7 @@ select_read_cb (void *cls) | |||
799 | /* ensure aligned access */ | 800 | /* ensure aligned access */ |
800 | memcpy (&al_hdr, currhdr, sizeof(al_hdr)); | 801 | memcpy (&al_hdr, currhdr, sizeof(al_hdr)); |
801 | if ((tsize < sizeof(struct GNUNET_MessageHeader)) || | 802 | if ((tsize < sizeof(struct GNUNET_MessageHeader)) || |
802 | (tsize != ntohs(al_hdr.size))) | 803 | (tsize != ntohs (al_hdr.size))) |
803 | { | 804 | { |
804 | GNUNET_break_op (0); | 805 | GNUNET_break_op (0); |
805 | return; | 806 | return; |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 93fa031f4..207c17f2f 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -727,9 +727,9 @@ handle_send_transmit_continuation (void *cls, | |||
727 | stcc->uuid); | 727 | stcc->uuid); |
728 | send_ok_msg.header.size = htons (sizeof(send_ok_msg)); | 728 | send_ok_msg.header.size = htons (sizeof(send_ok_msg)); |
729 | send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); | 729 | send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); |
730 | send_ok_msg.bytes_msg = htonl (bytes_payload); | 730 | send_ok_msg.bytes_msg = htons (bytes_payload); |
731 | send_ok_msg.bytes_physical = htonl (bytes_on_wire); | 731 | send_ok_msg.bytes_physical = htonl (bytes_on_wire); |
732 | send_ok_msg.success = htonl (success); | 732 | send_ok_msg.success = htons (success); |
733 | send_ok_msg.peer = stcc->target; | 733 | send_ok_msg.peer = stcc->target; |
734 | unicast (stcc->tc, &send_ok_msg.header, GNUNET_NO); | 734 | unicast (stcc->tc, &send_ok_msg.header, GNUNET_NO); |
735 | } | 735 | } |
@@ -2108,7 +2108,7 @@ free_blacklist_entry (void *cls, | |||
2108 | { | 2108 | { |
2109 | char *be = value; | 2109 | char *be = value; |
2110 | 2110 | ||
2111 | GNUNET_free_non_null (be); | 2111 | GNUNET_free (be); |
2112 | return GNUNET_OK; | 2112 | return GNUNET_OK; |
2113 | } | 2113 | } |
2114 | 2114 | ||
@@ -2511,7 +2511,7 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc) | |||
2511 | GNUNET_SCHEDULER_cancel (bc->task); | 2511 | GNUNET_SCHEDULER_cancel (bc->task); |
2512 | bc->task = NULL; | 2512 | bc->task = NULL; |
2513 | } | 2513 | } |
2514 | GNUNET_free_non_null (bc->address); | 2514 | GNUNET_free (bc->address); |
2515 | GNUNET_free (bc); | 2515 | GNUNET_free (bc); |
2516 | } | 2516 | } |
2517 | 2517 | ||
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index ed6565d23..472c77c27 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -182,7 +182,7 @@ refresh_hello_task (void *cls) | |||
182 | gc.addr_pos = oal_head; | 182 | gc.addr_pos = oal_head; |
183 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); | 183 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); |
184 | 184 | ||
185 | GNUNET_free_non_null (our_hello); | 185 | GNUNET_free (our_hello); |
186 | our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key, | 186 | our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key, |
187 | &address_generator, | 187 | &address_generator, |
188 | &gc, | 188 | &gc, |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 35da5ec10..0d71e1ff9 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -339,7 +339,7 @@ destroy_it (void *cls, const struct GNUNET_PeerIdentity *key, void *value) | |||
339 | GNUNET_assert ( | 339 | GNUNET_assert ( |
340 | GNUNET_OK == | 340 | GNUNET_OK == |
341 | GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value)); | 341 | GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value)); |
342 | GNUNET_free_non_null (m->address); | 342 | GNUNET_free (m->address); |
343 | GNUNET_free (value); | 343 | GNUNET_free (value); |
344 | return GNUNET_OK; | 344 | return GNUNET_OK; |
345 | } | 345 | } |
@@ -1037,7 +1037,7 @@ plugin_monitoring_cb (void *cls, | |||
1037 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); | 1037 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); |
1038 | addr->asc = NULL; | 1038 | addr->asc = NULL; |
1039 | } | 1039 | } |
1040 | GNUNET_free_non_null (addr->str); | 1040 | GNUNET_free (addr->str); |
1041 | GNUNET_free (addr); | 1041 | GNUNET_free (addr); |
1042 | *session_ctx = NULL; | 1042 | *session_ctx = NULL; |
1043 | } | 1043 | } |
@@ -1069,7 +1069,7 @@ plugin_monitoring_cb (void *cls, | |||
1069 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); | 1069 | GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); |
1070 | addr->asc = NULL; | 1070 | addr->asc = NULL; |
1071 | } | 1071 | } |
1072 | GNUNET_free_non_null (addr->str); | 1072 | GNUNET_free (addr->str); |
1073 | GNUNET_free (addr); | 1073 | GNUNET_free (addr); |
1074 | *session_ctx = NULL; | 1074 | *session_ctx = NULL; |
1075 | } | 1075 | } |
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 87cd7ead2..92ed2fe52 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -2207,9 +2207,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
2207 | _ ("Shutdown for plugin `%s' complete\n"), | 2207 | _ ("Shutdown for plugin `%s' complete\n"), |
2208 | plugin->name); | 2208 | plugin->name); |
2209 | GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions); | 2209 | GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions); |
2210 | GNUNET_free_non_null (plugin->proxy_hostname); | 2210 | GNUNET_free (plugin->proxy_hostname); |
2211 | GNUNET_free_non_null (plugin->proxy_username); | 2211 | GNUNET_free (plugin->proxy_username); |
2212 | GNUNET_free_non_null (plugin->proxy_password); | 2212 | GNUNET_free (plugin->proxy_password); |
2213 | GNUNET_free (plugin); | 2213 | GNUNET_free (plugin); |
2214 | GNUNET_free (api); | 2214 | GNUNET_free (api); |
2215 | return NULL; | 2215 | return NULL; |
@@ -2304,9 +2304,9 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin) | |||
2304 | GNUNET_free (proxy_type); | 2304 | GNUNET_free (proxy_type); |
2305 | GNUNET_free (plugin->proxy_hostname); | 2305 | GNUNET_free (plugin->proxy_hostname); |
2306 | plugin->proxy_hostname = NULL; | 2306 | plugin->proxy_hostname = NULL; |
2307 | GNUNET_free_non_null (plugin->proxy_username); | 2307 | GNUNET_free (plugin->proxy_username); |
2308 | plugin->proxy_username = NULL; | 2308 | plugin->proxy_username = NULL; |
2309 | GNUNET_free_non_null (plugin->proxy_password); | 2309 | GNUNET_free (plugin->proxy_password); |
2310 | plugin->proxy_password = NULL; | 2310 | plugin->proxy_password = NULL; |
2311 | 2311 | ||
2312 | return GNUNET_SYSERR; | 2312 | return GNUNET_SYSERR; |
@@ -2325,7 +2325,7 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin) | |||
2325 | if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel) | 2325 | if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel) |
2326 | plugin->proxy_use_httpproxytunnel = GNUNET_NO; | 2326 | plugin->proxy_use_httpproxytunnel = GNUNET_NO; |
2327 | 2327 | ||
2328 | GNUNET_free_non_null (proxy_type); | 2328 | GNUNET_free (proxy_type); |
2329 | } | 2329 | } |
2330 | 2330 | ||
2331 | /* Should we emulate an XHR client for testing? */ | 2331 | /* Should we emulate an XHR client for testing? */ |
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c index 2bcab42b4..d81d6db9c 100644 --- a/src/transport/plugin_transport_http_common.c +++ b/src/transport/plugin_transport_http_common.c | |||
@@ -34,10 +34,10 @@ http_clean_splitted (struct SplittedHTTPAddress *spa) | |||
34 | { | 34 | { |
35 | if (NULL != spa) | 35 | if (NULL != spa) |
36 | { | 36 | { |
37 | GNUNET_free_non_null (spa->protocol); | 37 | GNUNET_free (spa->protocol); |
38 | GNUNET_free_non_null (spa->host); | 38 | GNUNET_free (spa->host); |
39 | GNUNET_free_non_null (spa->path); | 39 | GNUNET_free (spa->path); |
40 | GNUNET_free_non_null (spa); | 40 | GNUNET_free (spa); |
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
@@ -494,7 +494,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
494 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); | 494 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); |
495 | asc (asc_cls, NULL, GNUNET_OK); | 495 | asc (asc_cls, NULL, GNUNET_OK); |
496 | http_clean_splitted (saddr); | 496 | http_clean_splitted (saddr); |
497 | GNUNET_free_non_null (sock_addr); | 497 | GNUNET_free (sock_addr); |
498 | return; | 498 | return; |
499 | } | 499 | } |
500 | if ((GNUNET_YES == numeric) && | 500 | if ((GNUNET_YES == numeric) && |
@@ -510,7 +510,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
510 | goto handle_error; | 510 | goto handle_error; |
511 | } | 511 | } |
512 | /* Wait for resolver callback */ | 512 | /* Wait for resolver callback */ |
513 | GNUNET_free_non_null (sock_addr); | 513 | GNUNET_free (sock_addr); |
514 | return; | 514 | return; |
515 | } | 515 | } |
516 | if ((GNUNET_NO == numeric) && | 516 | if ((GNUNET_NO == numeric) && |
@@ -531,7 +531,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
531 | goto handle_error; | 531 | goto handle_error; |
532 | } | 532 | } |
533 | /* Wait for resolver callback */ | 533 | /* Wait for resolver callback */ |
534 | GNUNET_free_non_null (sock_addr); | 534 | GNUNET_free (sock_addr); |
535 | return; | 535 | return; |
536 | } | 536 | } |
537 | if ((GNUNET_NO == numeric) && | 537 | if ((GNUNET_NO == numeric) && |
@@ -541,7 +541,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
541 | ret = http_common_plugin_address_to_string (type, address, addrlen); | 541 | ret = http_common_plugin_address_to_string (type, address, addrlen); |
542 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); | 542 | asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); |
543 | asc (asc_cls, NULL, GNUNET_OK); | 543 | asc (asc_cls, NULL, GNUNET_OK); |
544 | GNUNET_free_non_null (sock_addr); | 544 | GNUNET_free (sock_addr); |
545 | http_clean_splitted (saddr); | 545 | http_clean_splitted (saddr); |
546 | return; | 546 | return; |
547 | } | 547 | } |
@@ -553,7 +553,7 @@ handle_error: | |||
553 | /* Report error */ | 553 | /* Report error */ |
554 | asc (asc_cls, NULL, GNUNET_SYSERR); | 554 | asc (asc_cls, NULL, GNUNET_SYSERR); |
555 | asc (asc_cls, NULL, GNUNET_OK); | 555 | asc (asc_cls, NULL, GNUNET_OK); |
556 | GNUNET_free_non_null (sock_addr); | 556 | GNUNET_free (sock_addr); |
557 | if (NULL != saddr) | 557 | if (NULL != saddr) |
558 | http_clean_splitted (saddr); | 558 | http_clean_splitted (saddr); |
559 | } | 559 | } |
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index eef83b29d..d1b21ba9c 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -1495,7 +1495,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin, | |||
1495 | http_common_plugin_address_to_string (plugin->protocol, | 1495 | http_common_plugin_address_to_string (plugin->protocol, |
1496 | addr, | 1496 | addr, |
1497 | addr_len)); | 1497 | addr_len)); |
1498 | GNUNET_free_non_null (addr); | 1498 | GNUNET_free (addr); |
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | if ((_RECEIVE == direction) && | 1501 | if ((_RECEIVE == direction) && |
@@ -2179,16 +2179,16 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2179 | { | 2179 | { |
2180 | struct GNUNET_OS_Process *cert_creation; | 2180 | struct GNUNET_OS_Process *cert_creation; |
2181 | 2181 | ||
2182 | GNUNET_free_non_null (plugin->key); | 2182 | GNUNET_free (plugin->key); |
2183 | plugin->key = NULL; | 2183 | plugin->key = NULL; |
2184 | GNUNET_free_non_null (plugin->cert); | 2184 | GNUNET_free (plugin->cert); |
2185 | plugin->cert = NULL; | 2185 | plugin->cert = NULL; |
2186 | 2186 | ||
2187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2188 | "No usable TLS certificate found, creating certificate\n"); | 2188 | "No usable TLS certificate found, creating certificate\n"); |
2189 | errno = 0; | 2189 | errno = 0; |
2190 | cert_creation = | 2190 | cert_creation = |
2191 | GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 2191 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
2192 | NULL, NULL, NULL, | 2192 | NULL, NULL, NULL, |
2193 | "gnunet-transport-certificate-creation", | 2193 | "gnunet-transport-certificate-creation", |
2194 | "gnunet-transport-certificate-creation", | 2194 | "gnunet-transport-certificate-creation", |
@@ -2203,11 +2203,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2203 | GNUNET_free (key_file); | 2203 | GNUNET_free (key_file); |
2204 | GNUNET_free (cert_file); | 2204 | GNUNET_free (cert_file); |
2205 | 2205 | ||
2206 | GNUNET_free_non_null (plugin->key); | 2206 | GNUNET_free (plugin->key); |
2207 | plugin->key = NULL; | 2207 | plugin->key = NULL; |
2208 | GNUNET_free_non_null (plugin->cert); | 2208 | GNUNET_free (plugin->cert); |
2209 | plugin->cert = NULL; | 2209 | plugin->cert = NULL; |
2210 | GNUNET_free_non_null (plugin->crypto_init); | 2210 | GNUNET_free (plugin->crypto_init); |
2211 | plugin->crypto_init = NULL; | 2211 | plugin->crypto_init = NULL; |
2212 | 2212 | ||
2213 | return GNUNET_SYSERR; | 2213 | return GNUNET_SYSERR; |
@@ -2228,11 +2228,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2228 | GNUNET_free (key_file); | 2228 | GNUNET_free (key_file); |
2229 | GNUNET_free (cert_file); | 2229 | GNUNET_free (cert_file); |
2230 | 2230 | ||
2231 | GNUNET_free_non_null (plugin->key); | 2231 | GNUNET_free (plugin->key); |
2232 | plugin->key = NULL; | 2232 | plugin->key = NULL; |
2233 | GNUNET_free_non_null (plugin->cert); | 2233 | GNUNET_free (plugin->cert); |
2234 | plugin->cert = NULL; | 2234 | plugin->cert = NULL; |
2235 | GNUNET_free_non_null (plugin->crypto_init); | 2235 | GNUNET_free (plugin->crypto_init); |
2236 | plugin->crypto_init = NULL; | 2236 | plugin->crypto_init = NULL; |
2237 | 2237 | ||
2238 | return GNUNET_SYSERR; | 2238 | return GNUNET_SYSERR; |
@@ -2871,8 +2871,8 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin) | |||
2871 | GNUNET_assert (NULL != addrs[res]); | 2871 | GNUNET_assert (NULL != addrs[res]); |
2872 | GNUNET_free (addrs[res]); | 2872 | GNUNET_free (addrs[res]); |
2873 | } | 2873 | } |
2874 | GNUNET_free_non_null (addrs); | 2874 | GNUNET_free (addrs); |
2875 | GNUNET_free_non_null (addrlens); | 2875 | GNUNET_free (addrlens); |
2876 | } | 2876 | } |
2877 | 2877 | ||
2878 | 2878 | ||
@@ -3316,9 +3316,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3316 | plugin->server_v6_task = NULL; | 3316 | plugin->server_v6_task = NULL; |
3317 | } | 3317 | } |
3318 | #if BUILD_HTTPS | 3318 | #if BUILD_HTTPS |
3319 | GNUNET_free_non_null (plugin->crypto_init); | 3319 | GNUNET_free (plugin->crypto_init); |
3320 | GNUNET_free_non_null (plugin->cert); | 3320 | GNUNET_free (plugin->cert); |
3321 | GNUNET_free_non_null (plugin->key); | 3321 | GNUNET_free (plugin->key); |
3322 | #endif | 3322 | #endif |
3323 | GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, | 3323 | GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, |
3324 | &destroy_session_shutdown_cb, | 3324 | &destroy_session_shutdown_cb, |
@@ -3336,10 +3336,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3336 | plugin->server_v6 = NULL; | 3336 | plugin->server_v6 = NULL; |
3337 | } | 3337 | } |
3338 | /* Clean up */ | 3338 | /* Clean up */ |
3339 | GNUNET_free_non_null (plugin->external_hostname); | 3339 | GNUNET_free (plugin->external_hostname); |
3340 | GNUNET_free_non_null (plugin->ext_addr); | 3340 | GNUNET_free (plugin->ext_addr); |
3341 | GNUNET_free_non_null (plugin->server_addr_v4); | 3341 | GNUNET_free (plugin->server_addr_v4); |
3342 | GNUNET_free_non_null (plugin->server_addr_v6); | 3342 | GNUNET_free (plugin->server_addr_v6); |
3343 | regfree (&plugin->url_regex); | 3343 | regfree (&plugin->url_regex); |
3344 | 3344 | ||
3345 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 3345 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c index 330023118..f3db4fc5a 100644 --- a/src/transport/plugin_transport_smtp.c +++ b/src/transport/plugin_transport_smtp.c | |||
@@ -174,9 +174,9 @@ listenAndDistribute (void *unused) | |||
174 | goto END; \ | 174 | goto END; \ |
175 | } \ | 175 | } \ |
176 | if (core_api->load_monitor != NULL) \ | 176 | if (core_api->load_monitor != NULL) \ |
177 | GNUNET_network_monitor_notify_transmission (core_api->load_monitor, \ | 177 | GNUNET_network_monitor_notify_transmission (core_api->load_monitor, \ |
178 | GNUNET_ND_DOWNLOAD, \ | 178 | GNUNET_ND_DOWNLOAD, \ |
179 | strlen (retl)); \ | 179 | strlen (retl)); \ |
180 | } while (0) | 180 | } while (0) |
181 | 181 | ||
182 | 182 | ||
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 4cec181b0..e3bc21543 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1186,7 +1186,7 @@ get_server_addresses (const char *service_name, | |||
1186 | (EACCES == errno)) | 1186 | (EACCES == errno)) |
1187 | { | 1187 | { |
1188 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); | 1188 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); |
1189 | GNUNET_free_non_null (hostname); | 1189 | GNUNET_free (hostname); |
1190 | GNUNET_free (unixpath); | 1190 | GNUNET_free (unixpath); |
1191 | return GNUNET_SYSERR; | 1191 | return GNUNET_SYSERR; |
1192 | } | 1192 | } |
@@ -1212,7 +1212,7 @@ get_server_addresses (const char *service_name, | |||
1212 | _ ( | 1212 | _ ( |
1213 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 1213 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
1214 | service_name); | 1214 | service_name); |
1215 | GNUNET_free_non_null (hostname); | 1215 | GNUNET_free (hostname); |
1216 | return GNUNET_SYSERR; | 1216 | return GNUNET_SYSERR; |
1217 | } | 1217 | } |
1218 | if (0 == port) | 1218 | if (0 == port) |
@@ -1220,8 +1220,8 @@ get_server_addresses (const char *service_name, | |||
1220 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); | 1220 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); |
1221 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); | 1221 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); |
1222 | add_unixpath (saddrs, saddrlens, unixpath, abstract); | 1222 | add_unixpath (saddrs, saddrlens, unixpath, abstract); |
1223 | GNUNET_free_non_null (unixpath); | 1223 | GNUNET_free (unixpath); |
1224 | GNUNET_free_non_null (hostname); | 1224 | GNUNET_free (hostname); |
1225 | *addrs = saddrs; | 1225 | *addrs = saddrs; |
1226 | *addr_lens = saddrlens; | 1226 | *addr_lens = saddrlens; |
1227 | return 1; | 1227 | return 1; |
@@ -1245,7 +1245,7 @@ get_server_addresses (const char *service_name, | |||
1245 | hostname, | 1245 | hostname, |
1246 | gai_strerror (ret)); | 1246 | gai_strerror (ret)); |
1247 | GNUNET_free (hostname); | 1247 | GNUNET_free (hostname); |
1248 | GNUNET_free_non_null (unixpath); | 1248 | GNUNET_free (unixpath); |
1249 | return GNUNET_SYSERR; | 1249 | return GNUNET_SYSERR; |
1250 | } | 1250 | } |
1251 | next = res; | 1251 | next = res; |
@@ -1265,7 +1265,7 @@ get_server_addresses (const char *service_name, | |||
1265 | hostname); | 1265 | hostname); |
1266 | freeaddrinfo (res); | 1266 | freeaddrinfo (res); |
1267 | GNUNET_free (hostname); | 1267 | GNUNET_free (hostname); |
1268 | GNUNET_free_non_null (unixpath); | 1268 | GNUNET_free (unixpath); |
1269 | return GNUNET_SYSERR; | 1269 | return GNUNET_SYSERR; |
1270 | } | 1270 | } |
1271 | resi = i; | 1271 | resi = i; |
@@ -1372,7 +1372,7 @@ get_server_addresses (const char *service_name, | |||
1372 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 1372 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
1373 | } | 1373 | } |
1374 | } | 1374 | } |
1375 | GNUNET_free_non_null (unixpath); | 1375 | GNUNET_free (unixpath); |
1376 | *addrs = saddrs; | 1376 | *addrs = saddrs; |
1377 | *addr_lens = saddrlens; | 1377 | *addr_lens = saddrlens; |
1378 | return resi; | 1378 | return resi; |
@@ -3163,7 +3163,7 @@ handle_tcp_welcome (void *cls, | |||
3163 | else | 3163 | else |
3164 | { | 3164 | { |
3165 | GNUNET_break (0); | 3165 | GNUNET_break (0); |
3166 | GNUNET_free_non_null (vaddr); | 3166 | GNUNET_free (vaddr); |
3167 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 3167 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
3168 | return; | 3168 | return; |
3169 | } | 3169 | } |
@@ -3267,7 +3267,7 @@ handle_tcp_data (void *cls, | |||
3267 | GNUNET_a2s (vaddr, alen)); | 3267 | GNUNET_a2s (vaddr, alen)); |
3268 | GNUNET_break_op (0); | 3268 | GNUNET_break_op (0); |
3269 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 3269 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
3270 | GNUNET_free_non_null (vaddr); | 3270 | GNUNET_free (vaddr); |
3271 | return; | 3271 | return; |
3272 | } | 3272 | } |
3273 | if (GNUNET_YES == session->expecting_welcome) | 3273 | if (GNUNET_YES == session->expecting_welcome) |
@@ -3284,7 +3284,7 @@ handle_tcp_data (void *cls, | |||
3284 | GNUNET_a2s (vaddr, alen)); | 3284 | GNUNET_a2s (vaddr, alen)); |
3285 | GNUNET_break_op (0); | 3285 | GNUNET_break_op (0); |
3286 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 3286 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
3287 | GNUNET_free_non_null (vaddr); | 3287 | GNUNET_free (vaddr); |
3288 | return; | 3288 | return; |
3289 | } | 3289 | } |
3290 | 3290 | ||
@@ -3300,7 +3300,7 @@ handle_tcp_data (void *cls, | |||
3300 | (unsigned int) ntohs (message->type), | 3300 | (unsigned int) ntohs (message->type), |
3301 | GNUNET_i2s (&session->target), | 3301 | GNUNET_i2s (&session->target), |
3302 | GNUNET_a2s (vaddr, alen)); | 3302 | GNUNET_a2s (vaddr, alen)); |
3303 | GNUNET_free_non_null (vaddr); | 3303 | GNUNET_free (vaddr); |
3304 | } | 3304 | } |
3305 | 3305 | ||
3306 | GNUNET_STATISTICS_update (plugin->env->stats, | 3306 | GNUNET_STATISTICS_update (plugin->env->stats, |
@@ -3802,8 +3802,8 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
3802 | plugin); | 3802 | plugin); |
3803 | for (ret = ret_s - 1; ret >= 0; ret--) | 3803 | for (ret = ret_s - 1; ret >= 0; ret--) |
3804 | GNUNET_free (addrs[ret]); | 3804 | GNUNET_free (addrs[ret]); |
3805 | GNUNET_free_non_null (addrs); | 3805 | GNUNET_free (addrs); |
3806 | GNUNET_free_non_null (addrlens); | 3806 | GNUNET_free (addrlens); |
3807 | } | 3807 | } |
3808 | else | 3808 | else |
3809 | { | 3809 | { |
@@ -3893,7 +3893,7 @@ die: | |||
3893 | if (NULL != service) | 3893 | if (NULL != service) |
3894 | LEGACY_SERVICE_stop (service); | 3894 | LEGACY_SERVICE_stop (service); |
3895 | GNUNET_free (plugin); | 3895 | GNUNET_free (plugin); |
3896 | GNUNET_free_non_null (api); | 3896 | GNUNET_free (api); |
3897 | return NULL; | 3897 | return NULL; |
3898 | } | 3898 | } |
3899 | 3899 | ||
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index ef4fddb24..ec3a0edd8 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -3669,7 +3669,7 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
3669 | } | 3669 | } |
3670 | have_bind4 = GNUNET_YES; | 3670 | have_bind4 = GNUNET_YES; |
3671 | } | 3671 | } |
3672 | GNUNET_free_non_null (bind4_address); | 3672 | GNUNET_free (bind4_address); |
3673 | have_bind6 = GNUNET_NO; | 3673 | have_bind6 = GNUNET_NO; |
3674 | memset (&server_addrv6, 0, sizeof(server_addrv6)); | 3674 | memset (&server_addrv6, 0, sizeof(server_addrv6)); |
3675 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, | 3675 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, |
@@ -3691,7 +3691,7 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
3691 | } | 3691 | } |
3692 | have_bind6 = GNUNET_YES; | 3692 | have_bind6 = GNUNET_YES; |
3693 | } | 3693 | } |
3694 | GNUNET_free_non_null (bind6_address); | 3694 | GNUNET_free (bind6_address); |
3695 | 3695 | ||
3696 | enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, | 3696 | enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, |
3697 | "transport-udp", | 3697 | "transport-udp", |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 17d72135b..74b8d5a8a 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -2093,7 +2093,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
2093 | GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer); | 2093 | GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer); |
2094 | plugin->helper_payload_tokenizer = NULL; | 2094 | plugin->helper_payload_tokenizer = NULL; |
2095 | } | 2095 | } |
2096 | GNUNET_free_non_null (plugin->wlan_interface); | 2096 | GNUNET_free (plugin->wlan_interface); |
2097 | GNUNET_free (plugin); | 2097 | GNUNET_free (plugin); |
2098 | GNUNET_free (api); | 2098 | GNUNET_free (api); |
2099 | return NULL; | 2099 | return NULL; |
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c index 4e8c8140d..3e173b8a4 100644 --- a/src/transport/tcp_connection_legacy.c +++ b/src/transport/tcp_connection_legacy.c | |||
@@ -1088,8 +1088,8 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *connection) | |||
1088 | * leak the socket in this special case) ... */ | 1088 | * leak the socket in this special case) ... */ |
1089 | } | 1089 | } |
1090 | } | 1090 | } |
1091 | GNUNET_free_non_null (connection->addr); | 1091 | GNUNET_free (connection->addr); |
1092 | GNUNET_free_non_null (connection->hostname); | 1092 | GNUNET_free (connection->hostname); |
1093 | GNUNET_free (connection->write_buffer); | 1093 | GNUNET_free (connection->write_buffer); |
1094 | GNUNET_free (connection); | 1094 | GNUNET_free (connection); |
1095 | } | 1095 | } |
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c index fb4e9c3c9..12dce3993 100644 --- a/src/transport/tcp_service_legacy.c +++ b/src/transport/tcp_service_legacy.c | |||
@@ -657,7 +657,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
657 | (EACCES == errno)) | 657 | (EACCES == errno)) |
658 | { | 658 | { |
659 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); | 659 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); |
660 | GNUNET_free_non_null (hostname); | 660 | GNUNET_free (hostname); |
661 | GNUNET_free (unixpath); | 661 | GNUNET_free (unixpath); |
662 | return GNUNET_SYSERR; | 662 | return GNUNET_SYSERR; |
663 | } | 663 | } |
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
683 | _ ( | 683 | _ ( |
684 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 684 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
685 | service_name); | 685 | service_name); |
686 | GNUNET_free_non_null (hostname); | 686 | GNUNET_free (hostname); |
687 | return GNUNET_SYSERR; | 687 | return GNUNET_SYSERR; |
688 | } | 688 | } |
689 | if (0 == port) | 689 | if (0 == port) |
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses ( | |||
691 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); | 691 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); |
692 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); | 692 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); |
693 | add_unixpath (saddrs, saddrlens, unixpath, abstract); | 693 | add_unixpath (saddrs, saddrlens, unixpath, abstract); |
694 | GNUNET_free_non_null (unixpath); | 694 | GNUNET_free (unixpath); |
695 | GNUNET_free_non_null (hostname); | 695 | GNUNET_free (hostname); |
696 | *addrs = saddrs; | 696 | *addrs = saddrs; |
697 | *addr_lens = saddrlens; | 697 | *addr_lens = saddrlens; |
698 | return 1; | 698 | return 1; |
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
716 | hostname, | 716 | hostname, |
717 | gai_strerror (ret)); | 717 | gai_strerror (ret)); |
718 | GNUNET_free (hostname); | 718 | GNUNET_free (hostname); |
719 | GNUNET_free_non_null (unixpath); | 719 | GNUNET_free (unixpath); |
720 | return GNUNET_SYSERR; | 720 | return GNUNET_SYSERR; |
721 | } | 721 | } |
722 | next = res; | 722 | next = res; |
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
736 | hostname); | 736 | hostname); |
737 | freeaddrinfo (res); | 737 | freeaddrinfo (res); |
738 | GNUNET_free (hostname); | 738 | GNUNET_free (hostname); |
739 | GNUNET_free_non_null (unixpath); | 739 | GNUNET_free (unixpath); |
740 | return GNUNET_SYSERR; | 740 | return GNUNET_SYSERR; |
741 | } | 741 | } |
742 | resi = i; | 742 | resi = i; |
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
843 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 843 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
844 | } | 844 | } |
845 | } | 845 | } |
846 | GNUNET_free_non_null (unixpath); | 846 | GNUNET_free (unixpath); |
847 | *addrs = saddrs; | 847 | *addrs = saddrs; |
848 | *addr_lens = saddrlens; | 848 | *addr_lens = saddrlens; |
849 | return resi; | 849 | return resi; |
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1024 | { | 1024 | { |
1025 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); | 1025 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); |
1026 | GNUNET_free (rdir); | 1026 | GNUNET_free (rdir); |
1027 | GNUNET_free_non_null (user); | 1027 | GNUNET_free (user); |
1028 | GNUNET_free (pif); | 1028 | GNUNET_free (pif); |
1029 | return GNUNET_SYSERR; | 1029 | return GNUNET_SYSERR; |
1030 | } | 1030 | } |
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1034 | { | 1034 | { |
1035 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); | 1035 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); |
1036 | GNUNET_free (pif); | 1036 | GNUNET_free (pif); |
1037 | GNUNET_free_non_null (user); | 1037 | GNUNET_free (user); |
1038 | return GNUNET_SYSERR; | 1038 | return GNUNET_SYSERR; |
1039 | } | 1039 | } |
1040 | if (0 > fprintf (pidfd, "%u", pid)) | 1040 | if (0 > fprintf (pidfd, "%u", pid)) |
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1042 | GNUNET_break (0 == fclose (pidfd)); | 1042 | GNUNET_break (0 == fclose (pidfd)); |
1043 | if ((NULL != user) && (0 < strlen (user))) | 1043 | if ((NULL != user) && (0 < strlen (user))) |
1044 | GNUNET_DISK_file_change_owner (pif, user); | 1044 | GNUNET_DISK_file_change_owner (pif, user); |
1045 | GNUNET_free_non_null (user); | 1045 | GNUNET_free (user); |
1046 | GNUNET_free (pif); | 1046 | GNUNET_free (pif); |
1047 | return GNUNET_OK; | 1047 | return GNUNET_OK; |
1048 | } | 1048 | } |
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc, | |||
1441 | /* shutdown */ | 1441 | /* shutdown */ |
1442 | if ((1 == do_daemonize) && (NULL != sctx.server)) | 1442 | if ((1 == do_daemonize) && (NULL != sctx.server)) |
1443 | pid_file_delete (&sctx); | 1443 | pid_file_delete (&sctx); |
1444 | GNUNET_free_non_null (sctx.my_handlers); | 1444 | GNUNET_free (sctx.my_handlers); |
1445 | 1445 | ||
1446 | shutdown: | 1446 | shutdown: |
1447 | if (-1 != sctx.ready_confirm_fd) | 1447 | if (-1 != sctx.ready_confirm_fd) |
@@ -1475,16 +1475,16 @@ shutdown: | |||
1475 | if (NULL != sctx.addrs) | 1475 | if (NULL != sctx.addrs) |
1476 | while (NULL != sctx.addrs[i]) | 1476 | while (NULL != sctx.addrs[i]) |
1477 | GNUNET_free_nz (sctx.addrs[i++]); | 1477 | GNUNET_free_nz (sctx.addrs[i++]); |
1478 | GNUNET_free_non_null (sctx.addrs); | 1478 | GNUNET_free (sctx.addrs); |
1479 | GNUNET_free_non_null (sctx.addrlens); | 1479 | GNUNET_free (sctx.addrlens); |
1480 | GNUNET_free_non_null (logfile); | 1480 | GNUNET_free (logfile); |
1481 | GNUNET_free_non_null (loglev); | 1481 | GNUNET_free (loglev); |
1482 | GNUNET_free (cfg_fn); | 1482 | GNUNET_free (cfg_fn); |
1483 | GNUNET_free_non_null (opt_cfg_fn); | 1483 | GNUNET_free (opt_cfg_fn); |
1484 | GNUNET_free_non_null (sctx.v4_denied); | 1484 | GNUNET_free (sctx.v4_denied); |
1485 | GNUNET_free_non_null (sctx.v6_denied); | 1485 | GNUNET_free (sctx.v6_denied); |
1486 | GNUNET_free_non_null (sctx.v4_allowed); | 1486 | GNUNET_free (sctx.v4_allowed); |
1487 | GNUNET_free_non_null (sctx.v6_allowed); | 1487 | GNUNET_free (sctx.v6_allowed); |
1488 | 1488 | ||
1489 | return err ? GNUNET_SYSERR : sctx.ret; | 1489 | return err ? GNUNET_SYSERR : sctx.ret; |
1490 | } | 1490 | } |
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1626 | } | 1626 | } |
1627 | if (NULL != sctx->server) | 1627 | if (NULL != sctx->server) |
1628 | GNUNET_SERVER_destroy (sctx->server); | 1628 | GNUNET_SERVER_destroy (sctx->server); |
1629 | GNUNET_free_non_null (sctx->my_handlers); | 1629 | GNUNET_free (sctx->my_handlers); |
1630 | if (NULL != sctx->addrs) | 1630 | if (NULL != sctx->addrs) |
1631 | { | 1631 | { |
1632 | i = 0; | 1632 | i = 0; |
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1634 | GNUNET_free_nz (sctx->addrs[i++]); | 1634 | GNUNET_free_nz (sctx->addrs[i++]); |
1635 | GNUNET_free (sctx->addrs); | 1635 | GNUNET_free (sctx->addrs); |
1636 | } | 1636 | } |
1637 | GNUNET_free_non_null (sctx->addrlens); | 1637 | GNUNET_free (sctx->addrlens); |
1638 | GNUNET_free_non_null (sctx->v4_denied); | 1638 | GNUNET_free (sctx->v4_denied); |
1639 | GNUNET_free_non_null (sctx->v6_denied); | 1639 | GNUNET_free (sctx->v6_denied); |
1640 | GNUNET_free_non_null (sctx->v4_allowed); | 1640 | GNUNET_free (sctx->v4_allowed); |
1641 | GNUNET_free_non_null (sctx->v6_allowed); | 1641 | GNUNET_free (sctx->v6_allowed); |
1642 | GNUNET_free (sctx); | 1642 | GNUNET_free (sctx); |
1643 | } | 1643 | } |
1644 | 1644 | ||
diff --git a/src/transport/test_http_common.c b/src/transport/test_http_common.c index 6e31ec85e..fe6e4faa3 100644 --- a/src/transport/test_http_common.c +++ b/src/transport/test_http_common.c | |||
@@ -32,9 +32,9 @@ clean (struct SplittedHTTPAddress *addr) | |||
32 | { | 32 | { |
33 | if (NULL == addr) | 33 | if (NULL == addr) |
34 | return; | 34 | return; |
35 | GNUNET_free_non_null (addr->host); | 35 | GNUNET_free (addr->host); |
36 | GNUNET_free_non_null (addr->path); | 36 | GNUNET_free (addr->path); |
37 | GNUNET_free_non_null (addr->protocol); | 37 | GNUNET_free (addr->protocol); |
38 | GNUNET_free (addr); | 38 | GNUNET_free (addr); |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/src/transport/test_plugin_hostkey.ecc b/src/transport/test_plugin_hostkey.ecc index 96c3e7e4e..18641b798 100644 --- a/src/transport/test_plugin_hostkey.ecc +++ b/src/transport/test_plugin_hostkey.ecc | |||
Binary files differ | |||
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 058d7d8bf..deb943956 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -93,10 +93,9 @@ get_size (unsigned int iter) | |||
93 | /* FreeBSD/OSX etc. Unix DGRAMs do not work | 93 | /* FreeBSD/OSX etc. Unix DGRAMs do not work |
94 | * with large messages */ | 94 | * with large messages */ |
95 | if (0 == strcmp ("unix", ccc->test_plugin)) | 95 | if (0 == strcmp ("unix", ccc->test_plugin)) |
96 | ret = sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 1024); | 96 | return sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 1024); |
97 | #endif | 97 | #endif |
98 | ret = sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 60000); | 98 | return sizeof(struct GNUNET_TRANSPORT_TESTING_TestMessage) + (ret % 60000); |
99 | return ret; | ||
100 | } | 99 | } |
101 | 100 | ||
102 | 101 | ||
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf index c8a5bf0d4..19bff8fcc 100644 --- a/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf +++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_full.conf | |||
@@ -9,8 +9,8 @@ TIMEOUT = 5 s | |||
9 | [transport] | 9 | [transport] |
10 | PLUGINS = tcp | 10 | PLUGINS = tcp |
11 | 11 | ||
12 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 12 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
13 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 13 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
14 | 14 | ||
15 | [transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG] | 15 | [transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730] |
16 | DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = | 16 | F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = |
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf index 30b82aebf..79bc90469 100644 --- a/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf +++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf | |||
@@ -3,11 +3,11 @@ | |||
3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/ | 3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/ |
4 | 4 | ||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp udp | 6 | PLUGINS = tcp unix |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG] | 11 | [transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730] |
12 | DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = tcp | 12 | F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = tcp |
13 | 13 | ||
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf index 12c11252e..b328dd5cf 100644 --- a/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf +++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_plugin.conf | |||
@@ -5,9 +5,9 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/ | |||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp | 6 | PLUGINS = tcp |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG] | 11 | [transport-blacklist-4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730] |
12 | DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 = tcp | 12 | F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 = tcp |
13 | 13 | ||
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf index 4b449bed8..862209d2c 100644 --- a/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf +++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_full.conf | |||
@@ -5,9 +5,8 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/ | |||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp | 6 | PLUGINS = tcp |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | |||
11 | [transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50] | ||
12 | 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = | ||
13 | 10 | ||
11 | [transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0] | ||
12 | 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 = | ||
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf index 690eb3b76..3134f9d81 100644 --- a/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf +++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf | |||
@@ -3,10 +3,10 @@ | |||
3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/ | 3 | GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/ |
4 | 4 | ||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp udp | 6 | PLUGINS = tcp unix |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50] | 11 | [transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0] |
12 | 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = tcp | 12 | 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 = tcp |
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf index 00d3343e8..dd582125d 100644 --- a/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf +++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_plugin.conf | |||
@@ -5,8 +5,8 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/ | |||
5 | [transport] | 5 | [transport] |
6 | PLUGINS = tcp | 6 | PLUGINS = tcp |
7 | 7 | ||
8 | #Peer 1: 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG | 8 | #Peer 1: 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 |
9 | #Peer 2: DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50 | 9 | #Peer 2: F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0 |
10 | 10 | ||
11 | [transport-blacklist-DK5WZKKDHH06BH1H0DE0Z8CPBTG9AD8P85SF02WW3285AT3V0V50] | 11 | [transport-blacklist-F7B5NX6KCPG8SAKYSGV0E94Y5NXR9JE3HCGQ5YGH1H04WFQWMWT0] |
12 | 6YNBKM6TTK64FAG9DF0292AW5JA9CCAC04JTY0HF8XHP635HPBBG = tcp | 12 | 4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730 = tcp |
diff --git a/src/transport/transport-testing-main.c b/src/transport/transport-testing-main.c index 8c35ff252..20c58eeee 100644 --- a/src/transport/transport-testing-main.c +++ b/src/transport/transport-testing-main.c | |||
@@ -604,7 +604,7 @@ GNUNET_TRANSPORT_TESTING_main_ (const char *argv0, | |||
604 | for (unsigned int i = 0; i < num_peers; i++) | 604 | for (unsigned int i = 0; i < num_peers; i++) |
605 | GNUNET_free (cfg_names[i]); | 605 | GNUNET_free (cfg_names[i]); |
606 | GNUNET_free (test_source); | 606 | GNUNET_free (test_source); |
607 | GNUNET_free_non_null (test_plugin); | 607 | GNUNET_free (test_plugin); |
608 | GNUNET_free (test_name); | 608 | GNUNET_free (test_name); |
609 | return ret; | 609 | return ret; |
610 | } | 610 | } |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 06dbe891a..2da193b31 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -349,7 +349,7 @@ get_hello (void *cb_cls, | |||
349 | GNUNET_assert (0 == memcmp (&hello_id, | 349 | GNUNET_assert (0 == memcmp (&hello_id, |
350 | &p->id, | 350 | &p->id, |
351 | sizeof(hello_id))); | 351 | sizeof(hello_id))); |
352 | GNUNET_free_non_null (p->hello); | 352 | GNUNET_free (p->hello); |
353 | p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message); | 353 | p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message); |
354 | 354 | ||
355 | if (NULL != p->start_cb) | 355 | if (NULL != p->start_cb) |
@@ -460,10 +460,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct | |||
460 | cfgname, | 460 | cfgname, |
461 | emsg); | 461 | emsg); |
462 | GNUNET_TRANSPORT_TESTING_stop_peer (p); | 462 | GNUNET_TRANSPORT_TESTING_stop_peer (p); |
463 | GNUNET_free_non_null (emsg); | 463 | GNUNET_free (emsg); |
464 | return NULL; | 464 | return NULL; |
465 | } | 465 | } |
466 | GNUNET_free_non_null (emsg); | 466 | GNUNET_free (emsg); |
467 | if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer)) | 467 | if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer)) |
468 | { | 468 | { |
469 | LOG (GNUNET_ERROR_TYPE_ERROR, | 469 | LOG (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c index cbe1159f3..10b064241 100644 --- a/src/transport/transport-testing2.c +++ b/src/transport/transport-testing2.c | |||
@@ -970,6 +970,7 @@ shutdown_nat (void *cls) | |||
970 | shutdown_process (proc); | 970 | shutdown_process (proc); |
971 | } | 971 | } |
972 | 972 | ||
973 | |||
973 | /** | 974 | /** |
974 | * @brief Task run at shutdown to kill the resolver process | 975 | * @brief Task run at shutdown to kill the resolver process |
975 | * | 976 | * |
@@ -982,6 +983,7 @@ shutdown_resolver (void *cls) | |||
982 | shutdown_process (proc); | 983 | shutdown_process (proc); |
983 | } | 984 | } |
984 | 985 | ||
986 | |||
985 | static void | 987 | static void |
986 | resolver_start (struct | 988 | resolver_start (struct |
987 | GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h) | 989 | GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h) |
@@ -990,16 +992,17 @@ resolver_start (struct | |||
990 | 992 | ||
991 | LOG (GNUNET_ERROR_TYPE_DEBUG, "resolver_start\n"); | 993 | LOG (GNUNET_ERROR_TYPE_DEBUG, "resolver_start\n"); |
992 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 994 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
993 | tc_h->resolver_proc = GNUNET_OS_start_process (GNUNET_YES, | 995 | tc_h->resolver_proc = GNUNET_OS_start_process ( |
994 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 996 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
995 | NULL, | 997 | | GNUNET_OS_USE_PIPE_CONTROL, |
996 | NULL, | 998 | NULL, |
997 | NULL, | 999 | NULL, |
998 | binary, | 1000 | NULL, |
999 | "gnunet-service-resolver", | 1001 | binary, |
1000 | "-c", | 1002 | "gnunet-service-resolver", |
1001 | tc_h->cfg_filename, | 1003 | "-c", |
1002 | NULL); | 1004 | tc_h->cfg_filename, |
1005 | NULL); | ||
1003 | if (NULL == tc_h->resolver_proc) | 1006 | if (NULL == tc_h->resolver_proc) |
1004 | { | 1007 | { |
1005 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start resolver service!"); | 1008 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start resolver service!"); |
@@ -1054,8 +1057,8 @@ nat_start ( | |||
1054 | 1057 | ||
1055 | LOG (GNUNET_ERROR_TYPE_DEBUG, "nat_start\n"); | 1058 | LOG (GNUNET_ERROR_TYPE_DEBUG, "nat_start\n"); |
1056 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-nat"); | 1059 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-nat"); |
1057 | tc_h->nat_proc = GNUNET_OS_start_process (GNUNET_YES, | 1060 | tc_h->nat_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
1058 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 1061 | | GNUNET_OS_USE_PIPE_CONTROL, |
1059 | NULL, | 1062 | NULL, |
1060 | NULL, | 1063 | NULL, |
1061 | NULL, | 1064 | NULL, |
@@ -1073,6 +1076,7 @@ nat_start ( | |||
1073 | GNUNET_free (binary); | 1076 | GNUNET_free (binary); |
1074 | } | 1077 | } |
1075 | 1078 | ||
1079 | |||
1076 | /** | 1080 | /** |
1077 | * @brief Start communicator part of transport service and communicator | 1081 | * @brief Start communicator part of transport service and communicator |
1078 | * | 1082 | * |
diff --git a/src/transport/transport.h b/src/transport/transport.h index a64ffd5c6..dbae4ecfb 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -903,7 +903,6 @@ struct GNUNET_TRANSPORT_UpdateQueueMessage | |||
903 | }; | 903 | }; |
904 | 904 | ||
905 | 905 | ||
906 | |||
907 | /** | 906 | /** |
908 | * Remove queue, it is no longer available. | 907 | * Remove queue, it is no longer available. |
909 | */ | 908 | */ |
diff --git a/src/transport/transport_api2_communication.c b/src/transport/transport_api2_communication.c index cfa144415..d1e28cc36 100644 --- a/src/transport/transport_api2_communication.c +++ b/src/transport/transport_api2_communication.c | |||
@@ -420,6 +420,7 @@ send_add_queue (struct GNUNET_TRANSPORT_QueueHandle *qh) | |||
420 | GNUNET_MQ_send (qh->ch->mq, env); | 420 | GNUNET_MQ_send (qh->ch->mq, env); |
421 | } | 421 | } |
422 | 422 | ||
423 | |||
423 | /** | 424 | /** |
424 | * Send message to the transport service about queue @a qh | 425 | * Send message to the transport service about queue @a qh |
425 | * updated. | 426 | * updated. |
@@ -446,7 +447,6 @@ send_update_queue (struct GNUNET_TRANSPORT_QueueHandle *qh) | |||
446 | } | 447 | } |
447 | 448 | ||
448 | 449 | ||
449 | |||
450 | /** | 450 | /** |
451 | * Send message to the transport service about queue @a qh | 451 | * Send message to the transport service about queue @a qh |
452 | * being no longer available. | 452 | * being no longer available. |
@@ -1033,7 +1033,6 @@ GNUNET_TRANSPORT_communicator_mq_update ( | |||
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | 1035 | ||
1036 | |||
1037 | /** | 1036 | /** |
1038 | * Notify transport service that an MQ became unavailable due to a | 1037 | * Notify transport service that an MQ became unavailable due to a |
1039 | * disconnect or timeout. | 1038 | * disconnect or timeout. |
diff --git a/src/transport/transport_api2_core.c b/src/transport/transport_api2_core.c index cd8bacf3d..002af81fc 100644 --- a/src/transport/transport_api2_core.c +++ b/src/transport/transport_api2_core.c | |||
@@ -762,7 +762,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
762 | reconnect (h); | 762 | reconnect (h); |
763 | if (NULL == h->mq) | 763 | if (NULL == h->mq) |
764 | { | 764 | { |
765 | GNUNET_free_non_null (h->handlers); | 765 | GNUNET_free (h->handlers); |
766 | GNUNET_free (h); | 766 | GNUNET_free (h); |
767 | return NULL; | 767 | return NULL; |
768 | } | 768 | } |
@@ -792,7 +792,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle) | |||
792 | } | 792 | } |
793 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); | 793 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); |
794 | handle->neighbours = NULL; | 794 | handle->neighbours = NULL; |
795 | GNUNET_free_non_null (handle->handlers); | 795 | GNUNET_free (handle->handlers); |
796 | handle->handlers = NULL; | 796 | handle->handlers = NULL; |
797 | GNUNET_free (handle); | 797 | GNUNET_free (handle); |
798 | } | 798 | } |
diff --git a/src/transport/transport_api_core.c b/src/transport/transport_api_core.c index 5d841fa10..7d4b415bd 100644 --- a/src/transport/transport_api_core.c +++ b/src/transport/transport_api_core.c | |||
@@ -622,13 +622,14 @@ handle_send_ok (void *cls, const struct SendOkMessage *okm) | |||
622 | struct Neighbour *n; | 622 | struct Neighbour *n; |
623 | uint32_t bytes_msg; | 623 | uint32_t bytes_msg; |
624 | uint32_t bytes_physical; | 624 | uint32_t bytes_physical; |
625 | uint16_t success = ntohs (okm->success); | ||
625 | 626 | ||
626 | bytes_msg = ntohl (okm->bytes_msg); | 627 | bytes_msg = ntohs (okm->bytes_msg); |
627 | bytes_physical = ntohl (okm->bytes_physical); | 628 | bytes_physical = ntohl (okm->bytes_physical); |
628 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 629 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
629 | "Receiving SEND_OK message, transmission to %s %s.\n", | 630 | "Receiving SEND_OK message, transmission to %s %s.\n", |
630 | GNUNET_i2s (&okm->peer), | 631 | GNUNET_i2s (&okm->peer), |
631 | ntohl (okm->success) == GNUNET_OK ? "succeeded" : "failed"); | 632 | success == GNUNET_OK ? "succeeded" : "failed"); |
632 | n = neighbour_find (h, &okm->peer); | 633 | n = neighbour_find (h, &okm->peer); |
633 | if (NULL == n) | 634 | if (NULL == n) |
634 | { | 635 | { |
@@ -891,7 +892,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
891 | reconnect (h); | 892 | reconnect (h); |
892 | if (NULL == h->mq) | 893 | if (NULL == h->mq) |
893 | { | 894 | { |
894 | GNUNET_free_non_null (h->handlers); | 895 | GNUNET_free (h->handlers); |
895 | GNUNET_free (h); | 896 | GNUNET_free (h); |
896 | return NULL; | 897 | return NULL; |
897 | } | 898 | } |
@@ -922,7 +923,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle) | |||
922 | } | 923 | } |
923 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); | 924 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); |
924 | handle->neighbours = NULL; | 925 | handle->neighbours = NULL; |
925 | GNUNET_free_non_null (handle->handlers); | 926 | GNUNET_free (handle->handlers); |
926 | handle->handlers = NULL; | 927 | handle->handlers = NULL; |
927 | GNUNET_free (handle); | 928 | GNUNET_free (handle); |
928 | } | 929 | } |
diff --git a/src/util/bio.c b/src/util/bio.c index ce15f073b..39050bb87 100644 --- a/src/util/bio.c +++ b/src/util/bio.c | |||
@@ -171,7 +171,7 @@ GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) | |||
171 | if (NULL != emsg) | 171 | if (NULL != emsg) |
172 | *emsg = h->emsg; | 172 | *emsg = h->emsg; |
173 | else | 173 | else |
174 | GNUNET_free_non_null (h->emsg); | 174 | GNUNET_free (h->emsg); |
175 | switch (h->type) | 175 | switch (h->type) |
176 | { | 176 | { |
177 | case IO_FILE: | 177 | case IO_FILE: |
@@ -260,7 +260,7 @@ read_from_buffer (struct GNUNET_BIO_ReadHandle *h, | |||
260 | char *result, | 260 | char *result, |
261 | size_t len) | 261 | size_t len) |
262 | { | 262 | { |
263 | if (h->size < len || h->size - h->pos < len) | 263 | if ((h->size < len) || (h->size - h->pos < len)) |
264 | { | 264 | { |
265 | GNUNET_asprintf (&h->emsg, | 265 | GNUNET_asprintf (&h->emsg, |
266 | _ ("Error while reading `%s' from buffer: %s"), | 266 | _ ("Error while reading `%s' from buffer: %s"), |
@@ -345,7 +345,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, | |||
345 | GNUNET_asprintf (&h->emsg, | 345 | GNUNET_asprintf (&h->emsg, |
346 | _ ("Error reading length of string `%s'"), | 346 | _ ("Error reading length of string `%s'"), |
347 | what); | 347 | what); |
348 | GNUNET_free_non_null (tmp); | 348 | GNUNET_free (tmp); |
349 | return GNUNET_SYSERR; | 349 | return GNUNET_SYSERR; |
350 | } | 350 | } |
351 | if (0 == big) | 351 | if (0 == big) |
@@ -431,6 +431,7 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, | |||
431 | return GNUNET_OK; | 431 | return GNUNET_OK; |
432 | } | 432 | } |
433 | 433 | ||
434 | |||
434 | /** | 435 | /** |
435 | * Read a float. | 436 | * Read a float. |
436 | * | 437 | * |
@@ -439,9 +440,9 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, | |||
439 | * @param f address of float to read | 440 | * @param f address of float to read |
440 | */ | 441 | */ |
441 | int | 442 | int |
442 | GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, | 443 | GNUNET_BIO_read_float (struct GNUNET_BIO_ReadHandle *h, |
443 | const char *what, | 444 | const char *what, |
444 | float *f) | 445 | float *f) |
445 | { | 446 | { |
446 | int32_t *i = (int32_t *) f; | 447 | int32_t *i = (int32_t *) f; |
447 | return GNUNET_BIO_read_int32 (h, what, i); | 448 | return GNUNET_BIO_read_int32 (h, what, i); |
@@ -456,9 +457,9 @@ GNUNET_BIO_read_float(struct GNUNET_BIO_ReadHandle *h, | |||
456 | * @param f address of double to read | 457 | * @param f address of double to read |
457 | */ | 458 | */ |
458 | int | 459 | int |
459 | GNUNET_BIO_read_double(struct GNUNET_BIO_ReadHandle *h, | 460 | GNUNET_BIO_read_double (struct GNUNET_BIO_ReadHandle *h, |
460 | const char *what, | 461 | const char *what, |
461 | double *f) | 462 | double *f) |
462 | { | 463 | { |
463 | int64_t *i = (int64_t *) f; | 464 | int64_t *i = (int64_t *) f; |
464 | return GNUNET_BIO_read_int64 (h, what, i); | 465 | return GNUNET_BIO_read_int64 (h, what, i); |
@@ -612,7 +613,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg) | |||
612 | if (NULL != emsg) | 613 | if (NULL != emsg) |
613 | *emsg = h->emsg; | 614 | *emsg = h->emsg; |
614 | else | 615 | else |
615 | GNUNET_free_non_null (h->emsg); | 616 | GNUNET_free (h->emsg); |
616 | switch (h->type) | 617 | switch (h->type) |
617 | { | 618 | { |
618 | case IO_FILE: | 619 | case IO_FILE: |
@@ -623,7 +624,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg) | |||
623 | if (NULL != emsg) | 624 | if (NULL != emsg) |
624 | *emsg = h->emsg; | 625 | *emsg = h->emsg; |
625 | else | 626 | else |
626 | GNUNET_free_non_null (h->emsg); | 627 | GNUNET_free (h->emsg); |
627 | err = GNUNET_SYSERR; | 628 | err = GNUNET_SYSERR; |
628 | } | 629 | } |
629 | else | 630 | else |
@@ -663,7 +664,7 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h) | |||
663 | { | 664 | { |
664 | GNUNET_DISK_file_close (h->fd); | 665 | GNUNET_DISK_file_close (h->fd); |
665 | h->fd = NULL; | 666 | h->fd = NULL; |
666 | GNUNET_free_non_null (h->emsg); | 667 | GNUNET_free (h->emsg); |
667 | GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file")); | 668 | GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file")); |
668 | return GNUNET_SYSERR; | 669 | return GNUNET_SYSERR; |
669 | } | 670 | } |
@@ -692,13 +693,13 @@ GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h, | |||
692 | { | 693 | { |
693 | if (IO_BUFFER != h->type) | 694 | if (IO_BUFFER != h->type) |
694 | return GNUNET_SYSERR; | 695 | return GNUNET_SYSERR; |
695 | if (NULL == contents || NULL == size) | 696 | if ((NULL == contents) || (NULL == size)) |
696 | return GNUNET_SYSERR; | 697 | return GNUNET_SYSERR; |
697 | int ret = (NULL != h->emsg) ? GNUNET_SYSERR : GNUNET_OK; | 698 | int ret = (NULL != h->emsg) ? GNUNET_SYSERR : GNUNET_OK; |
698 | if (NULL != emsg) | 699 | if (NULL != emsg) |
699 | *emsg = h->emsg; | 700 | *emsg = h->emsg; |
700 | else | 701 | else |
701 | GNUNET_free_non_null (h->emsg); | 702 | GNUNET_free (h->emsg); |
702 | *contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size); | 703 | *contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size); |
703 | return ret; | 704 | return ret; |
704 | } | 705 | } |
@@ -750,7 +751,7 @@ write_to_file (struct GNUNET_BIO_WriteHandle *h, | |||
750 | _ ("Error while writing `%s' to file: %s"), | 751 | _ ("Error while writing `%s' to file: %s"), |
751 | what, | 752 | what, |
752 | tmp); | 753 | tmp); |
753 | GNUNET_free_non_null (tmp); | 754 | GNUNET_free (tmp); |
754 | return GNUNET_SYSERR; | 755 | return GNUNET_SYSERR; |
755 | } | 756 | } |
756 | } | 757 | } |
@@ -870,7 +871,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, | |||
870 | if (-1 == size) | 871 | if (-1 == size) |
871 | { | 872 | { |
872 | GNUNET_free (buf); | 873 | GNUNET_free (buf); |
873 | GNUNET_free_non_null (h->emsg); | 874 | GNUNET_free (h->emsg); |
874 | GNUNET_asprintf (&h->emsg, | 875 | GNUNET_asprintf (&h->emsg, |
875 | _ ("Failed to serialize metadata `%s'"), | 876 | _ ("Failed to serialize metadata `%s'"), |
876 | what); | 877 | what); |
@@ -897,9 +898,9 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, | |||
897 | * @param f float to write | 898 | * @param f float to write |
898 | */ | 899 | */ |
899 | int | 900 | int |
900 | GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, | 901 | GNUNET_BIO_write_float (struct GNUNET_BIO_WriteHandle *h, |
901 | const char *what, | 902 | const char *what, |
902 | float f) | 903 | float f) |
903 | { | 904 | { |
904 | int32_t i = f; | 905 | int32_t i = f; |
905 | return GNUNET_BIO_write_int32 (h, what, i); | 906 | return GNUNET_BIO_write_int32 (h, what, i); |
@@ -914,9 +915,9 @@ GNUNET_BIO_write_float(struct GNUNET_BIO_WriteHandle *h, | |||
914 | * @param f double to write | 915 | * @param f double to write |
915 | */ | 916 | */ |
916 | int | 917 | int |
917 | GNUNET_BIO_write_double(struct GNUNET_BIO_WriteHandle *h, | 918 | GNUNET_BIO_write_double (struct GNUNET_BIO_WriteHandle *h, |
918 | const char *what, | 919 | const char *what, |
919 | double f) | 920 | double f) |
920 | { | 921 | { |
921 | int64_t i = f; | 922 | int64_t i = f; |
922 | return GNUNET_BIO_write_int64 (h, what, i); | 923 | return GNUNET_BIO_write_int64 (h, what, i); |
@@ -1196,7 +1197,7 @@ GNUNET_BIO_read_spec_int64 (const char *what, | |||
1196 | * @param f address of float to read | 1197 | * @param f address of float to read |
1197 | */ | 1198 | */ |
1198 | struct GNUNET_BIO_ReadSpec | 1199 | struct GNUNET_BIO_ReadSpec |
1199 | GNUNET_BIO_read_spec_float(const char *what, float *f) | 1200 | GNUNET_BIO_read_spec_float (const char *what, float *f) |
1200 | { | 1201 | { |
1201 | struct GNUNET_BIO_ReadSpec rs = { | 1202 | struct GNUNET_BIO_ReadSpec rs = { |
1202 | .rh = &read_spec_handler_int32, | 1203 | .rh = &read_spec_handler_int32, |
@@ -1216,7 +1217,7 @@ GNUNET_BIO_read_spec_float(const char *what, float *f) | |||
1216 | * @param f address of double to read | 1217 | * @param f address of double to read |
1217 | */ | 1218 | */ |
1218 | struct GNUNET_BIO_ReadSpec | 1219 | struct GNUNET_BIO_ReadSpec |
1219 | GNUNET_BIO_read_spec_double(const char *what, double *f) | 1220 | GNUNET_BIO_read_spec_double (const char *what, double *f) |
1220 | { | 1221 | { |
1221 | struct GNUNET_BIO_ReadSpec rs = { | 1222 | struct GNUNET_BIO_ReadSpec rs = { |
1222 | .rh = &read_spec_handler_int64, | 1223 | .rh = &read_spec_handler_int64, |
@@ -1243,7 +1244,7 @@ GNUNET_BIO_read_spec_commit (struct GNUNET_BIO_ReadHandle *h, | |||
1243 | { | 1244 | { |
1244 | int ret = GNUNET_OK; | 1245 | int ret = GNUNET_OK; |
1245 | 1246 | ||
1246 | for (size_t i=0; NULL!=rs[i].rh; ++i) | 1247 | for (size_t i = 0; NULL!=rs[i].rh; ++i) |
1247 | { | 1248 | { |
1248 | ret = rs[i].rh (rs[i].cls, h, rs[i].what, rs[i].target, rs[i].size); | 1249 | ret = rs[i].rh (rs[i].cls, h, rs[i].what, rs[i].target, rs[i].size); |
1249 | if (GNUNET_OK != ret) | 1250 | if (GNUNET_OK != ret) |
@@ -1490,7 +1491,7 @@ GNUNET_BIO_write_spec_int64 (const char *what, | |||
1490 | * @return the write spec | 1491 | * @return the write spec |
1491 | */ | 1492 | */ |
1492 | struct GNUNET_BIO_WriteSpec | 1493 | struct GNUNET_BIO_WriteSpec |
1493 | GNUNET_BIO_write_spec_float(const char *what, float *f) | 1494 | GNUNET_BIO_write_spec_float (const char *what, float *f) |
1494 | { | 1495 | { |
1495 | struct GNUNET_BIO_WriteSpec ws = { | 1496 | struct GNUNET_BIO_WriteSpec ws = { |
1496 | .wh = &write_spec_handler_int32, | 1497 | .wh = &write_spec_handler_int32, |
@@ -1512,7 +1513,7 @@ GNUNET_BIO_write_spec_float(const char *what, float *f) | |||
1512 | * @return the write spec | 1513 | * @return the write spec |
1513 | */ | 1514 | */ |
1514 | struct GNUNET_BIO_WriteSpec | 1515 | struct GNUNET_BIO_WriteSpec |
1515 | GNUNET_BIO_write_spec_double(const char *what, double *f) | 1516 | GNUNET_BIO_write_spec_double (const char *what, double *f) |
1516 | { | 1517 | { |
1517 | struct GNUNET_BIO_WriteSpec ws = { | 1518 | struct GNUNET_BIO_WriteSpec ws = { |
1518 | .wh = &write_spec_handler_int64, | 1519 | .wh = &write_spec_handler_int64, |
@@ -1540,7 +1541,7 @@ GNUNET_BIO_write_spec_commit (struct GNUNET_BIO_WriteHandle *h, | |||
1540 | { | 1541 | { |
1541 | int ret = GNUNET_OK; | 1542 | int ret = GNUNET_OK; |
1542 | 1543 | ||
1543 | for (size_t i=0; NULL!=ws[i].wh; ++i) | 1544 | for (size_t i = 0; NULL!=ws[i].wh; ++i) |
1544 | { | 1545 | { |
1545 | ret = ws[i].wh (ws[i].cls, h, ws[i].what, ws[i].source, ws[i].source_size); | 1546 | ret = ws[i].wh (ws[i].cls, h, ws[i].what, ws[i].source, ws[i].source_size); |
1546 | if (GNUNET_OK != ret) | 1547 | if (GNUNET_OK != ret) |
diff --git a/src/util/buffer.c b/src/util/buffer.c index c865f6307..d0261889e 100644 --- a/src/util/buffer.c +++ b/src/util/buffer.c | |||
@@ -162,7 +162,7 @@ GNUNET_buffer_reap (struct GNUNET_Buffer *buf, size_t *size) | |||
162 | void | 162 | void |
163 | GNUNET_buffer_clear (struct GNUNET_Buffer *buf) | 163 | GNUNET_buffer_clear (struct GNUNET_Buffer *buf) |
164 | { | 164 | { |
165 | GNUNET_free_non_null (buf->mem); | 165 | GNUNET_free (buf->mem); |
166 | memset (buf, 0, sizeof (struct GNUNET_Buffer)); | 166 | memset (buf, 0, sizeof (struct GNUNET_Buffer)); |
167 | } | 167 | } |
168 | 168 | ||
diff --git a/src/util/client.c b/src/util/client.c index a7b1a2a0f..86dabe664 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -422,7 +422,7 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq, | |||
422 | } | 422 | } |
423 | cancel_aps (cstate); | 423 | cancel_aps (cstate); |
424 | GNUNET_free (cstate->service_name); | 424 | GNUNET_free (cstate->service_name); |
425 | GNUNET_free_non_null (cstate->hostname); | 425 | GNUNET_free (cstate->hostname); |
426 | GNUNET_MST_destroy (cstate->mst); | 426 | GNUNET_MST_destroy (cstate->mst); |
427 | GNUNET_free (cstate); | 427 | GNUNET_free (cstate); |
428 | } | 428 | } |
@@ -563,7 +563,7 @@ try_unixpath (const char *service_name, | |||
563 | if (NULL != sock) | 563 | if (NULL != sock) |
564 | GNUNET_NETWORK_socket_close (sock); | 564 | GNUNET_NETWORK_socket_close (sock); |
565 | } | 565 | } |
566 | GNUNET_free_non_null (unixpath); | 566 | GNUNET_free (unixpath); |
567 | #endif | 567 | #endif |
568 | return NULL; | 568 | return NULL; |
569 | } | 569 | } |
@@ -747,7 +747,7 @@ test_service_configuration (const char *service_name, | |||
747 | _ ("not a valid filename")); | 747 | _ ("not a valid filename")); |
748 | return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */ | 748 | return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */ |
749 | } | 749 | } |
750 | GNUNET_free_non_null (unixpath); | 750 | GNUNET_free (unixpath); |
751 | #endif | 751 | #endif |
752 | 752 | ||
753 | if ((GNUNET_YES == | 753 | if ((GNUNET_YES == |
@@ -768,7 +768,7 @@ test_service_configuration (const char *service_name, | |||
768 | &hostname)) && | 768 | &hostname)) && |
769 | (0 != strlen (hostname))) | 769 | (0 != strlen (hostname))) |
770 | ret = GNUNET_OK; | 770 | ret = GNUNET_OK; |
771 | GNUNET_free_non_null (hostname); | 771 | GNUNET_free (hostname); |
772 | return ret; | 772 | return ret; |
773 | } | 773 | } |
774 | 774 | ||
@@ -1043,7 +1043,7 @@ GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1043 | /* service running remotely */ | 1043 | /* service running remotely */ |
1044 | ret = GNUNET_OK; | 1044 | ret = GNUNET_OK; |
1045 | } | 1045 | } |
1046 | GNUNET_free_non_null (hostname); | 1046 | GNUNET_free (hostname); |
1047 | return ret; | 1047 | return ret; |
1048 | } | 1048 | } |
1049 | 1049 | ||
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index fd91e23b2..4aad49777 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -323,13 +323,12 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber) | |||
323 | * want to keep track of allocations. | 323 | * want to keep track of allocations. |
324 | * | 324 | * |
325 | * @param ptr the pointer to free | 325 | * @param ptr the pointer to free |
326 | * @param filename where in the code was the call to GNUNET_free | 326 | * @param filename where in the code was the call to GNUNET_free() |
327 | * @param linenumber where in the code was the call to GNUNET_free | 327 | * @param linenumber where in the code was the call to GNUNET_free() |
328 | */ | 328 | */ |
329 | void | 329 | void |
330 | GNUNET_xfree_ (void *ptr, const char *filename, int linenumber) | 330 | GNUNET_xfree_ (void *ptr, const char *filename, int linenumber) |
331 | { | 331 | { |
332 | GNUNET_assert_at (NULL != ptr, filename, linenumber); | ||
333 | #ifdef W32_MEM_LIMIT | 332 | #ifdef W32_MEM_LIMIT |
334 | ptr = &((size_t *) ptr)[-1]; | 333 | ptr = &((size_t *) ptr)[-1]; |
335 | mem_used -= *((size_t *) ptr); | 334 | mem_used -= *((size_t *) ptr); |
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 3894cdda1..b30175543 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -715,9 +715,9 @@ GNUNET_log_setup (const char *comp, | |||
715 | #if ! defined(GNUNET_CULL_LOGGING) | 715 | #if ! defined(GNUNET_CULL_LOGGING) |
716 | parse_all_definitions (); | 716 | parse_all_definitions (); |
717 | #endif | 717 | #endif |
718 | GNUNET_free_non_null (component); | 718 | GNUNET_free (component); |
719 | GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); | 719 | GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); |
720 | GNUNET_free_non_null (component_nopid); | 720 | GNUNET_free (component_nopid); |
721 | component_nopid = GNUNET_strdup (comp); | 721 | component_nopid = GNUNET_strdup (comp); |
722 | 722 | ||
723 | env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); | 723 | env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); |
@@ -725,7 +725,7 @@ GNUNET_log_setup (const char *comp, | |||
725 | logfile = env_logfile; | 725 | logfile = env_logfile; |
726 | if (NULL == logfile) | 726 | if (NULL == logfile) |
727 | return GNUNET_OK; | 727 | return GNUNET_OK; |
728 | GNUNET_free_non_null (log_file_name); | 728 | GNUNET_free (log_file_name); |
729 | log_file_name = GNUNET_STRINGS_filename_expand (logfile); | 729 | log_file_name = GNUNET_STRINGS_filename_expand (logfile); |
730 | if (NULL == log_file_name) | 730 | if (NULL == log_file_name) |
731 | return GNUNET_SYSERR; | 731 | return GNUNET_SYSERR; |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 7ed87cc1e..26beacaff 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -286,7 +286,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
286 | line_orig = NULL; | 286 | line_orig = NULL; |
287 | while (r_bytes < size) | 287 | while (r_bytes < size) |
288 | { | 288 | { |
289 | GNUNET_free_non_null (line_orig); | 289 | GNUNET_free (line_orig); |
290 | /* fgets-like behaviour on buffer */ | 290 | /* fgets-like behaviour on buffer */ |
291 | to_read = size - r_bytes; | 291 | to_read = size - r_bytes; |
292 | pos = memchr (&mem[r_bytes], '\n', to_read); | 292 | pos = memchr (&mem[r_bytes], '\n', to_read); |
@@ -404,7 +404,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
404 | ret = GNUNET_SYSERR; | 404 | ret = GNUNET_SYSERR; |
405 | break; | 405 | break; |
406 | } | 406 | } |
407 | GNUNET_free_non_null (line_orig); | 407 | GNUNET_free (line_orig); |
408 | GNUNET_free (section); | 408 | GNUNET_free (section); |
409 | GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size)); | 409 | GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size)); |
410 | return ret; | 410 | return ret; |
@@ -734,7 +734,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
734 | { | 734 | { |
735 | spos->entries = ent->next; | 735 | spos->entries = ent->next; |
736 | GNUNET_free (ent->key); | 736 | GNUNET_free (ent->key); |
737 | GNUNET_free_non_null (ent->val); | 737 | GNUNET_free (ent->val); |
738 | GNUNET_free (ent); | 738 | GNUNET_free (ent); |
739 | cfg->dirty = GNUNET_YES; | 739 | cfg->dirty = GNUNET_YES; |
740 | } | 740 | } |
@@ -926,13 +926,13 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
926 | { | 926 | { |
927 | if (NULL == value) | 927 | if (NULL == value) |
928 | { | 928 | { |
929 | GNUNET_free_non_null (e->val); | 929 | GNUNET_free (e->val); |
930 | e->val = NULL; | 930 | e->val = NULL; |
931 | } | 931 | } |
932 | else | 932 | else |
933 | { | 933 | { |
934 | nv = GNUNET_strdup (value); | 934 | nv = GNUNET_strdup (value); |
935 | GNUNET_free_non_null (e->val); | 935 | GNUNET_free (e->val); |
936 | e->val = nv; | 936 | e->val = nv; |
937 | } | 937 | } |
938 | return; | 938 | return; |
@@ -1383,7 +1383,7 @@ expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1383 | result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1); | 1383 | result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1); |
1384 | strcpy (result, prefix); | 1384 | strcpy (result, prefix); |
1385 | strcat (result, post); | 1385 | strcat (result, post); |
1386 | GNUNET_free_non_null (def); | 1386 | GNUNET_free (def); |
1387 | GNUNET_free (prefix); | 1387 | GNUNET_free (prefix); |
1388 | GNUNET_free (orig); | 1388 | GNUNET_free (orig); |
1389 | return result; | 1389 | return result; |
@@ -1810,4 +1810,45 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1810 | } | 1810 | } |
1811 | 1811 | ||
1812 | 1812 | ||
1813 | /** | ||
1814 | * Return GNUnet's default configuration. A new configuration is allocated | ||
1815 | * each time and it's up to the caller to destroy it when done. This function | ||
1816 | * returns GNUnet's configuration even when #GNUNET_OS_init has been called | ||
1817 | * with a value different from #GNUNET_OS_project_data_default. | ||
1818 | * | ||
1819 | * @return a freshly allocated configuration | ||
1820 | */ | ||
1821 | struct GNUNET_CONFIGURATION_Handle * | ||
1822 | GNUNET_CONFIGURATION_default (void) | ||
1823 | { | ||
1824 | const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get (); | ||
1825 | const struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default (); | ||
1826 | |||
1827 | GNUNET_OS_init (dpd); | ||
1828 | |||
1829 | struct GNUNET_CONFIGURATION_Handle *cfg = GNUNET_CONFIGURATION_create (); | ||
1830 | const char *xdg = getenv ("XDG_CONFIG_HOME"); | ||
1831 | char *cfgname = NULL; | ||
1832 | |||
1833 | if (NULL != xdg) | ||
1834 | GNUNET_asprintf (&cfgname, "%s/%s", xdg, pd->config_file); | ||
1835 | else | ||
1836 | cfgname = GNUNET_strdup (pd->user_config_file); | ||
1837 | |||
1838 | if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, cfgname)) | ||
1839 | { | ||
1840 | GNUNET_OS_init (pd); | ||
1841 | GNUNET_CONFIGURATION_destroy (cfg); | ||
1842 | GNUNET_free (cfgname); | ||
1843 | return NULL; | ||
1844 | } | ||
1845 | |||
1846 | GNUNET_free (cfgname); | ||
1847 | |||
1848 | GNUNET_OS_init (pd); | ||
1849 | |||
1850 | return cfg; | ||
1851 | } | ||
1852 | |||
1853 | |||
1813 | /* end of configuration.c */ | 1854 | /* end of configuration.c */ |
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c index eca651862..d7460043d 100644 --- a/src/util/container_bloomfilter.c +++ b/src/util/container_bloomfilter.c | |||
@@ -707,7 +707,7 @@ GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf) | |||
707 | return; | 707 | return; |
708 | if (bf->fh != NULL) | 708 | if (bf->fh != NULL) |
709 | GNUNET_DISK_file_close (bf->fh); | 709 | GNUNET_DISK_file_close (bf->fh); |
710 | GNUNET_free_non_null (bf->filename); | 710 | GNUNET_free (bf->filename); |
711 | GNUNET_free (bf->bitArray); | 711 | GNUNET_free (bf->bitArray); |
712 | GNUNET_free (bf); | 712 | GNUNET_free (bf); |
713 | } | 713 | } |
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index ad362408e..b66a7b258 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -217,9 +217,9 @@ GNUNET_CONTAINER_meta_data_create () | |||
217 | static void | 217 | static void |
218 | meta_item_free (struct MetaItem *mi) | 218 | meta_item_free (struct MetaItem *mi) |
219 | { | 219 | { |
220 | GNUNET_free_non_null (mi->plugin_name); | 220 | GNUNET_free (mi->plugin_name); |
221 | GNUNET_free_non_null (mi->mime_type); | 221 | GNUNET_free (mi->mime_type); |
222 | GNUNET_free_non_null (mi->data); | 222 | GNUNET_free (mi->data); |
223 | GNUNET_free (mi); | 223 | GNUNET_free (mi); |
224 | } | 224 | } |
225 | 225 | ||
@@ -258,7 +258,7 @@ GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md) | |||
258 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos); | 258 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos); |
259 | meta_item_free (pos); | 259 | meta_item_free (pos); |
260 | } | 260 | } |
261 | GNUNET_free_non_null (md->sbuf); | 261 | GNUNET_free (md->sbuf); |
262 | GNUNET_free (md); | 262 | GNUNET_free (md); |
263 | } | 263 | } |
264 | 264 | ||
@@ -280,7 +280,7 @@ GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md) | |||
280 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi); | 280 | GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi); |
281 | meta_item_free (mi); | 281 | meta_item_free (mi); |
282 | } | 282 | } |
283 | GNUNET_free_non_null (md->sbuf); | 283 | GNUNET_free (md->sbuf); |
284 | memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData)); | 284 | memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData)); |
285 | } | 285 | } |
286 | 286 | ||
@@ -976,7 +976,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData | |||
976 | if (NULL != pos->mime_type) | 976 | if (NULL != pos->mime_type) |
977 | left -= strlen (pos->mime_type) + 1; | 977 | left -= strlen (pos->mime_type) + 1; |
978 | 978 | ||
979 | GNUNET_free_non_null (cdata); | 979 | GNUNET_free (cdata); |
980 | cdata = NULL; | 980 | cdata = NULL; |
981 | 981 | ||
982 | i++; | 982 | i++; |
@@ -1180,7 +1180,7 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size) | |||
1180 | ntohl (ent.type), format, mime_type, | 1180 | ntohl (ent.type), format, mime_type, |
1181 | meta_data, dlen); | 1181 | meta_data, dlen); |
1182 | } | 1182 | } |
1183 | GNUNET_free_non_null (data); | 1183 | GNUNET_free (data); |
1184 | return md; | 1184 | return md; |
1185 | } | 1185 | } |
1186 | 1186 | ||
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index e1608ae55..019dbe94e 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c | |||
@@ -141,7 +141,7 @@ decode_private_ecdsa_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv) | |||
141 | int rc; | 141 | int rc; |
142 | uint8_t d[32]; | 142 | uint8_t d[32]; |
143 | 143 | ||
144 | for (size_t i=0; i<32; i++) | 144 | for (size_t i = 0; i<32; i++) |
145 | d[i] = priv->d[31 - i]; | 145 | d[i] = priv->d[31 - i]; |
146 | 146 | ||
147 | rc = gcry_sexp_build (&result, | 147 | rc = gcry_sexp_build (&result, |
@@ -195,7 +195,7 @@ GNUNET_CRYPTO_eddsa_key_get_public ( | |||
195 | struct GNUNET_CRYPTO_EddsaPublicKey *pub) | 195 | struct GNUNET_CRYPTO_EddsaPublicKey *pub) |
196 | { | 196 | { |
197 | unsigned char pk[crypto_sign_PUBLICKEYBYTES]; | 197 | unsigned char pk[crypto_sign_PUBLICKEYBYTES]; |
198 | unsigned char sk[crypto_sign_SECRETKEYBYTES]; | 198 | unsigned char sk[crypto_sign_SECRETKEYBYTES]; |
199 | 199 | ||
200 | BENCHMARK_START (eddsa_key_get_public); | 200 | BENCHMARK_START (eddsa_key_get_public); |
201 | GNUNET_assert (0 == crypto_sign_seed_keypair (pk, sk, priv->d)); | 201 | GNUNET_assert (0 == crypto_sign_seed_keypair (pk, sk, priv->d)); |
@@ -929,7 +929,7 @@ GNUNET_CRYPTO_ecdsa_private_key_derive ( | |||
929 | 929 | ||
930 | h = derive_h (&pub, label, context); | 930 | h = derive_h (&pub, label, context); |
931 | /* Convert to big endian for libgcrypt */ | 931 | /* Convert to big endian for libgcrypt */ |
932 | for (size_t i=0; i < 32; i++) | 932 | for (size_t i = 0; i < 32; i++) |
933 | dc[i] = priv->d[31 - i]; | 933 | dc[i] = priv->d[31 - i]; |
934 | GNUNET_CRYPTO_mpi_scan_unsigned (&x, dc, sizeof(dc)); | 934 | GNUNET_CRYPTO_mpi_scan_unsigned (&x, dc, sizeof(dc)); |
935 | d = gcry_mpi_new (256); | 935 | d = gcry_mpi_new (256); |
@@ -941,9 +941,9 @@ GNUNET_CRYPTO_ecdsa_private_key_derive ( | |||
941 | ret = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey); | 941 | ret = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey); |
942 | GNUNET_CRYPTO_mpi_print_unsigned (dc, sizeof(dc), d); | 942 | GNUNET_CRYPTO_mpi_print_unsigned (dc, sizeof(dc), d); |
943 | /* Convert to big endian for libgcrypt */ | 943 | /* Convert to big endian for libgcrypt */ |
944 | for (size_t i=0; i < 32; i++) | 944 | for (size_t i = 0; i < 32; i++) |
945 | ret->d[i] = dc[31 - i]; | 945 | ret->d[i] = dc[31 - i]; |
946 | sodium_memzero(dc, sizeof(dc)); | 946 | sodium_memzero (dc, sizeof(dc)); |
947 | gcry_mpi_release (d); | 947 | gcry_mpi_release (d); |
948 | return ret; | 948 | return ret; |
949 | } | 949 | } |
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 622953476..0dbe9dbe8 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -250,12 +250,13 @@ GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode *hc, | |||
250 | */ | 250 | */ |
251 | int | 251 | int |
252 | GNUNET_CRYPTO_hash_get_bit_ltr (const struct GNUNET_HashCode *code, | 252 | GNUNET_CRYPTO_hash_get_bit_ltr (const struct GNUNET_HashCode *code, |
253 | unsigned int bit) | 253 | unsigned int bit) |
254 | { | 254 | { |
255 | GNUNET_assert (bit < 8 * sizeof(struct GNUNET_HashCode)); | 255 | GNUNET_assert (bit < 8 * sizeof(struct GNUNET_HashCode)); |
256 | return (((unsigned char *) code)[bit >> 3] & (128 >> (bit & 7))) > 0; | 256 | return (((unsigned char *) code)[bit >> 3] & (128 >> (bit & 7))) > 0; |
257 | } | 257 | } |
258 | 258 | ||
259 | |||
259 | /** | 260 | /** |
260 | * Obtain a bit from a hashcode. | 261 | * Obtain a bit from a hashcode. |
261 | * @param code the GNUNET_CRYPTO_hash to index bit-wise | 262 | * @param code the GNUNET_CRYPTO_hash to index bit-wise |
@@ -272,7 +273,6 @@ GNUNET_CRYPTO_hash_get_bit_rtl (const struct GNUNET_HashCode *code, | |||
272 | } | 273 | } |
273 | 274 | ||
274 | 275 | ||
275 | |||
276 | /** | 276 | /** |
277 | * Determine how many low order bits match in two | 277 | * Determine how many low order bits match in two |
278 | * `struct GNUNET_HashCode`s. i.e. - 010011 and 011111 share | 278 | * `struct GNUNET_HashCode`s. i.e. - 010011 and 011111 share |
diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c index 1b3bd686f..4f3830308 100644 --- a/src/util/crypto_kdf.c +++ b/src/util/crypto_kdf.c | |||
@@ -62,7 +62,8 @@ GNUNET_CRYPTO_kdf_v (void *result, | |||
62 | * hash function." | 62 | * hash function." |
63 | * | 63 | * |
64 | * http://eprint.iacr.org/2010/264 | 64 | * http://eprint.iacr.org/2010/264 |
65 | */return GNUNET_CRYPTO_hkdf_v (result, | 65 | */// |
66 | return GNUNET_CRYPTO_hkdf_v (result, | ||
66 | out_len, | 67 | out_len, |
67 | GCRY_MD_SHA512, | 68 | GCRY_MD_SHA512, |
68 | GCRY_MD_SHA256, | 69 | GCRY_MD_SHA256, |
@@ -142,7 +143,6 @@ GNUNET_CRYPTO_kdf_mod_mpi (gcry_mpi_t *r, | |||
142 | { | 143 | { |
143 | /* Ain't clear if n is always divisible by 8 */ | 144 | /* Ain't clear if n is always divisible by 8 */ |
144 | uint8_t buf[ (nbits - 1) / 8 + 1 ]; | 145 | uint8_t buf[ (nbits - 1) / 8 + 1 ]; |
145 | |||
146 | uint16_t ctr_nbo = htons (ctr); | 146 | uint16_t ctr_nbo = htons (ctr); |
147 | 147 | ||
148 | rc = GNUNET_CRYPTO_kdf (buf, | 148 | rc = GNUNET_CRYPTO_kdf (buf, |
diff --git a/src/util/crypto_mpi.c b/src/util/crypto_mpi.c index 099921611..6df47c7e1 100644 --- a/src/util/crypto_mpi.c +++ b/src/util/crypto_mpi.c | |||
@@ -157,8 +157,8 @@ GNUNET_CRYPTO_mpi_scan_unsigned (gcry_mpi_t *result, | |||
157 | */ | 157 | */ |
158 | void | 158 | void |
159 | GNUNET_CRYPTO_mpi_scan_unsigned_le (gcry_mpi_t *result, | 159 | GNUNET_CRYPTO_mpi_scan_unsigned_le (gcry_mpi_t *result, |
160 | const void *data, | 160 | const void *data, |
161 | size_t size) | 161 | size_t size) |
162 | { | 162 | { |
163 | int rc; | 163 | int rc; |
164 | 164 | ||
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index cb4640d48..b12ec7434 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -1301,7 +1301,8 @@ GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash, | |||
1301 | * so the exchange is being malicious in an unfamilair way, maybe | 1301 | * so the exchange is being malicious in an unfamilair way, maybe |
1302 | * just trying to crash us. Arguably, we've only an internal error | 1302 | * just trying to crash us. Arguably, we've only an internal error |
1303 | * though because we should've detected this in our previous call | 1303 | * though because we should've detected this in our previous call |
1304 | * to GNUNET_CRYPTO_rsa_unblind. */return GNUNET_NO; | 1304 | * to GNUNET_CRYPTO_rsa_unblind. */// |
1305 | return GNUNET_NO; | ||
1305 | } | 1306 | } |
1306 | 1307 | ||
1307 | data = mpi_to_sexp (r); | 1308 | data = mpi_to_sexp (r); |
diff --git a/src/util/disk.c b/src/util/disk.c index 9018aa955..6560726ea 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -1451,33 +1451,23 @@ GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h) | |||
1451 | /** | 1451 | /** |
1452 | * Creates an interprocess channel | 1452 | * Creates an interprocess channel |
1453 | * | 1453 | * |
1454 | * @param blocking_read creates an asynchronous pipe for reading if set to GNUNET_NO | 1454 | * @param pf how to configure the pipe |
1455 | * @param blocking_write creates an asynchronous pipe for writing if set to GNUNET_NO | ||
1456 | * @param inherit_read inherit the parent processes stdin (only for windows) | ||
1457 | * @param inherit_write inherit the parent processes stdout (only for windows) | ||
1458 | * @return handle to the new pipe, NULL on error | 1455 | * @return handle to the new pipe, NULL on error |
1459 | */ | 1456 | */ |
1460 | struct GNUNET_DISK_PipeHandle * | 1457 | struct GNUNET_DISK_PipeHandle * |
1461 | GNUNET_DISK_pipe (int blocking_read, | 1458 | GNUNET_DISK_pipe (enum GNUNET_DISK_PipeFlags pf) |
1462 | int blocking_write, | ||
1463 | int inherit_read, | ||
1464 | int inherit_write) | ||
1465 | { | 1459 | { |
1466 | int fd[2]; | 1460 | int fd[2]; |
1467 | int ret; | ||
1468 | int eno; | ||
1469 | 1461 | ||
1470 | (void) inherit_read; | 1462 | if (-1 == pipe (fd)) |
1471 | (void) inherit_write; | ||
1472 | ret = pipe (fd); | ||
1473 | if (ret == -1) | ||
1474 | { | 1463 | { |
1475 | eno = errno; | 1464 | int eno = errno; |
1465 | |||
1476 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "pipe"); | 1466 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "pipe"); |
1477 | errno = eno; | 1467 | errno = eno; |
1478 | return NULL; | 1468 | return NULL; |
1479 | } | 1469 | } |
1480 | return GNUNET_DISK_pipe_from_fd (blocking_read, blocking_write, fd); | 1470 | return GNUNET_DISK_pipe_from_fd (pf, fd); |
1481 | } | 1471 | } |
1482 | 1472 | ||
1483 | 1473 | ||
@@ -1485,29 +1475,26 @@ GNUNET_DISK_pipe (int blocking_read, | |||
1485 | * Creates a pipe object from a couple of file descriptors. | 1475 | * Creates a pipe object from a couple of file descriptors. |
1486 | * Useful for wrapping existing pipe FDs. | 1476 | * Useful for wrapping existing pipe FDs. |
1487 | * | 1477 | * |
1488 | * @param blocking_read creates an asynchronous pipe for reading if set to GNUNET_NO | 1478 | * @param pf how to configure the pipe |
1489 | * @param blocking_write creates an asynchronous pipe for writing if set to GNUNET_NO | ||
1490 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes | 1479 | * @param fd an array of two fd values. One of them may be -1 for read-only or write-only pipes |
1491 | * | 1480 | * |
1492 | * @return handle to the new pipe, NULL on error | 1481 | * @return handle to the new pipe, NULL on error |
1493 | */ | 1482 | */ |
1494 | struct GNUNET_DISK_PipeHandle * | 1483 | struct GNUNET_DISK_PipeHandle * |
1495 | GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]) | 1484 | GNUNET_DISK_pipe_from_fd (enum GNUNET_DISK_PipeFlags pf, |
1485 | int fd[2]) | ||
1496 | { | 1486 | { |
1497 | struct GNUNET_DISK_PipeHandle *p; | 1487 | struct GNUNET_DISK_PipeHandle *p; |
1498 | 1488 | int ret = 0; | |
1499 | p = GNUNET_new (struct GNUNET_DISK_PipeHandle); | ||
1500 | |||
1501 | int ret; | ||
1502 | int flags; | 1489 | int flags; |
1503 | int eno = 0; /* make gcc happy */ | 1490 | int eno = 0; /* make gcc happy */ |
1504 | 1491 | ||
1505 | ret = 0; | 1492 | p = GNUNET_new (struct GNUNET_DISK_PipeHandle); |
1506 | if (fd[0] >= 0) | 1493 | if (fd[0] >= 0) |
1507 | { | 1494 | { |
1508 | p->fd[0] = GNUNET_new (struct GNUNET_DISK_FileHandle); | 1495 | p->fd[0] = GNUNET_new (struct GNUNET_DISK_FileHandle); |
1509 | p->fd[0]->fd = fd[0]; | 1496 | p->fd[0]->fd = fd[0]; |
1510 | if (! blocking_read) | 1497 | if (0 == (GNUNET_DISK_PF_BLOCKING_READ & pf)) |
1511 | { | 1498 | { |
1512 | flags = fcntl (fd[0], F_GETFL); | 1499 | flags = fcntl (fd[0], F_GETFL); |
1513 | flags |= O_NONBLOCK; | 1500 | flags |= O_NONBLOCK; |
@@ -1530,7 +1517,7 @@ GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]) | |||
1530 | { | 1517 | { |
1531 | p->fd[1] = GNUNET_new (struct GNUNET_DISK_FileHandle); | 1518 | p->fd[1] = GNUNET_new (struct GNUNET_DISK_FileHandle); |
1532 | p->fd[1]->fd = fd[1]; | 1519 | p->fd[1]->fd = fd[1]; |
1533 | if (! blocking_write) | 1520 | if (0 == (GNUNET_DISK_PF_BLOCKING_WRITE & pf)) |
1534 | { | 1521 | { |
1535 | flags = fcntl (fd[1], F_GETFL); | 1522 | flags = fcntl (fd[1], F_GETFL); |
1536 | flags |= O_NONBLOCK; | 1523 | flags |= O_NONBLOCK; |
@@ -1556,13 +1543,12 @@ GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]) | |||
1556 | GNUNET_break (0 == close (p->fd[0]->fd)); | 1543 | GNUNET_break (0 == close (p->fd[0]->fd)); |
1557 | if (p->fd[1]->fd >= 0) | 1544 | if (p->fd[1]->fd >= 0) |
1558 | GNUNET_break (0 == close (p->fd[1]->fd)); | 1545 | GNUNET_break (0 == close (p->fd[1]->fd)); |
1559 | GNUNET_free_non_null (p->fd[0]); | 1546 | GNUNET_free (p->fd[0]); |
1560 | GNUNET_free_non_null (p->fd[1]); | 1547 | GNUNET_free (p->fd[1]); |
1561 | GNUNET_free (p); | 1548 | GNUNET_free (p); |
1562 | errno = eno; | 1549 | errno = eno; |
1563 | return NULL; | 1550 | return NULL; |
1564 | } | 1551 | } |
1565 | |||
1566 | return p; | 1552 | return p; |
1567 | } | 1553 | } |
1568 | 1554 | ||
@@ -1572,7 +1558,7 @@ GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]) | |||
1572 | * | 1558 | * |
1573 | * @param p pipe to close | 1559 | * @param p pipe to close |
1574 | * @param end which end of the pipe to close | 1560 | * @param end which end of the pipe to close |
1575 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 1561 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
1576 | */ | 1562 | */ |
1577 | int | 1563 | int |
1578 | GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, | 1564 | GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, |
@@ -1644,7 +1630,7 @@ GNUNET_DISK_pipe_detach_end (struct GNUNET_DISK_PipeHandle *p, | |||
1644 | * Closes an interprocess channel | 1630 | * Closes an interprocess channel |
1645 | * | 1631 | * |
1646 | * @param p pipe to close | 1632 | * @param p pipe to close |
1647 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 1633 | * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise |
1648 | */ | 1634 | */ |
1649 | int | 1635 | int |
1650 | GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p) | 1636 | GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p) |
diff --git a/src/util/dnsparser.c b/src/util/dnsparser.c index ab687414e..401723106 100644 --- a/src/util/dnsparser.c +++ b/src/util/dnsparser.c | |||
@@ -109,8 +109,8 @@ GNUNET_DNSPARSER_free_soa (struct GNUNET_DNSPARSER_SoaRecord *soa) | |||
109 | { | 109 | { |
110 | if (NULL == soa) | 110 | if (NULL == soa) |
111 | return; | 111 | return; |
112 | GNUNET_free_non_null (soa->mname); | 112 | GNUNET_free (soa->mname); |
113 | GNUNET_free_non_null (soa->rname); | 113 | GNUNET_free (soa->rname); |
114 | GNUNET_free (soa); | 114 | GNUNET_free (soa); |
115 | } | 115 | } |
116 | 116 | ||
@@ -125,7 +125,7 @@ GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert) | |||
125 | { | 125 | { |
126 | if (NULL == cert) | 126 | if (NULL == cert) |
127 | return; | 127 | return; |
128 | GNUNET_free_non_null (cert->certificate_data); | 128 | GNUNET_free (cert->certificate_data); |
129 | GNUNET_free (cert); | 129 | GNUNET_free (cert); |
130 | } | 130 | } |
131 | 131 | ||
@@ -140,7 +140,7 @@ GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv) | |||
140 | { | 140 | { |
141 | if (NULL == srv) | 141 | if (NULL == srv) |
142 | return; | 142 | return; |
143 | GNUNET_free_non_null (srv->target); | 143 | GNUNET_free (srv->target); |
144 | GNUNET_free (srv); | 144 | GNUNET_free (srv); |
145 | } | 145 | } |
146 | 146 | ||
@@ -155,7 +155,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx) | |||
155 | { | 155 | { |
156 | if (NULL == mx) | 156 | if (NULL == mx) |
157 | return; | 157 | return; |
158 | GNUNET_free_non_null (mx->mxhost); | 158 | GNUNET_free (mx->mxhost); |
159 | GNUNET_free (mx); | 159 | GNUNET_free (mx); |
160 | } | 160 | } |
161 | 161 | ||
@@ -168,7 +168,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx) | |||
168 | void | 168 | void |
169 | GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) | 169 | GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) |
170 | { | 170 | { |
171 | GNUNET_free_non_null (r->name); | 171 | GNUNET_free (r->name); |
172 | switch (r->type) | 172 | switch (r->type) |
173 | { | 173 | { |
174 | case GNUNET_DNSPARSER_TYPE_MX: | 174 | case GNUNET_DNSPARSER_TYPE_MX: |
@@ -190,11 +190,11 @@ GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) | |||
190 | case GNUNET_DNSPARSER_TYPE_NS: | 190 | case GNUNET_DNSPARSER_TYPE_NS: |
191 | case GNUNET_DNSPARSER_TYPE_CNAME: | 191 | case GNUNET_DNSPARSER_TYPE_CNAME: |
192 | case GNUNET_DNSPARSER_TYPE_PTR: | 192 | case GNUNET_DNSPARSER_TYPE_PTR: |
193 | GNUNET_free_non_null (r->data.hostname); | 193 | GNUNET_free (r->data.hostname); |
194 | break; | 194 | break; |
195 | 195 | ||
196 | default: | 196 | default: |
197 | GNUNET_free_non_null (r->data.raw.data); | 197 | GNUNET_free (r->data.raw.data); |
198 | break; | 198 | break; |
199 | } | 199 | } |
200 | } | 200 | } |
@@ -854,17 +854,17 @@ void | |||
854 | GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p) | 854 | GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p) |
855 | { | 855 | { |
856 | for (unsigned int i = 0; i < p->num_queries; i++) | 856 | for (unsigned int i = 0; i < p->num_queries; i++) |
857 | GNUNET_free_non_null (p->queries[i].name); | 857 | GNUNET_free (p->queries[i].name); |
858 | GNUNET_free_non_null (p->queries); | 858 | GNUNET_free (p->queries); |
859 | for (unsigned int i = 0; i < p->num_answers; i++) | 859 | for (unsigned int i = 0; i < p->num_answers; i++) |
860 | GNUNET_DNSPARSER_free_record (&p->answers[i]); | 860 | GNUNET_DNSPARSER_free_record (&p->answers[i]); |
861 | GNUNET_free_non_null (p->answers); | 861 | GNUNET_free (p->answers); |
862 | for (unsigned int i = 0; i < p->num_authority_records; i++) | 862 | for (unsigned int i = 0; i < p->num_authority_records; i++) |
863 | GNUNET_DNSPARSER_free_record (&p->authority_records[i]); | 863 | GNUNET_DNSPARSER_free_record (&p->authority_records[i]); |
864 | GNUNET_free_non_null (p->authority_records); | 864 | GNUNET_free (p->authority_records); |
865 | for (unsigned int i = 0; i < p->num_additional_records; i++) | 865 | for (unsigned int i = 0; i < p->num_additional_records; i++) |
866 | GNUNET_DNSPARSER_free_record (&p->additional_records[i]); | 866 | GNUNET_DNSPARSER_free_record (&p->additional_records[i]); |
867 | GNUNET_free_non_null (p->additional_records); | 867 | GNUNET_free (p->additional_records); |
868 | GNUNET_free (p); | 868 | GNUNET_free (p); |
869 | } | 869 | } |
870 | 870 | ||
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index a56ef2d96..592875531 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -377,7 +377,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
377 | (void) ctx; | 377 | (void) ctx; |
378 | (void) option; | 378 | (void) option; |
379 | GNUNET_assert (NULL != value); | 379 | GNUNET_assert (NULL != value); |
380 | GNUNET_free_non_null (*val); | 380 | GNUNET_free (*val); |
381 | *val = GNUNET_strdup (value); | 381 | *val = GNUNET_strdup (value); |
382 | return GNUNET_OK; | 382 | return GNUNET_OK; |
383 | } | 383 | } |
@@ -458,7 +458,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
458 | (void) ctx; | 458 | (void) ctx; |
459 | (void) option; | 459 | (void) option; |
460 | GNUNET_assert (NULL != value); | 460 | GNUNET_assert (NULL != value); |
461 | GNUNET_free_non_null (*val); | 461 | GNUNET_free (*val); |
462 | *val = GNUNET_STRINGS_filename_expand (value); | 462 | *val = GNUNET_STRINGS_filename_expand (value); |
463 | return GNUNET_OK; | 463 | return GNUNET_OK; |
464 | } | 464 | } |
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 5883c1497..2b279dda2 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -258,7 +258,7 @@ run (void *cls, | |||
258 | GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile)) | 258 | GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile)) |
259 | global_ret = 2; | 259 | global_ret = 2; |
260 | } | 260 | } |
261 | GNUNET_free_non_null (cfg_fn); | 261 | GNUNET_free (cfg_fn); |
262 | if (NULL != out) | 262 | if (NULL != out) |
263 | GNUNET_CONFIGURATION_destroy (out); | 263 | GNUNET_CONFIGURATION_destroy (out); |
264 | cleanup: | 264 | cleanup: |
diff --git a/src/util/gnunet-qr.c b/src/util/gnunet-qr.c index cd23c3a9c..83b2af2fc 100644 --- a/src/util/gnunet-qr.c +++ b/src/util/gnunet-qr.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | #define LOG(fmt, ...) \ | 32 | #define LOG(fmt, ...) \ |
33 | if (verbose) \ | 33 | if (verbose) \ |
34 | printf (fmt, ## __VA_ARGS__) | 34 | printf (fmt, ## __VA_ARGS__) |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Video device to capture from. Sane default for GNU/Linux systems. | 37 | * Video device to capture from. Sane default for GNU/Linux systems. |
@@ -161,10 +161,7 @@ gnunet_uri (void *cls, | |||
161 | return; | 161 | return; |
162 | } | 162 | } |
163 | GNUNET_free (subsystem); | 163 | GNUNET_free (subsystem); |
164 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, | 164 | sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
165 | GNUNET_NO, | ||
166 | GNUNET_NO, | ||
167 | GNUNET_NO); | ||
168 | GNUNET_assert (NULL != sigpipe); | 165 | GNUNET_assert (NULL != sigpipe); |
169 | rt = GNUNET_SCHEDULER_add_read_file ( | 166 | rt = GNUNET_SCHEDULER_add_read_file ( |
170 | GNUNET_TIME_UNIT_FOREVER_REL, | 167 | GNUNET_TIME_UNIT_FOREVER_REL, |
@@ -192,8 +189,7 @@ gnunet_uri (void *cls, | |||
192 | GNUNET_array_append (argv, | 189 | GNUNET_array_append (argv, |
193 | argc, | 190 | argc, |
194 | NULL); | 191 | NULL); |
195 | p = GNUNET_OS_start_process_vap (GNUNET_NO, | 192 | p = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ALL, |
196 | GNUNET_OS_INHERIT_STD_ALL, | ||
197 | NULL, | 193 | NULL, |
198 | NULL, | 194 | NULL, |
199 | NULL, | 195 | NULL, |
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index 7d13ce469..aa64144a8 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c | |||
@@ -323,7 +323,7 @@ main (int argc, char *const *argv) | |||
323 | ? 0 | 323 | ? 0 |
324 | : 1; | 324 | : 1; |
325 | GNUNET_free_nz ((void *) argv); | 325 | GNUNET_free_nz ((void *) argv); |
326 | GNUNET_free_non_null (pwfn); | 326 | GNUNET_free (pwfn); |
327 | return ret; | 327 | return ret; |
328 | } | 328 | } |
329 | 329 | ||
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c index 357453da7..5ed70807e 100644 --- a/src/util/gnunet-service-resolver.c +++ b/src/util/gnunet-service-resolver.c | |||
@@ -217,7 +217,7 @@ free_cache_entry (struct ResolveCache *rc) | |||
217 | GNUNET_free (pos->record); | 217 | GNUNET_free (pos->record); |
218 | GNUNET_free (pos); | 218 | GNUNET_free (pos); |
219 | } | 219 | } |
220 | GNUNET_free_non_null (rc->hostname); | 220 | GNUNET_free (rc->hostname); |
221 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc); | 221 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc); |
222 | cache_size--; | 222 | cache_size--; |
223 | GNUNET_free (rc); | 223 | GNUNET_free (rc); |
@@ -241,7 +241,7 @@ free_hosts_entry (struct ResolveCache *rc) | |||
241 | GNUNET_free (pos->record); | 241 | GNUNET_free (pos->record); |
242 | GNUNET_free (pos); | 242 | GNUNET_free (pos); |
243 | } | 243 | } |
244 | GNUNET_free_non_null (rc->hostname); | 244 | GNUNET_free (rc->hostname); |
245 | GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc); | 245 | GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc); |
246 | cache_size--; | 246 | cache_size--; |
247 | GNUNET_free (rc); | 247 | GNUNET_free (rc); |
@@ -267,7 +267,7 @@ free_active_lookup (struct ActiveLookup *al) | |||
267 | GNUNET_SCHEDULER_cancel (al->timeout_task); | 267 | GNUNET_SCHEDULER_cancel (al->timeout_task); |
268 | al->timeout_task = NULL; | 268 | al->timeout_task = NULL; |
269 | } | 269 | } |
270 | GNUNET_free_non_null (al->hostname); | 270 | GNUNET_free (al->hostname); |
271 | GNUNET_free (al); | 271 | GNUNET_free (al); |
272 | } | 272 | } |
273 | 273 | ||
@@ -1094,7 +1094,7 @@ handle_get (void *cls, const struct GNUNET_RESOLVER_GetMessage *msg) | |||
1094 | client_request_id, | 1094 | client_request_id, |
1095 | client); | 1095 | client); |
1096 | } | 1096 | } |
1097 | GNUNET_free_non_null (hostname); | 1097 | GNUNET_free (hostname); |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | 1100 | ||
@@ -1115,7 +1115,7 @@ shutdown_task (void *cls) | |||
1115 | while (NULL != hosts_head) | 1115 | while (NULL != hosts_head) |
1116 | free_hosts_entry (hosts_head); | 1116 | free_hosts_entry (hosts_head); |
1117 | GNUNET_DNSSTUB_stop (dnsstub_ctx); | 1117 | GNUNET_DNSSTUB_stop (dnsstub_ctx); |
1118 | GNUNET_free_non_null (my_domain); | 1118 | GNUNET_free (my_domain); |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | 1121 | ||
@@ -1296,7 +1296,7 @@ init_cb (void *cls, | |||
1296 | GNUNET_OK == result ? "success" : "failure"); | 1296 | GNUNET_OK == result ? "success" : "failure"); |
1297 | GNUNET_free (dns_servers[i]); | 1297 | GNUNET_free (dns_servers[i]); |
1298 | } | 1298 | } |
1299 | GNUNET_free_non_null (dns_servers); | 1299 | GNUNET_free (dns_servers); |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | 1302 | ||
diff --git a/src/util/gnunet-uri.c b/src/util/gnunet-uri.c index 48c46ee49..9443c9120 100644 --- a/src/util/gnunet-uri.c +++ b/src/util/gnunet-uri.c | |||
@@ -115,8 +115,7 @@ run (void *cls, | |||
115 | GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ), | 115 | GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ), |
116 | &maint_child_death, | 116 | &maint_child_death, |
117 | NULL); | 117 | NULL); |
118 | p = GNUNET_OS_start_process (GNUNET_NO, | 118 | p = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE, |
119 | 0, | ||
120 | NULL, | 119 | NULL, |
121 | NULL, | 120 | NULL, |
122 | NULL, | 121 | NULL, |
@@ -168,7 +167,7 @@ main (int argc, char *const *argv) | |||
168 | 167 | ||
169 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 168 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
170 | return 2; | 169 | return 2; |
171 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); | 170 | sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
172 | GNUNET_assert (sigpipe != NULL); | 171 | GNUNET_assert (sigpipe != NULL); |
173 | shc_chld = | 172 | shc_chld = |
174 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); | 173 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); |
diff --git a/src/util/helper.c b/src/util/helper.c index 8c8fb7b6a..7360b7d4b 100644 --- a/src/util/helper.c +++ b/src/util/helper.c | |||
@@ -401,9 +401,9 @@ static void | |||
401 | start_helper (struct GNUNET_HELPER_Handle *h) | 401 | start_helper (struct GNUNET_HELPER_Handle *h) |
402 | { | 402 | { |
403 | h->helper_in = | 403 | h->helper_in = |
404 | GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO); | 404 | GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); |
405 | h->helper_out = | 405 | h->helper_out = |
406 | GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); | 406 | GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); |
407 | if ((h->helper_in == NULL) || (h->helper_out == NULL)) | 407 | if ((h->helper_in == NULL) || (h->helper_out == NULL)) |
408 | { | 408 | { |
409 | /* out of file descriptors? try again later... */ | 409 | /* out of file descriptors? try again later... */ |
@@ -422,8 +422,10 @@ start_helper (struct GNUNET_HELPER_Handle *h) | |||
422 | GNUNET_DISK_pipe_handle (h->helper_out, GNUNET_DISK_PIPE_END_READ); | 422 | GNUNET_DISK_pipe_handle (h->helper_out, GNUNET_DISK_PIPE_END_READ); |
423 | h->fh_to_helper = | 423 | h->fh_to_helper = |
424 | GNUNET_DISK_pipe_handle (h->helper_in, GNUNET_DISK_PIPE_END_WRITE); | 424 | GNUNET_DISK_pipe_handle (h->helper_in, GNUNET_DISK_PIPE_END_WRITE); |
425 | h->helper_proc = GNUNET_OS_start_process_vap (h->with_control_pipe, | 425 | h->helper_proc = GNUNET_OS_start_process_vap (h->with_control_pipe |
426 | GNUNET_OS_INHERIT_STD_ERR, | 426 | ? GNUNET_OS_INHERIT_STD_ERR |
427 | | GNUNET_OS_USE_PIPE_CONTROL | ||
428 | : GNUNET_OS_INHERIT_STD_ERR, | ||
427 | h->helper_in, | 429 | h->helper_in, |
428 | h->helper_out, | 430 | h->helper_out, |
429 | NULL, | 431 | NULL, |
diff --git a/src/util/mq.c b/src/util/mq.c index 78dc7dba2..302b310de 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -881,7 +881,7 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) | |||
881 | GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map); | 881 | GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map); |
882 | mq->assoc_map = NULL; | 882 | mq->assoc_map = NULL; |
883 | } | 883 | } |
884 | GNUNET_free_non_null (mq->handlers); | 884 | GNUNET_free (mq->handlers); |
885 | GNUNET_free (mq); | 885 | GNUNET_free (mq); |
886 | } | 886 | } |
887 | 887 | ||
diff --git a/src/util/network.c b/src/util/network.c index 223ce2080..b18030fcd 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -621,7 +621,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) | |||
621 | void | 621 | void |
622 | GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc) | 622 | GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc) |
623 | { | 623 | { |
624 | GNUNET_free_non_null (desc->addr); | 624 | GNUNET_free (desc->addr); |
625 | GNUNET_free (desc); | 625 | GNUNET_free (desc); |
626 | } | 626 | } |
627 | 627 | ||
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 714df6957..34b88d761 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -563,11 +563,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
563 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) | 563 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) |
564 | { | 564 | { |
565 | GNUNET_free (execpath); | 565 | GNUNET_free (execpath); |
566 | GNUNET_free_non_null (dirname); | 566 | GNUNET_free (dirname); |
567 | return tmp; | 567 | return tmp; |
568 | } | 568 | } |
569 | GNUNET_free (tmp); | 569 | GNUNET_free (tmp); |
570 | GNUNET_free_non_null (dirname); | 570 | GNUNET_free (dirname); |
571 | } | 571 | } |
572 | GNUNET_asprintf (&dirname, | 572 | GNUNET_asprintf (&dirname, |
573 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR, | 573 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR, |
@@ -643,11 +643,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
643 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) | 643 | (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) |
644 | { | 644 | { |
645 | GNUNET_free (execpath); | 645 | GNUNET_free (execpath); |
646 | GNUNET_free_non_null (dirname); | 646 | GNUNET_free (dirname); |
647 | return tmp; | 647 | return tmp; |
648 | } | 648 | } |
649 | GNUNET_free (tmp); | 649 | GNUNET_free (tmp); |
650 | GNUNET_free_non_null (dirname); | 650 | GNUNET_free (dirname); |
651 | } | 651 | } |
652 | GNUNET_asprintf (&dirname, | 652 | GNUNET_asprintf (&dirname, |
653 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR | 653 | DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 5799d893b..8d045c72b 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -326,7 +326,6 @@ open_dev_null (int target_fd, int flags) | |||
326 | /** | 326 | /** |
327 | * Start a process. | 327 | * Start a process. |
328 | * | 328 | * |
329 | * @param pipe_control should a pipe be used to send signals to the child? | ||
330 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags controlling which | 329 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags controlling which |
331 | * std handles of the parent are inherited by the child. | 330 | * std handles of the parent are inherited by the child. |
332 | * pipe_stdin and pipe_stdout take priority over std_inheritance | 331 | * pipe_stdin and pipe_stdout take priority over std_inheritance |
@@ -341,8 +340,7 @@ open_dev_null (int target_fd, int flags) | |||
341 | * @return process ID of the new process, -1 on error | 340 | * @return process ID of the new process, -1 on error |
342 | */ | 341 | */ |
343 | static struct GNUNET_OS_Process * | 342 | static struct GNUNET_OS_Process * |
344 | start_process (int pipe_control, | 343 | start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
345 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
346 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 344 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
347 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 345 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
348 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 346 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
@@ -373,12 +371,12 @@ start_process (int pipe_control, | |||
373 | if (GNUNET_SYSERR == | 371 | if (GNUNET_SYSERR == |
374 | GNUNET_OS_check_helper_binary (filename, GNUNET_NO, NULL)) | 372 | GNUNET_OS_check_helper_binary (filename, GNUNET_NO, NULL)) |
375 | return NULL; /* not executable */ | 373 | return NULL; /* not executable */ |
376 | if (GNUNET_YES == pipe_control) | 374 | if (0 != (std_inheritance & GNUNET_OS_USE_PIPE_CONTROL)) |
377 | { | 375 | { |
378 | struct GNUNET_DISK_PipeHandle *childpipe; | 376 | struct GNUNET_DISK_PipeHandle *childpipe; |
379 | int dup_childpipe_read_fd = -1; | 377 | int dup_childpipe_read_fd = -1; |
380 | 378 | ||
381 | childpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_YES, GNUNET_NO); | 379 | childpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
382 | if (NULL == childpipe) | 380 | if (NULL == childpipe) |
383 | return NULL; | 381 | return NULL; |
384 | childpipe_read = | 382 | childpipe_read = |
@@ -486,7 +484,7 @@ start_process (int pipe_control, | |||
486 | gnunet_proc = GNUNET_new (struct GNUNET_OS_Process); | 484 | gnunet_proc = GNUNET_new (struct GNUNET_OS_Process); |
487 | gnunet_proc->pid = ret; | 485 | gnunet_proc->pid = ret; |
488 | gnunet_proc->control_pipe = childpipe_write; | 486 | gnunet_proc->control_pipe = childpipe_write; |
489 | if (GNUNET_YES == pipe_control) | 487 | if (0 != (std_inheritance & GNUNET_OS_USE_PIPE_CONTROL)) |
490 | { | 488 | { |
491 | close (childpipe_read_fd); | 489 | close (childpipe_read_fd); |
492 | } | 490 | } |
@@ -594,7 +592,6 @@ start_process (int pipe_control, | |||
594 | /** | 592 | /** |
595 | * Start a process. | 593 | * Start a process. |
596 | * | 594 | * |
597 | * @param pipe_control should a pipe be used to send signals to the child? | ||
598 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 595 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
599 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 596 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
600 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 597 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
@@ -604,16 +601,14 @@ start_process (int pipe_control, | |||
604 | * @return pointer to process structure of the new process, NULL on error | 601 | * @return pointer to process structure of the new process, NULL on error |
605 | */ | 602 | */ |
606 | struct GNUNET_OS_Process * | 603 | struct GNUNET_OS_Process * |
607 | GNUNET_OS_start_process_vap (int pipe_control, | 604 | GNUNET_OS_start_process_vap (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
608 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
609 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 605 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
610 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 606 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
611 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 607 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
612 | const char *filename, | 608 | const char *filename, |
613 | char *const argv[]) | 609 | char *const argv[]) |
614 | { | 610 | { |
615 | return start_process (pipe_control, | 611 | return start_process (std_inheritance, |
616 | std_inheritance, | ||
617 | pipe_stdin, | 612 | pipe_stdin, |
618 | pipe_stdout, | 613 | pipe_stdout, |
619 | pipe_stderr, | 614 | pipe_stderr, |
@@ -626,7 +621,6 @@ GNUNET_OS_start_process_vap (int pipe_control, | |||
626 | /** | 621 | /** |
627 | * Start a process. | 622 | * Start a process. |
628 | * | 623 | * |
629 | * @param pipe_control should a pipe be used to send signals to the child? | ||
630 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 624 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
631 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 625 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
632 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 626 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
@@ -636,8 +630,7 @@ GNUNET_OS_start_process_vap (int pipe_control, | |||
636 | * @return pointer to process structure of the new process, NULL on error | 630 | * @return pointer to process structure of the new process, NULL on error |
637 | */ | 631 | */ |
638 | struct GNUNET_OS_Process * | 632 | struct GNUNET_OS_Process * |
639 | GNUNET_OS_start_process_va (int pipe_control, | 633 | GNUNET_OS_start_process_va (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
640 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
641 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 634 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
642 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 635 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
643 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 636 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
@@ -660,8 +653,7 @@ GNUNET_OS_start_process_va (int pipe_control, | |||
660 | while (NULL != (argv[argc] = va_arg (ap, char *))) | 653 | while (NULL != (argv[argc] = va_arg (ap, char *))) |
661 | argc++; | 654 | argc++; |
662 | va_end (ap); | 655 | va_end (ap); |
663 | ret = GNUNET_OS_start_process_vap (pipe_control, | 656 | ret = GNUNET_OS_start_process_vap (std_inheritance, |
664 | std_inheritance, | ||
665 | pipe_stdin, | 657 | pipe_stdin, |
666 | pipe_stdout, | 658 | pipe_stdout, |
667 | pipe_stderr, | 659 | pipe_stderr, |
@@ -675,7 +667,6 @@ GNUNET_OS_start_process_va (int pipe_control, | |||
675 | /** | 667 | /** |
676 | * Start a process. | 668 | * Start a process. |
677 | * | 669 | * |
678 | * @param pipe_control should a pipe be used to send signals to the child? | ||
679 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 670 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
680 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 671 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
681 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 672 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
@@ -684,8 +675,7 @@ GNUNET_OS_start_process_va (int pipe_control, | |||
684 | * @return pointer to process structure of the new process, NULL on error | 675 | * @return pointer to process structure of the new process, NULL on error |
685 | */ | 676 | */ |
686 | struct GNUNET_OS_Process * | 677 | struct GNUNET_OS_Process * |
687 | GNUNET_OS_start_process (int pipe_control, | 678 | GNUNET_OS_start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
688 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
689 | struct GNUNET_DISK_PipeHandle *pipe_stdin, | 679 | struct GNUNET_DISK_PipeHandle *pipe_stdin, |
690 | struct GNUNET_DISK_PipeHandle *pipe_stdout, | 680 | struct GNUNET_DISK_PipeHandle *pipe_stdout, |
691 | struct GNUNET_DISK_PipeHandle *pipe_stderr, | 681 | struct GNUNET_DISK_PipeHandle *pipe_stderr, |
@@ -696,8 +686,7 @@ GNUNET_OS_start_process (int pipe_control, | |||
696 | va_list ap; | 686 | va_list ap; |
697 | 687 | ||
698 | va_start (ap, filename); | 688 | va_start (ap, filename); |
699 | ret = GNUNET_OS_start_process_va (pipe_control, | 689 | ret = GNUNET_OS_start_process_va (std_inheritance, |
700 | std_inheritance, | ||
701 | pipe_stdin, | 690 | pipe_stdin, |
702 | pipe_stdout, | 691 | pipe_stdout, |
703 | pipe_stderr, | 692 | pipe_stderr, |
@@ -711,7 +700,6 @@ GNUNET_OS_start_process (int pipe_control, | |||
711 | /** | 700 | /** |
712 | * Start a process. | 701 | * Start a process. |
713 | * | 702 | * |
714 | * @param pipe_control should a pipe be used to send signals to the child? | ||
715 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags controlling which | 703 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags controlling which |
716 | * std handles of the parent are inherited by the child. | 704 | * std handles of the parent are inherited by the child. |
717 | * pipe_stdin and pipe_stdout take priority over std_inheritance | 705 | * pipe_stdin and pipe_stdout take priority over std_inheritance |
@@ -723,14 +711,12 @@ GNUNET_OS_start_process (int pipe_control, | |||
723 | * @return process ID of the new process, -1 on error | 711 | * @return process ID of the new process, -1 on error |
724 | */ | 712 | */ |
725 | struct GNUNET_OS_Process * | 713 | struct GNUNET_OS_Process * |
726 | GNUNET_OS_start_process_v (int pipe_control, | 714 | GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
727 | enum GNUNET_OS_InheritStdioFlags std_inheritance, | ||
728 | const int *lsocks, | 715 | const int *lsocks, |
729 | const char *filename, | 716 | const char *filename, |
730 | char *const argv[]) | 717 | char *const argv[]) |
731 | { | 718 | { |
732 | return start_process (pipe_control, | 719 | return start_process (std_inheritance, |
733 | std_inheritance, | ||
734 | NULL, | 720 | NULL, |
735 | NULL, | 721 | NULL, |
736 | NULL, | 722 | NULL, |
@@ -747,7 +733,6 @@ GNUNET_OS_start_process_v (int pipe_control, | |||
747 | * in the order they appear. Arguments containing spaces can be used by | 733 | * in the order they appear. Arguments containing spaces can be used by |
748 | * quoting them with @em ". | 734 | * quoting them with @em ". |
749 | * | 735 | * |
750 | * @param pipe_control should a pipe be used to send signals to the child? | ||
751 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags | 736 | * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags |
752 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); | 737 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); |
753 | * must be NULL on platforms where dup is not supported | 738 | * must be NULL on platforms where dup is not supported |
@@ -759,8 +744,7 @@ GNUNET_OS_start_process_v (int pipe_control, | |||
759 | * @return pointer to process structure of the new process, NULL on error | 744 | * @return pointer to process structure of the new process, NULL on error |
760 | */ | 745 | */ |
761 | struct GNUNET_OS_Process * | 746 | struct GNUNET_OS_Process * |
762 | GNUNET_OS_start_process_s (int pipe_control, | 747 | GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance, |
763 | unsigned int std_inheritance, | ||
764 | const int *lsocks, | 748 | const int *lsocks, |
765 | const char *filename, | 749 | const char *filename, |
766 | ...) | 750 | ...) |
@@ -869,8 +853,7 @@ GNUNET_OS_start_process_s (int pipe_control, | |||
869 | } | 853 | } |
870 | } | 854 | } |
871 | binary_path = argv[0]; | 855 | binary_path = argv[0]; |
872 | proc = GNUNET_OS_start_process_v (pipe_control, | 856 | proc = GNUNET_OS_start_process_v (std_inheritance, |
873 | std_inheritance, | ||
874 | lsocks, | 857 | lsocks, |
875 | binary_path, | 858 | binary_path, |
876 | argv); | 859 | argv); |
@@ -1169,13 +1152,18 @@ GNUNET_OS_command_run (GNUNET_OS_LineProcessor proc, | |||
1169 | struct GNUNET_DISK_PipeHandle *opipe; | 1152 | struct GNUNET_DISK_PipeHandle *opipe; |
1170 | va_list ap; | 1153 | va_list ap; |
1171 | 1154 | ||
1172 | opipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); | 1155 | opipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); |
1173 | if (NULL == opipe) | 1156 | if (NULL == opipe) |
1174 | return NULL; | 1157 | return NULL; |
1175 | va_start (ap, binary); | 1158 | va_start (ap, binary); |
1176 | /* redirect stdout, don't inherit stderr/stdin */ | 1159 | /* redirect stdout, don't inherit stderr/stdin */ |
1177 | eip = | 1160 | eip = |
1178 | GNUNET_OS_start_process_va (GNUNET_NO, 0, NULL, opipe, NULL, binary, ap); | 1161 | GNUNET_OS_start_process_va (GNUNET_OS_INHERIT_STD_NONE, |
1162 | NULL, | ||
1163 | opipe, | ||
1164 | NULL, | ||
1165 | binary, | ||
1166 | ap); | ||
1179 | va_end (ap); | 1167 | va_end (ap); |
1180 | if (NULL == eip) | 1168 | if (NULL == eip) |
1181 | { | 1169 | { |
diff --git a/src/util/perf_malloc.c b/src/util/perf_malloc.c index 6582505c8..1c91402da 100644 --- a/src/util/perf_malloc.c +++ b/src/util/perf_malloc.c | |||
@@ -56,11 +56,11 @@ perf_realloc () | |||
56 | ptr = GNUNET_malloc (i); | 56 | ptr = GNUNET_malloc (i); |
57 | memset (ptr, 1, i); | 57 | memset (ptr, 1, i); |
58 | ptr = GNUNET_realloc (ptr, i + 5); | 58 | ptr = GNUNET_realloc (ptr, i + 5); |
59 | for (size_t j=0;j<i;j++) | 59 | for (size_t j = 0; j<i; j++) |
60 | GNUNET_assert (1 == ptr[j]); | 60 | GNUNET_assert (1 == ptr[j]); |
61 | memset (ptr, 6, i + 5); | 61 | memset (ptr, 6, i + 5); |
62 | ptr = GNUNET_realloc (ptr, i - 5); | 62 | ptr = GNUNET_realloc (ptr, i - 5); |
63 | for (size_t j=0;j<i-5;j++) | 63 | for (size_t j = 0; j<i - 5; j++) |
64 | GNUNET_assert (6 == ptr[j]); | 64 | GNUNET_assert (6 == ptr[j]); |
65 | GNUNET_free (ptr); | 65 | GNUNET_free (ptr); |
66 | } | 66 | } |
diff --git a/src/util/perf_scheduler.c b/src/util/perf_scheduler.c index 3ea76e24c..4d4d0a228 100644 --- a/src/util/perf_scheduler.c +++ b/src/util/perf_scheduler.c | |||
@@ -94,8 +94,8 @@ main (int argc, char *argv[]) | |||
94 | GNUNET_YES)); | 94 | GNUNET_YES)); |
95 | GAUGER ("UTIL", "Scheduler", | 95 | GAUGER ("UTIL", "Scheduler", |
96 | tasks / 1024 / (1 | 96 | tasks / 1024 / (1 |
97 | + GNUNET_TIME_absolute_get_duration | 97 | + GNUNET_TIME_absolute_get_duration |
98 | (start).rel_value_us / 1000LL), "tasks/ms"); | 98 | (start).rel_value_us / 1000LL), "tasks/ms"); |
99 | return 0; | 99 | return 0; |
100 | } | 100 | } |
101 | 101 | ||
diff --git a/src/util/program.c b/src/util/program.c index 5ad069edd..8bda34b4f 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -342,10 +342,10 @@ GNUNET_PROGRAM_run2 (int argc, | |||
342 | ret = GNUNET_OK; | 342 | ret = GNUNET_OK; |
343 | cleanup: | 343 | cleanup: |
344 | GNUNET_CONFIGURATION_destroy (cfg); | 344 | GNUNET_CONFIGURATION_destroy (cfg); |
345 | GNUNET_free_non_null (cc.cfgfile); | 345 | GNUNET_free (cc.cfgfile); |
346 | GNUNET_free_non_null (cfg_fn); | 346 | GNUNET_free (cfg_fn); |
347 | GNUNET_free_non_null (loglev); | 347 | GNUNET_free (loglev); |
348 | GNUNET_free_non_null (logfile); | 348 | GNUNET_free (logfile); |
349 | return ret; | 349 | return ret; |
350 | } | 350 | } |
351 | 351 | ||
diff --git a/src/util/regex.c b/src/util/regex.c index d3ab35652..fed325cd6 100644 --- a/src/util/regex.c +++ b/src/util/regex.c | |||
@@ -174,10 +174,10 @@ num_to_regex (uint16_t value, | |||
174 | GNUNET_asprintf (&ret, | 174 | GNUNET_asprintf (&ret, |
175 | "%s%s%s%s", | 175 | "%s%s%s%s", |
176 | a, b, c, d); | 176 | a, b, c, d); |
177 | GNUNET_free_non_null (a); | 177 | GNUNET_free (a); |
178 | GNUNET_free_non_null (b); | 178 | GNUNET_free (b); |
179 | GNUNET_free_non_null (c); | 179 | GNUNET_free (c); |
180 | GNUNET_free_non_null (d); | 180 | GNUNET_free (d); |
181 | return ret; | 181 | return ret; |
182 | } | 182 | } |
183 | 183 | ||
@@ -607,7 +607,7 @@ address_to_regex (const void *addr, | |||
607 | reg = num_to_regex (a[i], m[i]); | 607 | reg = num_to_regex (a[i], m[i]); |
608 | if (NULL == reg) | 608 | if (NULL == reg) |
609 | { | 609 | { |
610 | GNUNET_free_non_null (ret); | 610 | GNUNET_free (ret); |
611 | return NULL; | 611 | return NULL; |
612 | } | 612 | } |
613 | if (NULL == ret) | 613 | if (NULL == ret) |
@@ -721,7 +721,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy) | |||
721 | line = ipv4_to_regex (&np[i]); | 721 | line = ipv4_to_regex (&np[i]); |
722 | if (NULL == line) | 722 | if (NULL == line) |
723 | { | 723 | { |
724 | GNUNET_free_non_null (reg); | 724 | GNUNET_free (reg); |
725 | GNUNET_free (np); | 725 | GNUNET_free (np); |
726 | return NULL; | 726 | return NULL; |
727 | } | 727 | } |
@@ -777,7 +777,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy) | |||
777 | line = ipv6_to_regex (&np[i]); | 777 | line = ipv6_to_regex (&np[i]); |
778 | if (NULL == line) | 778 | if (NULL == line) |
779 | { | 779 | { |
780 | GNUNET_free_non_null (reg); | 780 | GNUNET_free (reg); |
781 | GNUNET_free (np); | 781 | GNUNET_free (np); |
782 | return NULL; | 782 | return NULL; |
783 | } | 783 | } |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 93393bd7c..b5ce20254 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -2214,10 +2214,7 @@ GNUNET_SCHEDULER_driver_init (const struct GNUNET_SCHEDULER_Driver *driver) | |||
2214 | GNUNET_assert (NULL == shutdown_pipe_handle); | 2214 | GNUNET_assert (NULL == shutdown_pipe_handle); |
2215 | /* general set-up */ | 2215 | /* general set-up */ |
2216 | sh = GNUNET_new (struct GNUNET_SCHEDULER_Handle); | 2216 | sh = GNUNET_new (struct GNUNET_SCHEDULER_Handle); |
2217 | shutdown_pipe_handle = GNUNET_DISK_pipe (GNUNET_NO, | 2217 | shutdown_pipe_handle = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
2218 | GNUNET_NO, | ||
2219 | GNUNET_NO, | ||
2220 | GNUNET_NO); | ||
2221 | GNUNET_assert (NULL != shutdown_pipe_handle); | 2218 | GNUNET_assert (NULL != shutdown_pipe_handle); |
2222 | pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, | 2219 | pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, |
2223 | GNUNET_DISK_PIPE_END_READ); | 2220 | GNUNET_DISK_PIPE_END_READ); |
diff --git a/src/util/service.c b/src/util/service.c index ea078b19b..e6bbe855f 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1144,7 +1144,7 @@ get_server_addresses (const char *service_name, | |||
1144 | (EACCES == errno)) | 1144 | (EACCES == errno)) |
1145 | { | 1145 | { |
1146 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); | 1146 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); |
1147 | GNUNET_free_non_null (hostname); | 1147 | GNUNET_free (hostname); |
1148 | GNUNET_free (unixpath); | 1148 | GNUNET_free (unixpath); |
1149 | return GNUNET_SYSERR; | 1149 | return GNUNET_SYSERR; |
1150 | } | 1150 | } |
@@ -1170,7 +1170,7 @@ get_server_addresses (const char *service_name, | |||
1170 | _ ( | 1170 | _ ( |
1171 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 1171 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
1172 | service_name); | 1172 | service_name); |
1173 | GNUNET_free_non_null (hostname); | 1173 | GNUNET_free (hostname); |
1174 | return GNUNET_SYSERR; | 1174 | return GNUNET_SYSERR; |
1175 | } | 1175 | } |
1176 | if (0 == port) | 1176 | if (0 == port) |
@@ -1178,8 +1178,8 @@ get_server_addresses (const char *service_name, | |||
1178 | saddrs = GNUNET_new_array (2, struct sockaddr *); | 1178 | saddrs = GNUNET_new_array (2, struct sockaddr *); |
1179 | saddrlens = GNUNET_new_array (2, socklen_t); | 1179 | saddrlens = GNUNET_new_array (2, socklen_t); |
1180 | add_unixpath (saddrs, saddrlens, unixpath); | 1180 | add_unixpath (saddrs, saddrlens, unixpath); |
1181 | GNUNET_free_non_null (unixpath); | 1181 | GNUNET_free (unixpath); |
1182 | GNUNET_free_non_null (hostname); | 1182 | GNUNET_free (hostname); |
1183 | *addrs = saddrs; | 1183 | *addrs = saddrs; |
1184 | *addr_lens = saddrlens; | 1184 | *addr_lens = saddrlens; |
1185 | return 1; | 1185 | return 1; |
@@ -1203,7 +1203,7 @@ get_server_addresses (const char *service_name, | |||
1203 | hostname, | 1203 | hostname, |
1204 | gai_strerror (ret)); | 1204 | gai_strerror (ret)); |
1205 | GNUNET_free (hostname); | 1205 | GNUNET_free (hostname); |
1206 | GNUNET_free_non_null (unixpath); | 1206 | GNUNET_free (unixpath); |
1207 | return GNUNET_SYSERR; | 1207 | return GNUNET_SYSERR; |
1208 | } | 1208 | } |
1209 | next = res; | 1209 | next = res; |
@@ -1223,7 +1223,7 @@ get_server_addresses (const char *service_name, | |||
1223 | hostname); | 1223 | hostname); |
1224 | freeaddrinfo (res); | 1224 | freeaddrinfo (res); |
1225 | GNUNET_free (hostname); | 1225 | GNUNET_free (hostname); |
1226 | GNUNET_free_non_null (unixpath); | 1226 | GNUNET_free (unixpath); |
1227 | return GNUNET_SYSERR; | 1227 | return GNUNET_SYSERR; |
1228 | } | 1228 | } |
1229 | resi = i; | 1229 | resi = i; |
@@ -1330,7 +1330,7 @@ get_server_addresses (const char *service_name, | |||
1330 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 1330 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
1331 | } | 1331 | } |
1332 | } | 1332 | } |
1333 | GNUNET_free_non_null (unixpath); | 1333 | GNUNET_free (unixpath); |
1334 | *addrs = saddrs; | 1334 | *addrs = saddrs; |
1335 | *addr_lens = saddrlens; | 1335 | *addr_lens = saddrlens; |
1336 | return resi; | 1336 | return resi; |
@@ -1557,8 +1557,8 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) | |||
1557 | } | 1557 | } |
1558 | GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); | 1558 | GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); |
1559 | } | 1559 | } |
1560 | GNUNET_free_non_null (addrlens); | 1560 | GNUNET_free (addrlens); |
1561 | GNUNET_free_non_null (addrs); | 1561 | GNUNET_free (addrs); |
1562 | if ((0 != num) && (NULL == sh->slc_head)) | 1562 | if ((0 != num) && (NULL == sh->slc_head)) |
1563 | { | 1563 | { |
1564 | /* All attempts to bind failed, hard failure */ | 1564 | /* All attempts to bind failed, hard failure */ |
@@ -1566,7 +1566,7 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) | |||
1566 | GNUNET_ERROR_TYPE_ERROR, | 1566 | GNUNET_ERROR_TYPE_ERROR, |
1567 | _ ( | 1567 | _ ( |
1568 | "Could not bind to any of the ports I was supposed to, refusing to run!\n")); | 1568 | "Could not bind to any of the ports I was supposed to, refusing to run!\n")); |
1569 | GNUNET_free_non_null (csocks); | 1569 | GNUNET_free (csocks); |
1570 | return GNUNET_SYSERR; | 1570 | return GNUNET_SYSERR; |
1571 | } | 1571 | } |
1572 | } | 1572 | } |
@@ -1793,10 +1793,10 @@ teardown_service (struct GNUNET_SERVICE_Handle *sh) | |||
1793 | { | 1793 | { |
1794 | struct ServiceListenContext *slc; | 1794 | struct ServiceListenContext *slc; |
1795 | 1795 | ||
1796 | GNUNET_free_non_null (sh->v4_denied); | 1796 | GNUNET_free (sh->v4_denied); |
1797 | GNUNET_free_non_null (sh->v6_denied); | 1797 | GNUNET_free (sh->v6_denied); |
1798 | GNUNET_free_non_null (sh->v4_allowed); | 1798 | GNUNET_free (sh->v4_allowed); |
1799 | GNUNET_free_non_null (sh->v6_allowed); | 1799 | GNUNET_free (sh->v6_allowed); |
1800 | while (NULL != (slc = sh->slc_head)) | 1800 | while (NULL != (slc = sh->slc_head)) |
1801 | { | 1801 | { |
1802 | GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc); | 1802 | GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc); |
@@ -1890,7 +1890,7 @@ GNUNET_SERVICE_start (const char *service_name, | |||
1890 | sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); | 1890 | sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); |
1891 | if (GNUNET_OK != setup_service (sh)) | 1891 | if (GNUNET_OK != setup_service (sh)) |
1892 | { | 1892 | { |
1893 | GNUNET_free_non_null (sh->handlers); | 1893 | GNUNET_free (sh->handlers); |
1894 | GNUNET_free (sh); | 1894 | GNUNET_free (sh); |
1895 | return NULL; | 1895 | return NULL; |
1896 | } | 1896 | } |
@@ -1913,7 +1913,7 @@ GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Handle *srv) | |||
1913 | while (NULL != (client = srv->clients_head)) | 1913 | while (NULL != (client = srv->clients_head)) |
1914 | GNUNET_SERVICE_client_drop (client); | 1914 | GNUNET_SERVICE_client_drop (client); |
1915 | teardown_service (srv); | 1915 | teardown_service (srv); |
1916 | GNUNET_free_non_null (srv->handlers); | 1916 | GNUNET_free (srv->handlers); |
1917 | GNUNET_free (srv); | 1917 | GNUNET_free (srv); |
1918 | } | 1918 | } |
1919 | 1919 | ||
@@ -2021,8 +2021,8 @@ GNUNET_SERVICE_run_ (int argc, | |||
2021 | sh.disconnect_cb = disconnect_cb; | 2021 | sh.disconnect_cb = disconnect_cb; |
2022 | sh.cb_cls = cls; | 2022 | sh.cb_cls = cls; |
2023 | sh.handlers = (NULL == pd->agpl_url) | 2023 | sh.handlers = (NULL == pd->agpl_url) |
2024 | ? GNUNET_MQ_copy_handlers (handlers) | 2024 | ? GNUNET_MQ_copy_handlers (handlers) |
2025 | : GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); | 2025 | : GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); |
2026 | sh.service_name = service_name; | 2026 | sh.service_name = service_name; |
2027 | sh.ret = 0; | 2027 | sh.ret = 0; |
2028 | /* setup subsystems */ | 2028 | /* setup subsystems */ |
@@ -2159,13 +2159,13 @@ shutdown: | |||
2159 | } | 2159 | } |
2160 | #endif | 2160 | #endif |
2161 | teardown_service (&sh); | 2161 | teardown_service (&sh); |
2162 | GNUNET_free_non_null (sh.handlers); | 2162 | GNUNET_free (sh.handlers); |
2163 | GNUNET_SPEEDUP_stop_ (); | 2163 | GNUNET_SPEEDUP_stop_ (); |
2164 | GNUNET_CONFIGURATION_destroy (cfg); | 2164 | GNUNET_CONFIGURATION_destroy (cfg); |
2165 | GNUNET_free_non_null (logfile); | 2165 | GNUNET_free (logfile); |
2166 | GNUNET_free_non_null (loglev); | 2166 | GNUNET_free (loglev); |
2167 | GNUNET_free (cfg_filename); | 2167 | GNUNET_free (cfg_filename); |
2168 | GNUNET_free_non_null (opt_cfg_filename); | 2168 | GNUNET_free (opt_cfg_filename); |
2169 | 2169 | ||
2170 | return err ? GNUNET_SYSERR : sh.ret; | 2170 | return err ? GNUNET_SYSERR : sh.ret; |
2171 | } | 2171 | } |
diff --git a/src/util/socks.c b/src/util/socks.c index 756be753a..7ab297272 100644 --- a/src/util/socks.c +++ b/src/util/socks.c | |||
@@ -665,7 +665,7 @@ GNUNET_SOCKS_do_connect (const char *service_name, | |||
665 | (host0 != NULL) ? host0 | 665 | (host0 != NULL) ? host0 |
666 | : "127.0.0.1", | 666 | : "127.0.0.1", |
667 | port0); | 667 | port0); |
668 | GNUNET_free_non_null (host0); | 668 | GNUNET_free (host0); |
669 | 669 | ||
670 | /* Sets to NULL if they do not exist */ | 670 | /* Sets to NULL if they do not exist */ |
671 | (void) GNUNET_CONFIGURATION_get_value_string (cfg, | 671 | (void) GNUNET_CONFIGURATION_get_value_string (cfg, |
@@ -677,8 +677,8 @@ GNUNET_SOCKS_do_connect (const char *service_name, | |||
677 | "SOCKSPASS", | 677 | "SOCKSPASS", |
678 | &pass); | 678 | &pass); |
679 | ih = GNUNET_SOCKS_init_handshake (user, pass); | 679 | ih = GNUNET_SOCKS_init_handshake (user, pass); |
680 | GNUNET_free_non_null (user); | 680 | GNUNET_free (user); |
681 | GNUNET_free_non_null (pass); | 681 | GNUNET_free (pass); |
682 | 682 | ||
683 | GNUNET_SOCKS_set_handshake_destination (ih, host1, port1); | 683 | GNUNET_SOCKS_set_handshake_destination (ih, host1, port1); |
684 | GNUNET_free (host1); | 684 | GNUNET_free (host1); |
diff --git a/src/util/strings.c b/src/util/strings.c index 9510b3b3b..41180dd71 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -1148,7 +1148,7 @@ GNUNET_STRINGS_path_is_absolute (const char *filename, | |||
1148 | if (r_uri_scheme) | 1148 | if (r_uri_scheme) |
1149 | *r_uri_scheme = uri; | 1149 | *r_uri_scheme = uri; |
1150 | else | 1150 | else |
1151 | GNUNET_free_non_null (uri); | 1151 | GNUNET_free (uri); |
1152 | 1152 | ||
1153 | return GNUNET_STRINGS_path_is_absolute (post_scheme_path, | 1153 | return GNUNET_STRINGS_path_is_absolute (post_scheme_path, |
1154 | GNUNET_NO, | 1154 | GNUNET_NO, |
@@ -1985,7 +1985,7 @@ GNUNET_STRINGS_base64_decode (const char *data, size_t len, void **out) | |||
1985 | "ignoring CR/LF\n"); \ | 1985 | "ignoring CR/LF\n"); \ |
1986 | i++; \ | 1986 | i++; \ |
1987 | if (i >= len) \ | 1987 | if (i >= len) \ |
1988 | goto END; \ | 1988 | goto END; \ |
1989 | } | 1989 | } |
1990 | 1990 | ||
1991 | GNUNET_assert (len / 3 < SIZE_MAX); | 1991 | GNUNET_assert (len / 3 < SIZE_MAX); |
diff --git a/src/util/test_bio.c b/src/util/test_bio.c index 0c8453121..f18014719 100644 --- a/src/util/test_bio.c +++ b/src/util/test_bio.c | |||
@@ -52,14 +52,14 @@ test_normal_rw (void) | |||
52 | GNUNET_BIO_write_spec_string ("test-normal-rw-string", TESTSTRING), | 52 | GNUNET_BIO_write_spec_string ("test-normal-rw-string", TESTSTRING), |
53 | GNUNET_BIO_write_spec_meta_data ("test-normal-rw-metadata", mdW), | 53 | GNUNET_BIO_write_spec_meta_data ("test-normal-rw-metadata", mdW), |
54 | GNUNET_BIO_write_spec_int64 ("test-normal-rw-int64", &wNum), | 54 | GNUNET_BIO_write_spec_int64 ("test-normal-rw-int64", &wNum), |
55 | GNUNET_BIO_write_spec_end(), | 55 | GNUNET_BIO_write_spec_end (), |
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct GNUNET_BIO_ReadSpec rs[] = { | 58 | struct GNUNET_BIO_ReadSpec rs[] = { |
59 | GNUNET_BIO_read_spec_string ("test-normal-rw-string", &rString, 200), | 59 | GNUNET_BIO_read_spec_string ("test-normal-rw-string", &rString, 200), |
60 | GNUNET_BIO_read_spec_meta_data ("test-normal-rw-metadata", &mdR), | 60 | GNUNET_BIO_read_spec_meta_data ("test-normal-rw-metadata", &mdR), |
61 | GNUNET_BIO_read_spec_int64 ("test-normal-rw-int64", &rNum), | 61 | GNUNET_BIO_read_spec_int64 ("test-normal-rw-int64", &rNum), |
62 | GNUNET_BIO_read_spec_end(), | 62 | GNUNET_BIO_read_spec_end (), |
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* I/O on file */ | 65 | /* I/O on file */ |
@@ -73,12 +73,13 @@ test_normal_rw (void) | |||
73 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); | 73 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); |
74 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); | 74 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); |
75 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); | 75 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); |
76 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_meta_data_test_equal (mdR, mdW)); | 76 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_meta_data_test_equal (mdR, |
77 | mdW)); | ||
77 | GNUNET_assert (wNum == rNum); | 78 | GNUNET_assert (wNum == rNum); |
78 | 79 | ||
79 | GNUNET_CONTAINER_meta_data_destroy (mdR); | 80 | GNUNET_CONTAINER_meta_data_destroy (mdR); |
80 | GNUNET_assert (GNUNET_OK == GNUNET_DISK_directory_remove (filename)); | 81 | GNUNET_assert (GNUNET_OK == GNUNET_DISK_directory_remove (filename)); |
81 | GNUNET_free(filename); | 82 | GNUNET_free (filename); |
82 | 83 | ||
83 | /* I/O on buffer */ | 84 | /* I/O on buffer */ |
84 | wh = GNUNET_BIO_write_open_buffer (); | 85 | wh = GNUNET_BIO_write_open_buffer (); |
@@ -96,7 +97,8 @@ test_normal_rw (void) | |||
96 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); | 97 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); |
97 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); | 98 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); |
98 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); | 99 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); |
99 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_meta_data_test_equal (mdR, mdW)); | 100 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_meta_data_test_equal (mdR, |
101 | mdW)); | ||
100 | GNUNET_assert (wNum == rNum); | 102 | GNUNET_assert (wNum == rNum); |
101 | 103 | ||
102 | GNUNET_free (buffer); | 104 | GNUNET_free (buffer); |
@@ -314,7 +316,7 @@ test_fullfile_rw (void) | |||
314 | 200), | 316 | 200), |
315 | GNUNET_BIO_read_spec_meta_data ("test-fullfile-rw-metadata", | 317 | GNUNET_BIO_read_spec_meta_data ("test-fullfile-rw-metadata", |
316 | &mdR), | 318 | &mdR), |
317 | GNUNET_BIO_read_spec_end(), | 319 | GNUNET_BIO_read_spec_end (), |
318 | }; | 320 | }; |
319 | 321 | ||
320 | wh = GNUNET_BIO_write_open_file ("/dev/full"); | 322 | wh = GNUNET_BIO_write_open_file ("/dev/full"); |
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c index a24af7124..50f259257 100644 --- a/src/util/test_common_allocation.c +++ b/src/util/test_common_allocation.c | |||
@@ -33,6 +33,7 @@ check (void) | |||
33 | char *ptrs[MAX_TESTVAL]; | 33 | char *ptrs[MAX_TESTVAL]; |
34 | unsigned int **a2; | 34 | unsigned int **a2; |
35 | char ***a3; | 35 | char ***a3; |
36 | char *tmp; | ||
36 | int i; | 37 | int i; |
37 | int j; | 38 | int j; |
38 | int k; | 39 | int k; |
@@ -55,9 +56,9 @@ check (void) | |||
55 | GNUNET_free (ptrs[i]); | 56 | GNUNET_free (ptrs[i]); |
56 | } | 57 | } |
57 | 58 | ||
58 | /* GNUNET_free_non_null test */ | 59 | /* GNUNET_free test */ |
59 | GNUNET_free_non_null (NULL); | 60 | tmp = GNUNET_malloc (4); |
60 | GNUNET_free_non_null (GNUNET_malloc (4)); | 61 | GNUNET_free (tmp); |
61 | 62 | ||
62 | /* GNUNET_strdup tests */ | 63 | /* GNUNET_strdup tests */ |
63 | ptrs[0] = GNUNET_strdup ("bar"); | 64 | ptrs[0] = GNUNET_strdup ("bar"); |
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index e6d83d52c..79cf9d53a 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -207,7 +207,7 @@ read_output_line (int phase_from1, int phase_to1, int phase_from2, | |||
207 | */ | 207 | */ |
208 | #define LOG_MAX_LINE_LENGTH (17) | 208 | #define LOG_MAX_LINE_LENGTH (17) |
209 | 209 | ||
210 | #define LOG_BUFFER_SIZE LOG_MAX_NUM_LINES * LOG_MAX_LINE_LENGTH | 210 | #define LOG_BUFFER_SIZE LOG_MAX_NUM_LINES *LOG_MAX_LINE_LENGTH |
211 | 211 | ||
212 | static char buf[LOG_BUFFER_SIZE]; | 212 | static char buf[LOG_BUFFER_SIZE]; |
213 | 213 | ||
@@ -347,8 +347,7 @@ runone () | |||
347 | { | 347 | { |
348 | const struct GNUNET_DISK_FileHandle *stdout_read_handle; | 348 | const struct GNUNET_DISK_FileHandle *stdout_read_handle; |
349 | 349 | ||
350 | pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, | 350 | pipe_stdout = GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); |
351 | GNUNET_YES); | ||
352 | 351 | ||
353 | if (pipe_stdout == NULL) | 352 | if (pipe_stdout == NULL) |
354 | { | 353 | { |
@@ -403,7 +402,7 @@ runone () | |||
403 | break; | 402 | break; |
404 | } | 403 | } |
405 | 404 | ||
406 | proc = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 405 | proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
407 | NULL, pipe_stdout, NULL, | 406 | NULL, pipe_stdout, NULL, |
408 | "./test_common_logging_dummy", | 407 | "./test_common_logging_dummy", |
409 | "test_common_logging_dummy", NULL); | 408 | "test_common_logging_dummy", NULL); |
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 6227a28db..59b1b2291 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c | |||
@@ -128,7 +128,7 @@ diffsCallBack (void *cls, const char *section, const char *option, | |||
128 | } | 128 | } |
129 | else | 129 | else |
130 | cbData->status = 1; | 130 | cbData->status = 1; |
131 | GNUNET_free_non_null (diffValue); | 131 | GNUNET_free (diffValue); |
132 | break; | 132 | break; |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/src/util/test_container_meta_data.c b/src/util/test_container_meta_data.c index d768f3699..db413f313 100644 --- a/src/util/test_container_meta_data.c +++ b/src/util/test_container_meta_data.c | |||
@@ -113,7 +113,7 @@ testMeta (int i) | |||
113 | GNUNET_CONTAINER_meta_data_serialize (m, &sval, size, | 113 | GNUNET_CONTAINER_meta_data_serialize (m, &sval, size, |
114 | GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL)) | 114 | GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL)) |
115 | { | 115 | { |
116 | GNUNET_free_non_null (sval); | 116 | GNUNET_free (sval); |
117 | ABORT (m); | 117 | ABORT (m); |
118 | } | 118 | } |
119 | GNUNET_CONTAINER_meta_data_destroy (m); | 119 | GNUNET_CONTAINER_meta_data_destroy (m); |
diff --git a/src/util/test_container_multihashmap.c b/src/util/test_container_multihashmap.c index bd9e7af31..f46b9f56e 100644 --- a/src/util/test_container_multihashmap.c +++ b/src/util/test_container_multihashmap.c | |||
@@ -31,7 +31,7 @@ | |||
31 | if (m != NULL) GNUNET_CONTAINER_multihashmap_destroy (m); \ | 31 | if (m != NULL) GNUNET_CONTAINER_multihashmap_destroy (m); \ |
32 | if (NULL != \ | 32 | if (NULL != \ |
33 | iter) \ | 33 | iter) \ |
34 | GNUNET_CONTAINER_multihashmap_iterator_destroy (iter); \ | 34 | GNUNET_CONTAINER_multihashmap_iterator_destroy (iter); \ |
35 | return 1; } | 35 | return 1; } |
36 | #define CHECK(c) { if (! (c)) ABORT (); } | 36 | #define CHECK(c) { if (! (c)) ABORT (); } |
37 | 37 | ||
diff --git a/src/util/test_container_multipeermap.c b/src/util/test_container_multipeermap.c index 9aeead56c..cb6fc30d2 100644 --- a/src/util/test_container_multipeermap.c +++ b/src/util/test_container_multipeermap.c | |||
@@ -31,7 +31,7 @@ | |||
31 | if (NULL != m) GNUNET_CONTAINER_multipeermap_destroy (m); \ | 31 | if (NULL != m) GNUNET_CONTAINER_multipeermap_destroy (m); \ |
32 | if (NULL != \ | 32 | if (NULL != \ |
33 | iter) \ | 33 | iter) \ |
34 | GNUNET_CONTAINER_multipeermap_iterator_destroy (iter); \ | 34 | GNUNET_CONTAINER_multipeermap_iterator_destroy (iter); \ |
35 | return 1; } | 35 | return 1; } |
36 | #define CHECK(c) { if (! (c)) ABORT (); } | 36 | #define CHECK(c) { if (! (c)) ABORT (); } |
37 | 37 | ||
diff --git a/src/util/test_crypto_symmetric.c b/src/util/test_crypto_symmetric.c index 9f6cd5ed0..5012c7f5b 100644 --- a/src/util/test_crypto_symmetric.c +++ b/src/util/test_crypto_symmetric.c | |||
@@ -147,7 +147,7 @@ verifyCrypto () | |||
147 | ret = 1; | 147 | ret = 1; |
148 | } | 148 | } |
149 | error: | 149 | error: |
150 | GNUNET_free_non_null (res); | 150 | GNUNET_free (res); |
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | 153 | ||
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 2bdca5c9d..6d4a131bb 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -138,7 +138,7 @@ run_task (void *cls) | |||
138 | } | 138 | } |
139 | 139 | ||
140 | proc = | 140 | proc = |
141 | GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ERR, | 141 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR, |
142 | hello_pipe_stdin, hello_pipe_stdout, NULL, | 142 | hello_pipe_stdin, hello_pipe_stdout, NULL, |
143 | fn, | 143 | fn, |
144 | "test_gnunet_echo_hello", "-", NULL); | 144 | "test_gnunet_echo_hello", "-", NULL); |
@@ -212,7 +212,8 @@ check_kill () | |||
212 | } | 212 | } |
213 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 213 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
214 | proc = | 214 | proc = |
215 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, | 215 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR |
216 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
216 | hello_pipe_stdin, | 217 | hello_pipe_stdin, |
217 | hello_pipe_stdout, | 218 | hello_pipe_stdout, |
218 | NULL, | 219 | NULL, |
@@ -256,7 +257,8 @@ check_instant_kill () | |||
256 | } | 257 | } |
257 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 258 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
258 | proc = | 259 | proc = |
259 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, | 260 | GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR |
261 | | GNUNET_OS_USE_PIPE_CONTROL, | ||
260 | hello_pipe_stdin, hello_pipe_stdout, NULL, | 262 | hello_pipe_stdin, hello_pipe_stdout, NULL, |
261 | fn, | 263 | fn, |
262 | "gnunet-service-resolver", "-", NULL); | 264 | "gnunet-service-resolver", "-", NULL); |
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 13fda53bf..eefb20890 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -215,7 +215,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
215 | own_fqdn = GNUNET_RESOLVER_local_fqdn_get (); | 215 | own_fqdn = GNUNET_RESOLVER_local_fqdn_get (); |
216 | /* can't really check, only thing we can safely | 216 | /* can't really check, only thing we can safely |
217 | compare against is our own identical logic... */ | 217 | compare against is our own identical logic... */ |
218 | GNUNET_free_non_null (own_fqdn); | 218 | GNUNET_free (own_fqdn); |
219 | 219 | ||
220 | /* | 220 | /* |
221 | * Testing non-local DNS resolution | 221 | * Testing non-local DNS resolution |
@@ -348,8 +348,8 @@ main (int argc, char *argv[]) | |||
348 | "WARNING", | 348 | "WARNING", |
349 | NULL); | 349 | NULL); |
350 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 350 | fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
351 | proc = GNUNET_OS_start_process (GNUNET_YES, | 351 | proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
352 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 352 | | GNUNET_OS_USE_PIPE_CONTROL, |
353 | NULL, NULL, NULL, | 353 | NULL, NULL, NULL, |
354 | fn, | 354 | fn, |
355 | "gnunet-service-resolver", | 355 | "gnunet-service-resolver", |
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c index 471ca64e5..0e2e7f760 100644 --- a/src/util/test_scheduler.c +++ b/src/util/test_scheduler.c | |||
@@ -133,7 +133,7 @@ task4 (void *cls) | |||
133 | 133 | ||
134 | GNUNET_assert (4 == *ok); | 134 | GNUNET_assert (4 == *ok); |
135 | (*ok) = 6; | 135 | (*ok) = 6; |
136 | p = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); | 136 | p = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
137 | GNUNET_assert (NULL != p); | 137 | GNUNET_assert (NULL != p); |
138 | fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ); | 138 | fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ); |
139 | fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE); | 139 | fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE); |
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index 62bc45e41..4c57438c3 100644 --- a/src/vpn/gnunet-service-vpn.c +++ b/src/vpn/gnunet-service-vpn.c | |||
@@ -2882,7 +2882,7 @@ cleanup (void *cls) | |||
2882 | stats = NULL; | 2882 | stats = NULL; |
2883 | } | 2883 | } |
2884 | for (i = 0; i < 5; i++) | 2884 | for (i = 0; i < 5; i++) |
2885 | GNUNET_free_non_null (vpn_argv[i]); | 2885 | GNUNET_free (vpn_argv[i]); |
2886 | } | 2886 | } |
2887 | 2887 | ||
2888 | 2888 | ||
@@ -3008,7 +3008,7 @@ run (void *cls, | |||
3008 | _ ("Must specify valid IPv6 address")); | 3008 | _ ("Must specify valid IPv6 address")); |
3009 | GNUNET_free (binary); | 3009 | GNUNET_free (binary); |
3010 | GNUNET_SCHEDULER_shutdown (); | 3010 | GNUNET_SCHEDULER_shutdown (); |
3011 | GNUNET_free_non_null (ipv6addr); | 3011 | GNUNET_free (ipv6addr); |
3012 | return; | 3012 | return; |
3013 | } | 3013 | } |
3014 | vpn_argv[2] = ipv6addr; | 3014 | vpn_argv[2] = ipv6addr; |
@@ -3020,7 +3020,7 @@ run (void *cls, | |||
3020 | { | 3020 | { |
3021 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "VPN", "IPV6PREFIX"); | 3021 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "VPN", "IPV6PREFIX"); |
3022 | GNUNET_SCHEDULER_shutdown (); | 3022 | GNUNET_SCHEDULER_shutdown (); |
3023 | GNUNET_free_non_null (ipv6prefix_s); | 3023 | GNUNET_free (ipv6prefix_s); |
3024 | return; | 3024 | return; |
3025 | } | 3025 | } |
3026 | vpn_argv[3] = ipv6prefix_s; | 3026 | vpn_argv[3] = ipv6prefix_s; |
@@ -3062,7 +3062,7 @@ run (void *cls, | |||
3062 | _ ("Must specify valid IPv4 address")); | 3062 | _ ("Must specify valid IPv4 address")); |
3063 | GNUNET_free (binary); | 3063 | GNUNET_free (binary); |
3064 | GNUNET_SCHEDULER_shutdown (); | 3064 | GNUNET_SCHEDULER_shutdown (); |
3065 | GNUNET_free_non_null (ipv4addr); | 3065 | GNUNET_free (ipv4addr); |
3066 | return; | 3066 | return; |
3067 | } | 3067 | } |
3068 | vpn_argv[4] = ipv4addr; | 3068 | vpn_argv[4] = ipv4addr; |
@@ -3079,7 +3079,7 @@ run (void *cls, | |||
3079 | _ ("Must specify valid IPv4 mask")); | 3079 | _ ("Must specify valid IPv4 mask")); |
3080 | GNUNET_free (binary); | 3080 | GNUNET_free (binary); |
3081 | GNUNET_SCHEDULER_shutdown (); | 3081 | GNUNET_SCHEDULER_shutdown (); |
3082 | GNUNET_free_non_null (ipv4mask); | 3082 | GNUNET_free (ipv4mask); |
3083 | return; | 3083 | return; |
3084 | } | 3084 | } |
3085 | vpn_argv[5] = ipv4mask; | 3085 | vpn_argv[5] = ipv4mask; |
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c index a7f7fc30c..60d631d5e 100644 --- a/src/vpn/gnunet-vpn.c +++ b/src/vpn/gnunet-vpn.c | |||
@@ -107,9 +107,9 @@ do_disconnect (void *cls) | |||
107 | GNUNET_VPN_disconnect (handle); | 107 | GNUNET_VPN_disconnect (handle); |
108 | handle = NULL; | 108 | handle = NULL; |
109 | } | 109 | } |
110 | GNUNET_free_non_null (peer_id); | 110 | GNUNET_free (peer_id); |
111 | GNUNET_free_non_null (service_name); | 111 | GNUNET_free (service_name); |
112 | GNUNET_free_non_null (target_ip); | 112 | GNUNET_free (target_ip); |
113 | } | 113 | } |
114 | 114 | ||
115 | 115 | ||