diff options
Diffstat (limited to 'src/peerinfo/test_peerinfo_api.c')
-rw-r--r-- | src/peerinfo/test_peerinfo_api.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/peerinfo/test_peerinfo_api.c b/src/peerinfo/test_peerinfo_api.c index 10ea1fa81..3fa622f50 100644 --- a/src/peerinfo/test_peerinfo_api.c +++ b/src/peerinfo/test_peerinfo_api.c | |||
@@ -40,7 +40,7 @@ static struct GNUNET_SCHEDULER_Handle *sched; | |||
40 | 40 | ||
41 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 41 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
42 | 42 | ||
43 | static struct GNUNET_PEERINFO_NewIteratorContext *ic; | 43 | static struct GNUNET_PEERINFO_IteratorContext *ic; |
44 | 44 | ||
45 | static struct GNUNET_PEERINFO_Handle *h; | 45 | static struct GNUNET_PEERINFO_Handle *h; |
46 | 46 | ||
@@ -93,7 +93,7 @@ add_peer () | |||
93 | memset (&pkey, 32, sizeof (pkey)); | 93 | memset (&pkey, 32, sizeof (pkey)); |
94 | GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey); | 94 | GNUNET_CRYPTO_hash (&pkey, sizeof (pkey), &pid.hashPubKey); |
95 | h2 = GNUNET_HELLO_create (&pkey, &address_generator, &agc); | 95 | h2 = GNUNET_HELLO_create (&pkey, &address_generator, &agc); |
96 | GNUNET_PEERINFO_add_peer_new (h, h2); | 96 | GNUNET_PEERINFO_add_peer (h, h2); |
97 | GNUNET_free (h2); | 97 | GNUNET_free (h2); |
98 | 98 | ||
99 | } | 99 | } |
@@ -116,12 +116,12 @@ process (void *cls, | |||
116 | /* try again */ | 116 | /* try again */ |
117 | retries++; | 117 | retries++; |
118 | add_peer (); | 118 | add_peer (); |
119 | ic = GNUNET_PEERINFO_iterate_new (h, | 119 | ic = GNUNET_PEERINFO_iterate (h, |
120 | NULL, | 120 | NULL, |
121 | 0, | 121 | 0, |
122 | GNUNET_TIME_relative_multiply | 122 | GNUNET_TIME_relative_multiply |
123 | (GNUNET_TIME_UNIT_SECONDS, 15), | 123 | (GNUNET_TIME_UNIT_SECONDS, 15), |
124 | &process, cls); | 124 | &process, cls); |
125 | return; | 125 | return; |
126 | } | 126 | } |
127 | GNUNET_assert (peer == NULL); | 127 | GNUNET_assert (peer == NULL); |
@@ -152,14 +152,14 @@ run (void *cls, | |||
152 | { | 152 | { |
153 | sched = s; | 153 | sched = s; |
154 | cfg = c; | 154 | cfg = c; |
155 | h = GNUNET_PEERINFO_connect (cfg, sched); | 155 | h = GNUNET_PEERINFO_connect (sched, cfg); |
156 | add_peer (); | 156 | add_peer (); |
157 | ic = GNUNET_PEERINFO_iterate_new (h, | 157 | ic = GNUNET_PEERINFO_iterate (h, |
158 | NULL, | 158 | NULL, |
159 | 0, | 159 | 0, |
160 | GNUNET_TIME_relative_multiply | 160 | GNUNET_TIME_relative_multiply |
161 | (GNUNET_TIME_UNIT_SECONDS, 15), | 161 | (GNUNET_TIME_UNIT_SECONDS, 15), |
162 | &process, cls); | 162 | &process, cls); |
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||