diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-08 10:52:37 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-08 10:52:37 +0000 |
commit | 94d362e7c457e7f98d543474b86f1ceb2d19f695 (patch) | |
tree | 1e1f90ceec3e54353e24dbd8da6ca0095005960d /src/scalarproduct | |
parent | 632c58424511edcd2cf00d89a249e939baeb6a39 (diff) | |
download | gnunet-94d362e7c457e7f98d543474b86f1ceb2d19f695.tar.gz gnunet-94d362e7c457e7f98d543474b86f1ceb2d19f695.zip |
- updated error reporting functionality for the service
- client side initialization adapted
Diffstat (limited to 'src/scalarproduct')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c index 21cbafe5b..14711bf0c 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct.c +++ b/src/scalarproduct/gnunet-service-scalarproduct.c | |||
@@ -771,6 +771,7 @@ prepare_bobs_cryptodata_message_multipart (void *cls) | |||
771 | } | 771 | } |
772 | if (s->transferred_element_count == s->used_element_count) { | 772 | if (s->transferred_element_count == s->used_element_count) { |
773 | // final part | 773 | // final part |
774 | s->active = GNUNET_NO; | ||
774 | GNUNET_free (s->r_prime); | 775 | GNUNET_free (s->r_prime); |
775 | GNUNET_free (s->r); | 776 | GNUNET_free (s->r); |
776 | s->r_prime = NULL; | 777 | s->r_prime = NULL; |
@@ -867,6 +868,7 @@ prepare_bobs_cryptodata_message (void *cls, | |||
867 | } | 868 | } |
868 | else { | 869 | else { |
869 | //singlepart | 870 | //singlepart |
871 | s->active = GNUNET_NO; | ||
870 | GNUNET_free (s->r); | 872 | GNUNET_free (s->r); |
871 | s->r = NULL; | 873 | s->r = NULL; |
872 | GNUNET_free (s->r_prime); | 874 | GNUNET_free (s->r_prime); |
@@ -1607,6 +1609,7 @@ handle_client_message (void *cls, | |||
1607 | } | 1609 | } |
1608 | 1610 | ||
1609 | s = GNUNET_new (struct ServiceSession); | 1611 | s = GNUNET_new (struct ServiceSession); |
1612 | s->active = GNUNET_YES; | ||
1610 | s->client_notification_task = GNUNET_SCHEDULER_NO_TASK; | 1613 | s->client_notification_task = GNUNET_SCHEDULER_NO_TASK; |
1611 | s->client = client; | 1614 | s->client = client; |
1612 | s->total = total_count; | 1615 | s->total = total_count; |
@@ -2220,6 +2223,10 @@ invalid_msg: | |||
2220 | // send message with product to client | 2223 | // send message with product to client |
2221 | if (NULL != s->client){ | 2224 | if (NULL != s->client){ |
2222 | //Alice | 2225 | //Alice |
2226 | if (NULL != s->product) | ||
2227 | s->active = GNUNET_NO; | ||
2228 | else | ||
2229 | s->active = GNUNET_SYSERR; | ||
2223 | s->client_notification_task = | 2230 | s->client_notification_task = |
2224 | GNUNET_SCHEDULER_add_now (&prepare_client_response, | 2231 | GNUNET_SCHEDULER_add_now (&prepare_client_response, |
2225 | s); | 2232 | s); |
@@ -2360,7 +2367,7 @@ shutdown_task (void *cls, | |||
2360 | 2367 | ||
2361 | // terminate all owned open channels. | 2368 | // terminate all owned open channels. |
2362 | for (s = from_client_head; NULL != s; s = s->next) { | 2369 | for (s = from_client_head; NULL != s; s = s->next) { |
2363 | if ((0/*//TODO: not finalized*/) && (NULL != s->channel)) { | 2370 | if ((GNUNET_NO != s->active) && (NULL != s->channel)) { |
2364 | GNUNET_CADET_channel_destroy (s->channel); | 2371 | GNUNET_CADET_channel_destroy (s->channel); |
2365 | s->channel = NULL; | 2372 | s->channel = NULL; |
2366 | } | 2373 | } |