/**
* Cancel the given listen operation. After calling cancel, the
* listen callback for this listen handle will not be called again.
+ * Note that cancelling a listen operation will automatically reject
+ * all operations that have not yet been accepted.
*
* @param lh handle for the listen operation
*/
}
if (NULL != s->intersection_listen)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Set intersection, listen still up!\n");
GNUNET_SET_listen_cancel (s->intersection_listen);
s->intersection_listen = NULL;
}
}
if (NULL != s->intersection_set)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Set intersection, set still there!\n");
GNUNET_SET_destroy (s->intersection_set);
s->intersection_set = NULL;
}
prepare_client_end_notification (s);
return;
}
- GNUNET_SET_destroy (s->intersection_set);
- s->intersection_set = NULL;
- GNUNET_SET_listen_cancel (s->intersection_listen);
- s->intersection_listen = NULL;
}
static void
destroy_service_session (struct AliceServiceSession *s)
{
- unsigned int i;
-
if (GNUNET_YES == s->in_destroy)
return;
s->in_destroy = GNUNET_YES;
}
if (NULL != s->sorted_elements)
{
- for (i=0;i<s->used_element_count;i++)
+ for (unsigned int i=0;i<s->used_element_count;i++)
gcry_mpi_release (s->sorted_elements[i].value);
GNUNET_free (s->sorted_elements);
s->sorted_elements = NULL;
prepare_client_end_notification (s);
return;
}
- GNUNET_SET_destroy (s->intersection_set);
- s->intersection_set = NULL;
- GNUNET_SET_listen_cancel (s->intersection_listen);
- s->intersection_listen = NULL;
}
GNUNET_CADET_close_port (listener->open_port);
listener->open_port = NULL;
while (NULL != (op = listener->op_head))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Destroying incoming operation `%u' from peer `%s'\n",
+ (unsigned int) op->client_request_id,
+ GNUNET_i2s (&op->peer));
incoming_destroy (op);
+ }
GNUNET_CONTAINER_DLL_remove (listener_head,
listener_tail,
listener);
"starting intersection by accepting and committing\n");
GNUNET_assert (NULL != context_msg);
GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY);
- GNUNET_SET_listen_cancel (listen_handle);
- listen_handle = NULL;
oh2 = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_FULL,
(struct GNUNET_SET_Option[]) { 0 },
GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"listen cb called\n");
- GNUNET_SET_listen_cancel (listen_handle);
- listen_handle = NULL;
oh2 = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_SYMMETRIC,
(struct GNUNET_SET_Option[]) { 0 },