aboutsummaryrefslogtreecommitdiff
path: root/src/dv/dv_api.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-11-05 18:21:50 +0000
committerNathan S. Evans <evans@in.tum.de>2010-11-05 18:21:50 +0000
commit75a33a1499cf60ea4364c9aa673816629a6c1413 (patch)
tree0620da4312bb04de4d7b65074fdd3b0c3dd6cc0e /src/dv/dv_api.c
parent7217c601ad30760872823193d62307e7a335d226 (diff)
downloadgnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz
gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/dv/dv_api.c')
-rw-r--r--src/dv/dv_api.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c
index d9aef03c8..28c66af41 100644
--- a/src/dv/dv_api.c
+++ b/src/dv/dv_api.c
@@ -65,10 +65,6 @@ struct PendingMessages
65 */ 65 */
66struct GNUNET_DV_Handle 66struct GNUNET_DV_Handle
67{ 67{
68 /**
69 * Our scheduler.
70 */
71 struct GNUNET_SCHEDULER_Handle *sched;
72 68
73 /** 69 /**
74 * Configuration to use. 70 * Configuration to use.
@@ -175,7 +171,7 @@ try_connect (struct GNUNET_DV_Handle *ret)
175{ 171{
176 if (ret->client != NULL) 172 if (ret->client != NULL)
177 return GNUNET_OK; 173 return GNUNET_OK;
178 ret->client = GNUNET_CLIENT_connect (ret->sched, "dv", ret->cfg); 174 ret->client = GNUNET_CLIENT_connect ("dv", ret->cfg);
179 if (ret->client != NULL) 175 if (ret->client != NULL)
180 return GNUNET_YES; 176 return GNUNET_YES;
181#if DEBUG_DV_MESSAGES 177#if DEBUG_DV_MESSAGES
@@ -529,7 +525,6 @@ transmit_start (void *cls, size_t size, void *buf)
529/** 525/**
530 * Connect to the DV service 526 * Connect to the DV service
531 * 527 *
532 * @param sched the scheduler to use
533 * @param cfg the configuration to use 528 * @param cfg the configuration to use
534 * @param receive_handler method call when on receipt from the service 529 * @param receive_handler method call when on receipt from the service
535 * @param receive_handler_cls closure for receive_handler 530 * @param receive_handler_cls closure for receive_handler
@@ -537,8 +532,7 @@ transmit_start (void *cls, size_t size, void *buf)
537 * @return handle to the DV service 532 * @return handle to the DV service
538 */ 533 */
539struct GNUNET_DV_Handle * 534struct GNUNET_DV_Handle *
540GNUNET_DV_connect (struct GNUNET_SCHEDULER_Handle *sched, 535GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
541 const struct GNUNET_CONFIGURATION_Handle *cfg,
542 GNUNET_DV_MessageReceivedHandler receive_handler, 536 GNUNET_DV_MessageReceivedHandler receive_handler,
543 void *receive_handler_cls) 537 void *receive_handler_cls)
544{ 538{
@@ -548,11 +542,10 @@ GNUNET_DV_connect (struct GNUNET_SCHEDULER_Handle *sched,
548 handle = GNUNET_malloc(sizeof(struct GNUNET_DV_Handle)); 542 handle = GNUNET_malloc(sizeof(struct GNUNET_DV_Handle));
549 543
550 handle->cfg = cfg; 544 handle->cfg = cfg;
551 handle->sched = sched;
552 handle->pending_list = NULL; 545 handle->pending_list = NULL;
553 handle->current = NULL; 546 handle->current = NULL;
554 handle->th = NULL; 547 handle->th = NULL;
555 handle->client = GNUNET_CLIENT_connect(sched, "dv", cfg); 548 handle->client = GNUNET_CLIENT_connect("dv", cfg);
556 handle->receive_handler = receive_handler; 549 handle->receive_handler = receive_handler;
557 handle->receive_cls = receive_handler_cls; 550 handle->receive_cls = receive_handler_cls;
558 551