diff options
author | Bart Polot <bart@net.in.tum.de> | 2016-07-20 12:07:05 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2016-07-20 12:07:05 +0000 |
commit | dbb12b0c0216846ec0cfa30ed2760c221434eaee (patch) | |
tree | 140b649ad916e45f17faa42a5ba5cdf3563b2e52 /src/cadet/gnunet-cadet-profiler.c | |
parent | caa4196867da8684c5b1fd2e747ecb9d21cbba8b (diff) | |
download | gnunet-dbb12b0c0216846ec0cfa30ed2760c221434eaee.tar.gz gnunet-dbb12b0c0216846ec0cfa30ed2760c221434eaee.zip |
- adapt test cases / framework to new port system
Diffstat (limited to 'src/cadet/gnunet-cadet-profiler.c')
-rw-r--r-- | src/cadet/gnunet-cadet-profiler.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c index 65e8f3219..d688dc60b 100644 --- a/src/cadet/gnunet-cadet-profiler.c +++ b/src/cadet/gnunet-cadet-profiler.c | |||
@@ -816,7 +816,8 @@ static struct GNUNET_CADET_MessageHandler handlers[] = { | |||
816 | static void * | 816 | static void * |
817 | incoming_channel (void *cls, struct GNUNET_CADET_Channel *channel, | 817 | incoming_channel (void *cls, struct GNUNET_CADET_Channel *channel, |
818 | const struct GNUNET_PeerIdentity *initiator, | 818 | const struct GNUNET_PeerIdentity *initiator, |
819 | uint32_t port, enum GNUNET_CADET_ChannelOption options) | 819 | const struct GNUNET_HashCode *port, |
820 | enum GNUNET_CADET_ChannelOption options) | ||
820 | { | 821 | { |
821 | long n = (long) cls; | 822 | long n = (long) cls; |
822 | struct CadetPeer *peer; | 823 | struct CadetPeer *peer; |
@@ -921,7 +922,7 @@ start_test (void *cls) | |||
921 | peers[i].dest = select_random_peer (&peers[i]); | 922 | peers[i].dest = select_random_peer (&peers[i]); |
922 | peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL, | 923 | peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL, |
923 | &peers[i].dest->id, | 924 | &peers[i].dest->id, |
924 | 1, flags); | 925 | GC_u2h (1), flags); |
925 | if (NULL == peers[i].ch) | 926 | if (NULL == peers[i].ch) |
926 | { | 927 | { |
927 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i); | 928 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i); |
@@ -966,7 +967,7 @@ warmup (void) | |||
966 | i, get_index (peer)); | 967 | i, get_index (peer)); |
967 | peers[i].warmup_ch = | 968 | peers[i].warmup_ch = |
968 | GNUNET_CADET_channel_create (peers[i].cadet, NULL, &peer->id, | 969 | GNUNET_CADET_channel_create (peers[i].cadet, NULL, &peer->id, |
969 | 1, GNUNET_CADET_OPTION_DEFAULT); | 970 | GC_u2h (1), GNUNET_CADET_OPTION_DEFAULT); |
970 | if (NULL == peers[i].warmup_ch) | 971 | if (NULL == peers[i].warmup_ch) |
971 | { | 972 | { |
972 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Warmup %u failed\n", i); | 973 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Warmup %u failed\n", i); |
@@ -1083,7 +1084,7 @@ tmain (void *cls, | |||
1083 | int | 1084 | int |
1084 | main (int argc, char *argv[]) | 1085 | main (int argc, char *argv[]) |
1085 | { | 1086 | { |
1086 | static uint32_t ports[2]; | 1087 | static const struct GNUNET_HashCode *ports[2]; |
1087 | const char *config_file; | 1088 | const char *config_file; |
1088 | 1089 | ||
1089 | config_file = ".profiler.conf"; | 1090 | config_file = ".profiler.conf"; |
@@ -1135,7 +1136,7 @@ main (int argc, char *argv[]) | |||
1135 | GNUNET_assert (NULL != ids); | 1136 | GNUNET_assert (NULL != ids); |
1136 | p_ids = 0; | 1137 | p_ids = 0; |
1137 | test_finished = GNUNET_NO; | 1138 | test_finished = GNUNET_NO; |
1138 | ports[0] = 1; | 1139 | ports[0] = GC_u2h (1); |
1139 | ports[1] = 0; | 1140 | ports[1] = 0; |
1140 | GNUNET_CADET_TEST_run ("cadet-profiler", config_file, peers_total, | 1141 | GNUNET_CADET_TEST_run ("cadet-profiler", config_file, peers_total, |
1141 | &tmain, NULL, /* tmain cls */ | 1142 | &tmain, NULL, /* tmain cls */ |