aboutsummaryrefslogtreecommitdiff
path: root/src/util/mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/mq.c')
-rw-r--r--src/util/mq.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index 185fe5170..b9bc4f2f1 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -473,6 +473,26 @@ GNUNET_MQ_queue_for_callbacks (GNUNET_MQ_SendImpl send,
473 473
474 474
475/** 475/**
476 * Change the closure argument in all of the `handlers` of the
477 * @a mq.
478 *
479 * @param mq to modify
480 * @param handlers_cls new closure to use
481 */
482void
483GNUNET_MQ_set_handlers_closure (struct GNUNET_MQ_Handle *mq,
484 void *handlers_cls)
485{
486 unsigned int i;
487
488 if (NULL == mq->handlers)
489 return;
490 for (i=0;NULL != mq->handlers[i].cb; i++)
491 mq->handlers[i].cls = handlers_cls;
492}
493
494
495/**
476 * Get the message that should currently be sent. 496 * Get the message that should currently be sent.
477 * Fails if there is no current message. 497 * Fails if there is no current message.
478 * Only useful for implementing message queues, 498 * Only useful for implementing message queues,
@@ -662,8 +682,8 @@ GNUNET_MQ_queue_for_server_client (struct GNUNET_SERVER_Client *client)
662 mq->impl_state = scss; 682 mq->impl_state = scss;
663 scss->client = client; 683 scss->client = client;
664 GNUNET_SERVER_client_keep (client); 684 GNUNET_SERVER_client_keep (client);
665 mq->send_impl = server_client_send_impl; 685 mq->send_impl = &server_client_send_impl;
666 mq->destroy_impl = server_client_destroy_impl; 686 mq->destroy_impl = &server_client_destroy_impl;
667 return mq; 687 return mq;
668} 688}
669 689