diff options
Diffstat (limited to 'src/transport/test_plugin_transport_http.c')
-rw-r--r-- | src/transport/test_plugin_transport_http.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index a178f16a0..7da64e295 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c | |||
@@ -232,11 +232,6 @@ static long long unsigned int port; | |||
232 | static char * test_addr; | 232 | static char * test_addr; |
233 | 233 | ||
234 | /** | 234 | /** |
235 | * Our scheduler. | ||
236 | */ | ||
237 | struct GNUNET_SCHEDULER_Handle *sched; | ||
238 | |||
239 | /** | ||
240 | * Our statistics handle. | 235 | * Our statistics handle. |
241 | */ | 236 | */ |
242 | struct GNUNET_STATISTICS_Handle *stats; | 237 | struct GNUNET_STATISTICS_Handle *stats; |
@@ -446,19 +441,19 @@ shutdown_clean () | |||
446 | 441 | ||
447 | if (ti_send != GNUNET_SCHEDULER_NO_TASK) | 442 | if (ti_send != GNUNET_SCHEDULER_NO_TASK) |
448 | { | 443 | { |
449 | GNUNET_SCHEDULER_cancel(sched,ti_send); | 444 | GNUNET_SCHEDULER_cancel(ti_send); |
450 | ti_send = GNUNET_SCHEDULER_NO_TASK; | 445 | ti_send = GNUNET_SCHEDULER_NO_TASK; |
451 | } | 446 | } |
452 | 447 | ||
453 | if (http_task_send != GNUNET_SCHEDULER_NO_TASK) | 448 | if (http_task_send != GNUNET_SCHEDULER_NO_TASK) |
454 | { | 449 | { |
455 | GNUNET_SCHEDULER_cancel(sched,http_task_send); | 450 | GNUNET_SCHEDULER_cancel(http_task_send); |
456 | http_task_send = GNUNET_SCHEDULER_NO_TASK; | 451 | http_task_send = GNUNET_SCHEDULER_NO_TASK; |
457 | } | 452 | } |
458 | 453 | ||
459 | if (ti_timeout != GNUNET_SCHEDULER_NO_TASK) | 454 | if (ti_timeout != GNUNET_SCHEDULER_NO_TASK) |
460 | { | 455 | { |
461 | GNUNET_SCHEDULER_cancel(sched,ti_timeout); | 456 | GNUNET_SCHEDULER_cancel(ti_timeout); |
462 | ti_timeout = GNUNET_SCHEDULER_NO_TASK; | 457 | ti_timeout = GNUNET_SCHEDULER_NO_TASK; |
463 | } | 458 | } |
464 | 459 | ||
@@ -466,7 +461,7 @@ shutdown_clean () | |||
466 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Unloading http plugin\n"); | 461 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Unloading http plugin\n"); |
467 | GNUNET_assert (NULL == GNUNET_PLUGIN_unload ("libgnunet_plugin_transport_http", api)); | 462 | GNUNET_assert (NULL == GNUNET_PLUGIN_unload ("libgnunet_plugin_transport_http", api)); |
468 | 463 | ||
469 | GNUNET_SCHEDULER_shutdown(sched); | 464 | GNUNET_SCHEDULER_shutdown(); |
470 | GNUNET_DISK_directory_remove ("/tmp/test_plugin_transport_http"); | 465 | GNUNET_DISK_directory_remove ("/tmp/test_plugin_transport_http"); |
471 | 466 | ||
472 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting testcase\n"); | 467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting testcase\n"); |
@@ -781,8 +776,7 @@ static size_t send_prepare( struct HTTP_Transfer * result) | |||
781 | gws = GNUNET_NETWORK_fdset_create (); | 776 | gws = GNUNET_NETWORK_fdset_create (); |
782 | GNUNET_NETWORK_fdset_copy_native (grs, &rs, max + 1); | 777 | GNUNET_NETWORK_fdset_copy_native (grs, &rs, max + 1); |
783 | GNUNET_NETWORK_fdset_copy_native (gws, &ws, max + 1); | 778 | GNUNET_NETWORK_fdset_copy_native (gws, &ws, max + 1); |
784 | http_task_send = GNUNET_SCHEDULER_add_select (sched, | 779 | http_task_send = GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT, |
785 | GNUNET_SCHEDULER_PRIORITY_DEFAULT, | ||
786 | GNUNET_SCHEDULER_NO_TASK, | 780 | GNUNET_SCHEDULER_NO_TASK, |
787 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 0), | 781 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 0), |
788 | grs, | 782 | grs, |
@@ -907,7 +901,6 @@ static void | |||
907 | setup_plugin_environment () | 901 | setup_plugin_environment () |
908 | { | 902 | { |
909 | env.cfg = cfg; | 903 | env.cfg = cfg; |
910 | env.sched = sched; | ||
911 | env.stats = stats; | 904 | env.stats = stats; |
912 | env.my_identity = &my_identity; | 905 | env.my_identity = &my_identity; |
913 | env.cls = &env; | 906 | env.cls = &env; |
@@ -1123,17 +1116,14 @@ static void run_connection_tests( int phase , void * cls) | |||
1123 | * Runs the test. | 1116 | * Runs the test. |
1124 | * | 1117 | * |
1125 | * @param cls closure | 1118 | * @param cls closure |
1126 | * @param s scheduler to use | ||
1127 | * @param c configuration to use | 1119 | * @param c configuration to use |
1128 | */ | 1120 | */ |
1129 | static void | 1121 | static void |
1130 | run (void *cls, | 1122 | run (void *cls, |
1131 | struct GNUNET_SCHEDULER_Handle *s, | ||
1132 | char *const *args, | 1123 | char *const *args, |
1133 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) | 1124 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
1134 | { | 1125 | { |
1135 | char * libname; | 1126 | char * libname; |
1136 | sched = s; | ||
1137 | cfg = c; | 1127 | cfg = c; |
1138 | char *keyfile; | 1128 | char *keyfile; |
1139 | unsigned long long tneigh; | 1129 | unsigned long long tneigh; |
@@ -1223,7 +1213,7 @@ run (void *cls, | |||
1223 | } | 1213 | } |
1224 | 1214 | ||
1225 | 1215 | ||
1226 | ti_timeout = GNUNET_SCHEDULER_add_delayed (sched, TEST_TIMEOUT, &task_timeout, NULL); | 1216 | ti_timeout = GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &task_timeout, NULL); |
1227 | 1217 | ||
1228 | /* testing plugin functionality */ | 1218 | /* testing plugin functionality */ |
1229 | GNUNET_assert (0!=fail_notify_address_count); | 1219 | GNUNET_assert (0!=fail_notify_address_count); |