diff options
Diffstat (limited to 'src/testing/testing_group.c')
-rw-r--r-- | src/testing/testing_group.c | 150 |
1 files changed, 110 insertions, 40 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index 2c7cc80a5..4ce3c9ad1 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -229,7 +229,7 @@ make_config (const struct GNUNET_CONFIGURATION_Handle *cfg, uint16_t * port) | |||
229 | * @param first index of the first peer | 229 | * @param first index of the first peer |
230 | * @param second index of the second peer | 230 | * @param second index of the second peer |
231 | * | 231 | * |
232 | * @return the number of connections added (can be 0 1 or 2) | 232 | * @return the number of connections added (can be 0, 1 or 2) |
233 | * | 233 | * |
234 | * FIXME: add both, or only add one? | 234 | * FIXME: add both, or only add one? |
235 | * - if both are added, then we have to keep track | 235 | * - if both are added, then we have to keep track |
@@ -313,17 +313,13 @@ create_small_world_ring(struct GNUNET_TESTING_PeerGroup *pg) | |||
313 | struct GNUNET_TIME_Absolute time; | 313 | struct GNUNET_TIME_Absolute time; |
314 | 314 | ||
315 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "LOGNMODIFIER", &p_string); | 315 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "LOGNMODIFIER", &p_string); |
316 | if (p_string != NULL) | 316 | if ((p_string == NULL) || (sscanf(p_string, "%lf", &logNModifier) != 1)) |
317 | logNModifier = atof(p_string); | ||
318 | else | ||
319 | logNModifier = 0.5; /* FIXME: default modifier? */ | 317 | logNModifier = 0.5; /* FIXME: default modifier? */ |
320 | 318 | ||
321 | GNUNET_free_non_null(p_string); | 319 | GNUNET_free_non_null(p_string); |
322 | 320 | ||
323 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PERCENTAGE", &p_string); | 321 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PERCENTAGE", &p_string); |
324 | if (p_string != NULL) | 322 | if ((p_string == NULL) || (sscanf(p_string, "%lf", &percentage) != 1)) |
325 | percentage = atof(p_string); | ||
326 | else | ||
327 | percentage = 0.5; /* FIXME: default percentage? */ | 323 | percentage = 0.5; /* FIXME: default percentage? */ |
328 | 324 | ||
329 | GNUNET_free_non_null(p_string); | 325 | GNUNET_free_non_null(p_string); |
@@ -407,9 +403,7 @@ create_nated_internet (struct GNUNET_TESTING_PeerGroup *pg) | |||
407 | char *p_string; | 403 | char *p_string; |
408 | 404 | ||
409 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "NATPERCENTAGE", &p_string); | 405 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "NATPERCENTAGE", &p_string); |
410 | if (p_string != NULL) | 406 | if ((p_string == NULL) || (sscanf(p_string, "%lf", &nat_percentage) != 1)) |
411 | nat_percentage = atof(p_string); | ||
412 | else | ||
413 | nat_percentage = 0.6; /* FIXME: default modifier? */ | 407 | nat_percentage = 0.6; /* FIXME: default modifier? */ |
414 | 408 | ||
415 | GNUNET_free_non_null(p_string); | 409 | GNUNET_free_non_null(p_string); |
@@ -465,17 +459,13 @@ create_small_world (struct GNUNET_TESTING_PeerGroup *pg) | |||
465 | cols = square; | 459 | cols = square; |
466 | 460 | ||
467 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PERCENTAGE", &p_string); | 461 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PERCENTAGE", &p_string); |
468 | if (p_string != NULL) | 462 | if ((p_string == NULL) || (sscanf(p_string, "%lf", &percentage) != 1)) |
469 | percentage = atof(p_string); | ||
470 | else | ||
471 | percentage = 0.5; /* FIXME: default percentage? */ | 463 | percentage = 0.5; /* FIXME: default percentage? */ |
472 | 464 | ||
473 | GNUNET_free_non_null(p_string); | 465 | GNUNET_free_non_null(p_string); |
474 | 466 | ||
475 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PROBABILITY", &p_string); | 467 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PROBABILITY", &p_string); |
476 | if (p_string != NULL) | 468 | if ((p_string == NULL) || (sscanf(p_string, "%lf", &probability) != 1)) |
477 | probability = atof(p_string); | ||
478 | else | ||
479 | probability = 0.5; /* FIXME: default probability? */ | 469 | probability = 0.5; /* FIXME: default probability? */ |
480 | 470 | ||
481 | GNUNET_free_non_null(p_string); | 471 | GNUNET_free_non_null(p_string); |
@@ -583,14 +573,9 @@ create_erdos_renyi (struct GNUNET_TESTING_PeerGroup *pg) | |||
583 | connect_attempts = 0; | 573 | connect_attempts = 0; |
584 | 574 | ||
585 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PROBABILITY", &p_string); | 575 | GNUNET_CONFIGURATION_get_value_string(pg->cfg, "TESTING", "PROBABILITY", &p_string); |
586 | if (p_string != NULL) | 576 | if ((p_string == NULL) || (sscanf(p_string, "%lf", &probability) != 1)) |
587 | { | 577 | probability = 0.5; /* FIXME: default probability? */ |
588 | probability = atof(p_string); | 578 | |
589 | } | ||
590 | else | ||
591 | { | ||
592 | probability = 0.5; /* FIXME: default probability? */ | ||
593 | } | ||
594 | GNUNET_free_non_null (p_string); | 579 | GNUNET_free_non_null (p_string); |
595 | for (outer_count = 0; outer_count < pg->total - 1; outer_count++) | 580 | for (outer_count = 0; outer_count < pg->total - 1; outer_count++) |
596 | { | 581 | { |
@@ -751,7 +736,7 @@ create_ring (struct GNUNET_TESTING_PeerGroup *pg) | |||
751 | * | 736 | * |
752 | * @param pg the peer group we are dealing with | 737 | * @param pg the peer group we are dealing with |
753 | */ | 738 | */ |
754 | static void | 739 | static int |
755 | create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) | 740 | create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) |
756 | { | 741 | { |
757 | FILE *temp_friend_handle; | 742 | FILE *temp_friend_handle; |
@@ -759,11 +744,17 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) | |||
759 | struct PeerConnection *connection_iter; | 744 | struct PeerConnection *connection_iter; |
760 | struct GNUNET_CRYPTO_HashAsciiEncoded peer_enc; | 745 | struct GNUNET_CRYPTO_HashAsciiEncoded peer_enc; |
761 | char *temp_service_path; | 746 | char *temp_service_path; |
762 | pid_t pid; | 747 | pid_t *pidarr; |
763 | char *arg; | 748 | char *arg; |
764 | struct GNUNET_PeerIdentity *temppeer; | 749 | struct GNUNET_PeerIdentity *temppeer; |
765 | char * mytemp; | 750 | char * mytemp; |
751 | enum GNUNET_OS_ProcessStatusType type; | ||
752 | unsigned long return_code; | ||
753 | int count; | ||
754 | int ret; | ||
755 | int max_wait = 10; | ||
766 | 756 | ||
757 | pidarr = GNUNET_malloc(sizeof(pid_t) * pg->total); | ||
767 | for (pg_iter = 0; pg_iter < pg->total; pg_iter++) | 758 | for (pg_iter = 0; pg_iter < pg->total; pg_iter++) |
768 | { | 759 | { |
769 | mytemp = GNUNET_DISK_mktemp("friends"); | 760 | mytemp = GNUNET_DISK_mktemp("friends"); |
@@ -794,12 +785,13 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) | |||
794 | if (pg->peers[pg_iter].daemon->hostname == NULL) /* Local, just copy the file */ | 785 | if (pg->peers[pg_iter].daemon->hostname == NULL) /* Local, just copy the file */ |
795 | { | 786 | { |
796 | GNUNET_asprintf (&arg, "%s/friends", temp_service_path); | 787 | GNUNET_asprintf (&arg, "%s/friends", temp_service_path); |
797 | pid = GNUNET_OS_start_process (NULL, NULL, "mv", | 788 | pidarr[pg_iter] = GNUNET_OS_start_process (NULL, NULL, "mv", |
798 | "mv", mytemp, arg, NULL); | 789 | "mv", mytemp, arg, NULL); |
799 | #if VERBOSE_TESTING | 790 | #if VERBOSE_TESTING |
800 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 791 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
801 | _("Copying file with command cp %s %s\n"), mytemp, arg); | 792 | _("Copying file with command cp %s %s\n"), mytemp, arg); |
802 | #endif | 793 | #endif |
794 | |||
803 | GNUNET_free(arg); | 795 | GNUNET_free(arg); |
804 | } | 796 | } |
805 | else /* Remote, scp the file to the correct place */ | 797 | else /* Remote, scp the file to the correct place */ |
@@ -808,8 +800,9 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) | |||
808 | GNUNET_asprintf (&arg, "%s@%s:%s/friends", pg->peers[pg_iter].daemon->username, pg->peers[pg_iter].daemon->hostname, temp_service_path); | 800 | GNUNET_asprintf (&arg, "%s@%s:%s/friends", pg->peers[pg_iter].daemon->username, pg->peers[pg_iter].daemon->hostname, temp_service_path); |
809 | else | 801 | else |
810 | GNUNET_asprintf (&arg, "%s:%s/friends", pg->peers[pg_iter].daemon->hostname, temp_service_path); | 802 | GNUNET_asprintf (&arg, "%s:%s/friends", pg->peers[pg_iter].daemon->hostname, temp_service_path); |
811 | pid = GNUNET_OS_start_process (NULL, NULL, "scp", | 803 | pidarr[pg_iter] = GNUNET_OS_start_process (NULL, NULL, "scp", |
812 | "scp", mytemp, arg, NULL); | 804 | "scp", mytemp, arg, NULL); |
805 | |||
813 | #if VERBOSE_TESTING | 806 | #if VERBOSE_TESTING |
814 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 807 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
815 | _("Copying file with command scp %s %s\n"), mytemp, arg); | 808 | _("Copying file with command scp %s %s\n"), mytemp, arg); |
@@ -819,6 +812,47 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) | |||
819 | GNUNET_free (temp_service_path); | 812 | GNUNET_free (temp_service_path); |
820 | GNUNET_free (mytemp); | 813 | GNUNET_free (mytemp); |
821 | } | 814 | } |
815 | |||
816 | count = 0; | ||
817 | ret = GNUNET_SYSERR; | ||
818 | while ((count < max_wait) && (ret != GNUNET_OK)) | ||
819 | { | ||
820 | ret = GNUNET_OK; | ||
821 | for (pg_iter = 0; pg_iter < pg->total; pg_iter++) | ||
822 | { | ||
823 | #if VERBOSE_TESTING | ||
824 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
825 | _("Checking copy status of file %d\n"), pg_iter); | ||
826 | #endif | ||
827 | if (pidarr[pg_iter] != 0) /* Check for already completed! */ | ||
828 | { | ||
829 | if (GNUNET_OS_process_status(pidarr[pg_iter], &type, &return_code) != GNUNET_OK) | ||
830 | { | ||
831 | ret = GNUNET_SYSERR; | ||
832 | } | ||
833 | else if ((type != GNUNET_OS_PROCESS_EXITED) || (return_code != 0)) | ||
834 | { | ||
835 | ret = GNUNET_SYSERR; | ||
836 | } | ||
837 | else | ||
838 | { | ||
839 | pidarr[pg_iter] = 0; | ||
840 | #if VERBOSE_TESTING | ||
841 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
842 | _("File %d copied\n"), pg_iter); | ||
843 | #endif | ||
844 | } | ||
845 | } | ||
846 | } | ||
847 | count++; | ||
848 | if (ret == GNUNET_SYSERR) | ||
849 | { | ||
850 | sleep(1); | ||
851 | } | ||
852 | } | ||
853 | |||
854 | GNUNET_free(pidarr); | ||
855 | return ret; | ||
822 | } | 856 | } |
823 | 857 | ||
824 | 858 | ||
@@ -834,7 +868,9 @@ connect_topology (struct GNUNET_TESTING_PeerGroup *pg) | |||
834 | { | 868 | { |
835 | unsigned int pg_iter; | 869 | unsigned int pg_iter; |
836 | struct PeerConnection *connection_iter; | 870 | struct PeerConnection *connection_iter; |
871 | int connect_count; | ||
837 | 872 | ||
873 | connect_count = 0; | ||
838 | for (pg_iter = 0; pg_iter < pg->total; pg_iter++) | 874 | for (pg_iter = 0; pg_iter < pg->total; pg_iter++) |
839 | { | 875 | { |
840 | connection_iter = pg->peers[pg_iter].connected_peers; | 876 | connection_iter = pg->peers[pg_iter].connected_peers; |
@@ -846,6 +882,15 @@ connect_topology (struct GNUNET_TESTING_PeerGroup *pg) | |||
846 | pg->notify_connection, | 882 | pg->notify_connection, |
847 | pg->notify_connection_cls); | 883 | pg->notify_connection_cls); |
848 | connection_iter = connection_iter->next; | 884 | connection_iter = connection_iter->next; |
885 | connect_count++; | ||
886 | if (connect_count % 50 == 0) | ||
887 | { | ||
888 | #if VERBOSE_TESTING | ||
889 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
890 | _("Sleeping to give peers a chance to connect!\n")); | ||
891 | #endif | ||
892 | sleep(2); | ||
893 | } | ||
849 | } | 894 | } |
850 | } | 895 | } |
851 | } | 896 | } |
@@ -860,12 +905,16 @@ connect_topology (struct GNUNET_TESTING_PeerGroup *pg) | |||
860 | * | 905 | * |
861 | * @param pg the peer group struct representing the running peers | 906 | * @param pg the peer group struct representing the running peers |
862 | * | 907 | * |
908 | * @return the number of connections should be created by the topology, so the | ||
909 | * caller knows how many to wait for (if it so chooses) | ||
910 | * | ||
863 | */ | 911 | */ |
864 | int | 912 | int |
865 | GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg) | 913 | GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg) |
866 | { | 914 | { |
867 | unsigned long long topology_num; | 915 | unsigned long long topology_num; |
868 | int ret; | 916 | int ret; |
917 | int num_connections; | ||
869 | 918 | ||
870 | GNUNET_assert (pg->notify_connection != NULL); | 919 | GNUNET_assert (pg->notify_connection != NULL); |
871 | ret = 0; | 920 | ret = 0; |
@@ -880,62 +929,72 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg) | |||
880 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 929 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
881 | _("Creating clique topology (may take a bit!)\n")); | 930 | _("Creating clique topology (may take a bit!)\n")); |
882 | #endif | 931 | #endif |
883 | ret = create_clique (pg); | 932 | num_connections = create_clique (pg); |
884 | break; | 933 | break; |
885 | case GNUNET_TESTING_TOPOLOGY_SMALL_WORLD_RING: | 934 | case GNUNET_TESTING_TOPOLOGY_SMALL_WORLD_RING: |
886 | #if VERBOSE_TESTING | 935 | #if VERBOSE_TESTING |
887 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 936 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
888 | _("Creating small world (ring) topology (may take a bit!)\n")); | 937 | _("Creating small world (ring) topology (may take a bit!)\n")); |
889 | #endif | 938 | #endif |
890 | ret = create_small_world_ring (pg); | 939 | num_connections = create_small_world_ring (pg); |
891 | break; | 940 | break; |
892 | case GNUNET_TESTING_TOPOLOGY_SMALL_WORLD: | 941 | case GNUNET_TESTING_TOPOLOGY_SMALL_WORLD: |
893 | #if VERBOSE_TESTING | 942 | #if VERBOSE_TESTING |
894 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 943 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
895 | _("Creating small world (2d-torus) topology (may take a bit!)\n")); | 944 | _("Creating small world (2d-torus) topology (may take a bit!)\n")); |
896 | #endif | 945 | #endif |
897 | ret = create_small_world (pg); | 946 | num_connections = create_small_world (pg); |
898 | break; | 947 | break; |
899 | case GNUNET_TESTING_TOPOLOGY_RING: | 948 | case GNUNET_TESTING_TOPOLOGY_RING: |
900 | #if VERBOSE_TESTING | 949 | #if VERBOSE_TESTING |
901 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 950 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
902 | _("Creating ring topology (may take a bit!)\n")); | 951 | _("Creating ring topology (may take a bit!)\n")); |
903 | #endif | 952 | #endif |
904 | ret = create_ring (pg); | 953 | num_connections = create_ring (pg); |
905 | break; | 954 | break; |
906 | case GNUNET_TESTING_TOPOLOGY_2D_TORUS: | 955 | case GNUNET_TESTING_TOPOLOGY_2D_TORUS: |
907 | #if VERBOSE_TESTING | 956 | #if VERBOSE_TESTING |
908 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 957 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
909 | _("Creating 2d torus topology (may take a bit!)\n")); | 958 | _("Creating 2d torus topology (may take a bit!)\n")); |
910 | #endif | 959 | #endif |
911 | ret = create_2d_torus (pg); | 960 | num_connections = create_2d_torus (pg); |
912 | break; | 961 | break; |
913 | case GNUNET_TESTING_TOPOLOGY_ERDOS_RENYI: | 962 | case GNUNET_TESTING_TOPOLOGY_ERDOS_RENYI: |
914 | #if VERBOSE_TESTING | 963 | #if VERBOSE_TESTING |
915 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 964 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
916 | _("Creating Erdos-Renyi topology (may take a bit!)\n")); | 965 | _("Creating Erdos-Renyi topology (may take a bit!)\n")); |
917 | #endif | 966 | #endif |
918 | ret = create_erdos_renyi (pg); | 967 | num_connections = create_erdos_renyi (pg); |
919 | break; | 968 | break; |
920 | case GNUNET_TESTING_TOPOLOGY_INTERNAT: | 969 | case GNUNET_TESTING_TOPOLOGY_INTERNAT: |
921 | #if VERBOSE_TESTING | 970 | #if VERBOSE_TESTING |
922 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 971 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
923 | _("Creating InterNAT topology (may take a bit!)\n")); | 972 | _("Creating InterNAT topology (may take a bit!)\n")); |
924 | #endif | 973 | #endif |
925 | ret = create_nated_internet (pg); | 974 | num_connections = create_nated_internet (pg); |
926 | break; | 975 | break; |
927 | case GNUNET_TESTING_TOPOLOGY_NONE: | 976 | case GNUNET_TESTING_TOPOLOGY_NONE: |
928 | ret = 0; | 977 | num_connections = 0; |
929 | break; | 978 | break; |
930 | default: | 979 | default: |
931 | ret = GNUNET_SYSERR; | 980 | ret = GNUNET_SYSERR; |
932 | break; | 981 | break; |
933 | } | 982 | } |
983 | if (num_connections < 1) | ||
984 | return GNUNET_SYSERR; | ||
934 | 985 | ||
935 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (pg->cfg, "TESTING", "F2F")) | 986 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (pg->cfg, "TESTING", "F2F")) |
936 | create_and_copy_friend_files(pg); | 987 | ret = create_and_copy_friend_files(pg); |
937 | 988 | if (ret == GNUNET_OK) | |
938 | connect_topology(pg); | 989 | connect_topology(pg); |
990 | else | ||
991 | { | ||
992 | #if VERBOSE_TESTING | ||
993 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
994 | _("Failed during friend file copying!\n")); | ||
995 | #endif | ||
996 | return GNUNET_SYSERR; | ||
997 | } | ||
939 | } | 998 | } |
940 | else | 999 | else |
941 | { | 1000 | { |
@@ -943,7 +1002,7 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg) | |||
943 | _("No topology specified, was one intended?\n")); | 1002 | _("No topology specified, was one intended?\n")); |
944 | } | 1003 | } |
945 | 1004 | ||
946 | return ret; | 1005 | return num_connections; |
947 | } | 1006 | } |
948 | 1007 | ||
949 | /** | 1008 | /** |
@@ -1126,6 +1185,8 @@ void | |||
1126 | GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg) | 1185 | GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg) |
1127 | { | 1186 | { |
1128 | unsigned int off; | 1187 | unsigned int off; |
1188 | struct PeerConnection *pos; | ||
1189 | struct PeerConnection *next; | ||
1129 | 1190 | ||
1130 | for (off = 0; off < pg->total; off++) | 1191 | for (off = 0; off < pg->total; off++) |
1131 | { | 1192 | { |
@@ -1138,6 +1199,15 @@ GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg) | |||
1138 | GNUNET_TESTING_daemon_stop (pg->peers[off].daemon, NULL, NULL); | 1199 | GNUNET_TESTING_daemon_stop (pg->peers[off].daemon, NULL, NULL); |
1139 | if (NULL != pg->peers[off].cfg) | 1200 | if (NULL != pg->peers[off].cfg) |
1140 | GNUNET_CONFIGURATION_destroy (pg->peers[off].cfg); | 1201 | GNUNET_CONFIGURATION_destroy (pg->peers[off].cfg); |
1202 | |||
1203 | pos = pg->peers[off].connected_peers; | ||
1204 | while (pos != NULL) | ||
1205 | { | ||
1206 | next = pos->next; | ||
1207 | GNUNET_free(pos); | ||
1208 | pos = next; | ||
1209 | } | ||
1210 | |||
1141 | } | 1211 | } |
1142 | GNUNET_free (pg->peers); | 1212 | GNUNET_free (pg->peers); |
1143 | if (NULL != pg->hosts) | 1213 | if (NULL != pg->hosts) |