diff options
Diffstat (limited to 'src/scalarproduct/gnunet-scalarproduct.c')
-rw-r--r-- | src/scalarproduct/gnunet-scalarproduct.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/scalarproduct/gnunet-scalarproduct.c b/src/scalarproduct/gnunet-scalarproduct.c index f56fd7625..83c907b6c 100644 --- a/src/scalarproduct/gnunet-scalarproduct.c +++ b/src/scalarproduct/gnunet-scalarproduct.c | |||
@@ -151,6 +151,18 @@ requester_callback (void *cls, | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | /** | ||
155 | * Task run during shutdown. | ||
156 | * | ||
157 | * @param cls unused | ||
158 | * @param tc unused | ||
159 | */ | ||
160 | static void | ||
161 | shutdown_task (void *cls, | ||
162 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
163 | { | ||
164 | GNUNET_SCALARPRODUCT_disconnect (); | ||
165 | } | ||
154 | 166 | ||
155 | /** | 167 | /** |
156 | * Main function that will be run by the scheduler. | 168 | * Main function that will be run by the scheduler. |
@@ -310,6 +322,10 @@ run (void *cls, | |||
310 | (void *) &closure))) | 322 | (void *) &closure))) |
311 | return; | 323 | return; |
312 | 324 | ||
325 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | ||
326 | &shutdown_task, | ||
327 | NULL); | ||
328 | |||
313 | ret = 0; | 329 | ret = 0; |
314 | } | 330 | } |
315 | 331 | ||