diff options
-rw-r--r-- | src/pt/test_gns_vpn.c | 2 | ||||
-rw-r--r-- | src/pt/test_gns_vpn.conf | 3 | ||||
-rw-r--r-- | src/pt/test_gnunet_vpn.c | 22 |
3 files changed, 11 insertions, 16 deletions
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index e030842b5..40c32d27a 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -322,7 +322,7 @@ commence_testing (void *cls, | |||
322 | } | 322 | } |
323 | /* wait a little bit before downloading, as we just created the record */ | 323 | /* wait a little bit before downloading, as we just created the record */ |
324 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 324 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
325 | (GNUNET_TIME_UNIT_SECONDS, 5), | 325 | (GNUNET_TIME_UNIT_SECONDS, 1), |
326 | &start_curl, | 326 | &start_curl, |
327 | NULL); | 327 | NULL); |
328 | } | 328 | } |
diff --git a/src/pt/test_gns_vpn.conf b/src/pt/test_gns_vpn.conf index 2a683ca7f..ac9724c04 100644 --- a/src/pt/test_gns_vpn.conf +++ b/src/pt/test_gns_vpn.conf | |||
@@ -35,6 +35,9 @@ FORCESTART = YES | |||
35 | AUTOSTART = NO | 35 | AUTOSTART = NO |
36 | FORCESTART = NO | 36 | FORCESTART = NO |
37 | 37 | ||
38 | #[vpn] | ||
39 | #PREFIX = valgrind | ||
40 | |||
38 | [nse] | 41 | [nse] |
39 | WORKBITS = 1 | 42 | WORKBITS = 1 |
40 | 43 | ||
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index 3f252cb46..eb90abf8f 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c | |||
@@ -167,19 +167,8 @@ do_shutdown () | |||
167 | * Function to run the HTTP client. | 167 | * Function to run the HTTP client. |
168 | */ | 168 | */ |
169 | static void | 169 | static void |
170 | curl_main (void); | 170 | curl_main (void *cls, |
171 | 171 | const struct GNUNET_SCHEDULER_TaskContext *tc) | |
172 | |||
173 | static void | ||
174 | curl_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
175 | { | ||
176 | curl_task_id = NULL; | ||
177 | curl_main (); | ||
178 | } | ||
179 | |||
180 | |||
181 | static void | ||
182 | curl_main () | ||
183 | { | 172 | { |
184 | fd_set rs; | 173 | fd_set rs; |
185 | fd_set ws; | 174 | fd_set ws; |
@@ -192,6 +181,7 @@ curl_main () | |||
192 | int running; | 181 | int running; |
193 | struct CURLMsg *msg; | 182 | struct CURLMsg *msg; |
194 | 183 | ||
184 | curl_task_id = NULL; | ||
195 | max = 0; | 185 | max = 0; |
196 | FD_ZERO (&rs); | 186 | FD_ZERO (&rs); |
197 | FD_ZERO (&ws); | 187 | FD_ZERO (&ws); |
@@ -241,7 +231,7 @@ curl_main () | |||
241 | GNUNET_NETWORK_fdset_copy_native (&nws, &ws, max + 1); | 231 | GNUNET_NETWORK_fdset_copy_native (&nws, &ws, max + 1); |
242 | curl_task_id = | 232 | curl_task_id = |
243 | GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT, delay, | 233 | GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT, delay, |
244 | &nrs, &nws, &curl_task, NULL); | 234 | &nrs, &nws, &curl_main, NULL); |
245 | } | 235 | } |
246 | 236 | ||
247 | 237 | ||
@@ -296,7 +286,9 @@ allocation_cb (void *cls, int af, const void *address) | |||
296 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
297 | "Beginning HTTP download from `%s'\n", | 287 | "Beginning HTTP download from `%s'\n", |
298 | url); | 288 | url); |
299 | curl_main (); | 289 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
290 | &curl_main, | ||
291 | NULL); | ||
300 | } | 292 | } |
301 | 293 | ||
302 | 294 | ||