diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-26 09:32:54 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-26 09:32:54 +0000 |
commit | 661e811fef7d0ef6b62892a87ec3723edb0ca3bc (patch) | |
tree | 205f517bc334ef48e34af8d6131b248080acd214 /src/scalarproduct | |
parent | 5383f4e6dc8b43519d3ef5a28606fbca066d597a (diff) | |
download | gnunet-661e811fef7d0ef6b62892a87ec3723edb0ca3bc.tar.gz gnunet-661e811fef7d0ef6b62892a87ec3723edb0ca3bc.zip |
- fixed bug in set which allows a peer to generate a malformed session setup
- fixed double-cancel of a set-handle
Diffstat (limited to 'src/scalarproduct')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c index 0ce5ffccc..de3849690 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct.c +++ b/src/scalarproduct/gnunet-service-scalarproduct.c | |||
@@ -1279,8 +1279,10 @@ cb_intersection_element_removed (void *cls, | |||
1279 | GNUNET_SET_listen_cancel (s->intersection_listen); | 1279 | GNUNET_SET_listen_cancel (s->intersection_listen); |
1280 | s->intersection_listen = NULL; | 1280 | s->intersection_listen = NULL; |
1281 | } | 1281 | } |
1282 | |||
1282 | // the op failed and has already been invalidated by the set service | 1283 | // the op failed and has already been invalidated by the set service |
1283 | s->intersection_op = NULL; | 1284 | s->intersection_op = NULL; |
1285 | s->intersection_set = NULL; | ||
1284 | break; | 1286 | break; |
1285 | } | 1287 | } |
1286 | 1288 | ||
@@ -1893,7 +1895,7 @@ cb_channel_destruction (void *cls, | |||
1893 | // as we have only one peer connected in each session, just remove the session | 1895 | // as we have only one peer connected in each session, just remove the session |
1894 | s->channel = NULL; | 1896 | s->channel = NULL; |
1895 | 1897 | ||
1896 | if ((ALICE == s->role) && (GNUNET_NO != s->active) && (!do_shutdown)) | 1898 | if ((ALICE == s->role) && (GNUNET_YES == s->active) && (!do_shutdown)) |
1897 | { | 1899 | { |
1898 | // if this happened before we received the answer, we must terminate the session | 1900 | // if this happened before we received the answer, we must terminate the session |
1899 | s->role = GNUNET_SYSERR; | 1901 | s->role = GNUNET_SYSERR; |
@@ -1901,7 +1903,7 @@ cb_channel_destruction (void *cls, | |||
1901 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, | 1903 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, |
1902 | s); | 1904 | s); |
1903 | } | 1905 | } |
1904 | else | 1906 | else if ((BOB == s->role) && (GNUNET_SYSERR != s->active)) |
1905 | { | 1907 | { |
1906 | if ((s == from_service_head) || ((NULL != from_service_head) && ((NULL != s->next) || (NULL != s->a_tail)))) | 1908 | if ((s == from_service_head) || ((NULL != from_service_head) && ((NULL != s->next) || (NULL != s->a_tail)))) |
1907 | GNUNET_CONTAINER_DLL_remove (from_service_head, from_service_tail, s); | 1909 | GNUNET_CONTAINER_DLL_remove (from_service_head, from_service_tail, s); |