diff options
-rw-r--r-- | src/identity/identity_api.c | 18 | ||||
-rw-r--r-- | src/include/gnunet_identity_service.h | 3 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c index 1530aff39..a6d15ae38 100644 --- a/src/identity/identity_api.c +++ b/src/identity/identity_api.c | |||
@@ -879,9 +879,8 @@ GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id, | |||
879 | * the operation. | 879 | * the operation. |
880 | * | 880 | * |
881 | * @param op operation to cancel | 881 | * @param op operation to cancel |
882 | * @return GNUNET_YES if the continuation was cancelled | ||
883 | */ | 882 | */ |
884 | int | 883 | void |
885 | GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op) | 884 | GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op) |
886 | { | 885 | { |
887 | struct GNUNET_IDENTITY_Handle *h = op->h; | 886 | struct GNUNET_IDENTITY_Handle *h = op->h; |
@@ -894,7 +893,7 @@ GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op) | |||
894 | h->op_tail, | 893 | h->op_tail, |
895 | op); | 894 | op); |
896 | GNUNET_free (op); | 895 | GNUNET_free (op); |
897 | return GNUNET_YES; | 896 | return; |
898 | } | 897 | } |
899 | if (NULL != h->th) | 898 | if (NULL != h->th) |
900 | { | 899 | { |
@@ -906,12 +905,11 @@ GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op) | |||
906 | op); | 905 | op); |
907 | GNUNET_free (op); | 906 | GNUNET_free (op); |
908 | transmit_next (h); | 907 | transmit_next (h); |
909 | return GNUNET_YES; | 908 | return; |
910 | } | 909 | } |
911 | /* request active with service, simply ensure continuations are not called */ | 910 | /* request active with service, simply ensure continuations are not called */ |
912 | op->cont = NULL; | 911 | op->cont = NULL; |
913 | op->cb = NULL; | 912 | op->cb = NULL; |
914 | return GNUNET_NO; | ||
915 | } | 913 | } |
916 | 914 | ||
917 | 915 | ||
@@ -955,8 +953,14 @@ GNUNET_IDENTITY_disconnect (struct GNUNET_IDENTITY_Handle *h) | |||
955 | 953 | ||
956 | GNUNET_assert (NULL != h); | 954 | GNUNET_assert (NULL != h); |
957 | while (NULL != (op = h->op_head)) | 955 | while (NULL != (op = h->op_head)) |
958 | if (GNUNET_YES != GNUNET_IDENTITY_cancel (op)) | 956 | { |
959 | break; | 957 | if (NULL != h->th) |
958 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); | ||
959 | GNUNET_CONTAINER_DLL_remove (h->op_head, | ||
960 | h->op_tail, | ||
961 | op); | ||
962 | GNUNET_free (op); | ||
963 | } | ||
960 | if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 964 | if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK) |
961 | { | 965 | { |
962 | GNUNET_SCHEDULER_cancel (h->reconnect_task); | 966 | GNUNET_SCHEDULER_cancel (h->reconnect_task); |
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h index 3b6ff0e50..6c572e737 100644 --- a/src/include/gnunet_identity_service.h +++ b/src/include/gnunet_identity_service.h | |||
@@ -267,9 +267,8 @@ GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id, | |||
267 | * the operation. | 267 | * the operation. |
268 | * | 268 | * |
269 | * @param op operation to cancel | 269 | * @param op operation to cancel |
270 | * @return GNUNET_YES if the continuation was cancelled | ||
271 | */ | 270 | */ |
272 | int | 271 | void |
273 | GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op); | 272 | GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op); |
274 | 273 | ||
275 | 274 | ||