diff options
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist_client.c')
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist_client.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c index e0a73f0f0..dbf6eaeda 100644 --- a/src/hostlist/gnunet-daemon-hostlist_client.c +++ b/src/hostlist/gnunet-daemon-hostlist_client.c | |||
@@ -774,8 +774,7 @@ clean_up () | |||
774 | * @param tc task context, unused | 774 | * @param tc task context, unused |
775 | */ | 775 | */ |
776 | static void | 776 | static void |
777 | task_download (void *cls, | 777 | task_download (void *cls); |
778 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
779 | 778 | ||
780 | 779 | ||
781 | /** | 780 | /** |
@@ -841,17 +840,17 @@ download_prepare () | |||
841 | * server. | 840 | * server. |
842 | * | 841 | * |
843 | * @param cls closure, unused | 842 | * @param cls closure, unused |
844 | * @param tc task context, unused | ||
845 | */ | 843 | */ |
846 | static void | 844 | static void |
847 | task_download (void *cls, | 845 | task_download (void *cls) |
848 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
849 | { | 846 | { |
850 | int running; | 847 | int running; |
851 | struct CURLMsg *msg; | 848 | struct CURLMsg *msg; |
852 | CURLMcode mret; | 849 | CURLMcode mret; |
850 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
853 | 851 | ||
854 | ti_download = NULL; | 852 | ti_download = NULL; |
853 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
855 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 854 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
856 | { | 855 | { |
857 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 856 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1046,10 +1045,12 @@ download_hostlist () | |||
1046 | 1045 | ||
1047 | 1046 | ||
1048 | static void | 1047 | static void |
1049 | task_download_dispatcher (void *cls, | 1048 | task_download_dispatcher (void *cls) |
1050 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1051 | { | 1049 | { |
1050 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1051 | |||
1052 | ti_download_dispatcher_task = NULL; | 1052 | ti_download_dispatcher_task = NULL; |
1053 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1053 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1054 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1054 | return; | 1055 | return; |
1055 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Download is initiated...\n"); | 1056 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Download is initiated...\n"); |
@@ -1075,12 +1076,14 @@ task_download_dispatcher (void *cls, | |||
1075 | * this task again for a later time. | 1076 | * this task again for a later time. |
1076 | */ | 1077 | */ |
1077 | static void | 1078 | static void |
1078 | task_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1079 | task_check (void *cls) |
1079 | { | 1080 | { |
1080 | static int once; | 1081 | static int once; |
1081 | struct GNUNET_TIME_Relative delay; | 1082 | struct GNUNET_TIME_Relative delay; |
1083 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1082 | 1084 | ||
1083 | ti_check_download = NULL; | 1085 | ti_check_download = NULL; |
1086 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1084 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1087 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1085 | return; | 1088 | return; |
1086 | if (stats == NULL) | 1089 | if (stats == NULL) |
@@ -1125,13 +1128,14 @@ task_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1125 | * This tasks sets hostlist testing to allowed after intervall between to testings is reached | 1128 | * This tasks sets hostlist testing to allowed after intervall between to testings is reached |
1126 | * | 1129 | * |
1127 | * @param cls closure | 1130 | * @param cls closure |
1128 | * @param tc TaskContext | ||
1129 | */ | 1131 | */ |
1130 | static void | 1132 | static void |
1131 | task_testing_intervall_reset (void *cls, | 1133 | task_testing_intervall_reset (void *cls) |
1132 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1133 | { | 1134 | { |
1135 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1136 | |||
1134 | ti_testing_intervall_task = NULL; | 1137 | ti_testing_intervall_task = NULL; |
1138 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1135 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1139 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1136 | return; | 1140 | return; |
1137 | stat_testing_allowed = GNUNET_OK; | 1141 | stat_testing_allowed = GNUNET_OK; |
@@ -1144,12 +1148,14 @@ task_testing_intervall_reset (void *cls, | |||
1144 | * Task that writes hostlist entries to a file on a regular base | 1148 | * Task that writes hostlist entries to a file on a regular base |
1145 | * | 1149 | * |
1146 | * @param cls closure | 1150 | * @param cls closure |
1147 | * @param tc TaskContext | ||
1148 | */ | 1151 | */ |
1149 | static void | 1152 | static void |
1150 | task_hostlist_saving (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1153 | task_hostlist_saving (void *cls) |
1151 | { | 1154 | { |
1155 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
1156 | |||
1152 | ti_saving_task = NULL; | 1157 | ti_saving_task = NULL; |
1158 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
1153 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1159 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1154 | return; | 1160 | return; |
1155 | save_hostlist_file (GNUNET_NO); | 1161 | save_hostlist_file (GNUNET_NO); |