diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-09-11 12:20:03 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-09-11 12:20:03 +0000 |
commit | 30b74c15b7f76b0371495f79447a8aaebcc71636 (patch) | |
tree | c3a346f2ee2b695f5c895d617fe05a3c71528747 /src/scalarproduct/gnunet-scalarproduct.c | |
parent | 70cb9504b1f82b0ee580a464ee1929cb0b314ff8 (diff) | |
download | gnunet-30b74c15b7f76b0371495f79447a8aaebcc71636.tar.gz gnunet-30b74c15b7f76b0371495f79447a8aaebcc71636.zip |
added propper shutdown task to SP-client
fixed a logics mixup in the SP-API between alice's client and bob's client-function
fixed a memory allocation bug in SP-API
adjusted message formats to use uint32_t instead of 16 for all element counts and mask lengths
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 | ||