diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
commit | 29e6158507a0758192075ac6ece7ba8e75ddc49a (patch) | |
tree | b91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/consensus | |
parent | 5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff) | |
download | gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip |
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/consensus')
-rw-r--r-- | src/consensus/gnunet-consensus-profiler.c | 7 | ||||
-rw-r--r-- | src/consensus/gnunet-service-consensus.c | 4 | ||||
-rw-r--r-- | src/consensus/test_consensus_api.c | 5 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c index 355ae60a3..4af7740e7 100644 --- a/src/consensus/gnunet-consensus-profiler.c +++ b/src/consensus/gnunet-consensus-profiler.c | |||
@@ -120,8 +120,8 @@ statistics_done_db (void *cls, | |||
120 | * @param subsystem name of subsystem that created the statistic | 120 | * @param subsystem name of subsystem that created the statistic |
121 | * @param name the name of the datum | 121 | * @param name the name of the datum |
122 | * @param value the current value | 122 | * @param value the current value |
123 | * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not | 123 | * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if not |
124 | * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration | 124 | * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration |
125 | */ | 125 | */ |
126 | static int | 126 | static int |
127 | statistics_cb (void *cls, | 127 | statistics_cb (void *cls, |
@@ -140,7 +140,7 @@ statistics_cb (void *cls, | |||
140 | 140 | ||
141 | 141 | ||
142 | static void | 142 | static void |
143 | destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *ctx) | 143 | destroy (void *cls) |
144 | { | 144 | { |
145 | struct GNUNET_CONSENSUS_Handle *consensus = cls; | 145 | struct GNUNET_CONSENSUS_Handle *consensus = cls; |
146 | 146 | ||
@@ -521,4 +521,3 @@ main (int argc, char **argv) | |||
521 | options, &run, NULL, GNUNET_YES); | 521 | options, &run, NULL, GNUNET_YES); |
522 | return 0; | 522 | return 0; |
523 | } | 523 | } |
524 | |||
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c index e8385a6bb..82b05d136 100644 --- a/src/consensus/gnunet-service-consensus.c +++ b/src/consensus/gnunet-service-consensus.c | |||
@@ -3169,11 +3169,9 @@ client_conclude (void *cls, | |||
3169 | * Called to clean up, after a shutdown has been requested. | 3169 | * Called to clean up, after a shutdown has been requested. |
3170 | * | 3170 | * |
3171 | * @param cls closure | 3171 | * @param cls closure |
3172 | * @param tc context information (why was this task triggered now) | ||
3173 | */ | 3172 | */ |
3174 | static void | 3173 | static void |
3175 | shutdown_task (void *cls, | 3174 | shutdown_task (void *cls) |
3176 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3177 | { | 3175 | { |
3178 | while (NULL != sessions_head) | 3176 | while (NULL != sessions_head) |
3179 | destroy_session (sessions_head); | 3177 | destroy_session (sessions_head); |
diff --git a/src/consensus/test_consensus_api.c b/src/consensus/test_consensus_api.c index 18c5b3b31..0073267f8 100644 --- a/src/consensus/test_consensus_api.c +++ b/src/consensus/test_consensus_api.c | |||
@@ -67,11 +67,9 @@ insert_done (void *cls, int success) | |||
67 | * Signature of the main function of a task. | 67 | * Signature of the main function of a task. |
68 | * | 68 | * |
69 | * @param cls closure | 69 | * @param cls closure |
70 | * @param tc context information (why was this task triggered now) | ||
71 | */ | 70 | */ |
72 | static void | 71 | static void |
73 | on_shutdown (void *cls, | 72 | on_shutdown (void *cls) |
74 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
75 | { | 73 | { |
76 | if (NULL != consensus) | 74 | if (NULL != consensus) |
77 | { | 75 | { |
@@ -121,4 +119,3 @@ main (int argc, char **argv) | |||
121 | &run, NULL); | 119 | &run, NULL); |
122 | return ret; | 120 | return ret; |
123 | } | 121 | } |
124 | |||