diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-11-05 18:21:50 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-11-05 18:21:50 +0000 |
commit | 75a33a1499cf60ea4364c9aa673816629a6c1413 (patch) | |
tree | 0620da4312bb04de4d7b65074fdd3b0c3dd6cc0e /src/fs/fs_namespace.c | |
parent | 7217c601ad30760872823193d62307e7a335d226 (diff) | |
download | gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip |
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/fs/fs_namespace.c')
-rw-r--r-- | src/fs/fs_namespace.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 5c1137eb7..91502e1de 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -265,11 +265,6 @@ struct AdvertisementContext | |||
265 | struct GNUNET_DATASTORE_Handle *dsh; | 265 | struct GNUNET_DATASTORE_Handle *dsh; |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * Our scheduler. | ||
269 | */ | ||
270 | struct GNUNET_SCHEDULER_Handle *sched; | ||
271 | |||
272 | /** | ||
273 | * Our KSK URI. | 268 | * Our KSK URI. |
274 | */ | 269 | */ |
275 | struct GNUNET_FS_Uri *ksk_uri; | 270 | struct GNUNET_FS_Uri *ksk_uri; |
@@ -357,8 +352,7 @@ advertisement_cont (void *cls, | |||
357 | if (GNUNET_OK != success) | 352 | if (GNUNET_OK != success) |
358 | { | 353 | { |
359 | /* error! */ | 354 | /* error! */ |
360 | GNUNET_SCHEDULER_add_continuation (ac->sched, | 355 | GNUNET_SCHEDULER_add_continuation (&do_disconnect, |
361 | &do_disconnect, | ||
362 | ac->dsh, | 356 | ac->dsh, |
363 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 357 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
364 | if (ac->cont != NULL) | 358 | if (ac->cont != NULL) |
@@ -373,8 +367,7 @@ advertisement_cont (void *cls, | |||
373 | if (ac->pos == ac->ksk_uri->data.ksk.keywordCount) | 367 | if (ac->pos == ac->ksk_uri->data.ksk.keywordCount) |
374 | { | 368 | { |
375 | /* done! */ | 369 | /* done! */ |
376 | GNUNET_SCHEDULER_add_continuation (ac->sched, | 370 | GNUNET_SCHEDULER_add_continuation (&do_disconnect, |
377 | &do_disconnect, | ||
378 | ac->dsh, | 371 | ac->dsh, |
379 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 372 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
380 | if (ac->cont != NULL) | 373 | if (ac->cont != NULL) |
@@ -501,7 +494,7 @@ GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, | |||
501 | nb->ns_purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK); | 494 | nb->ns_purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK); |
502 | nb->ksk_purpose.size = htonl (size - sizeof (struct GNUNET_CRYPTO_RsaSignature)); | 495 | nb->ksk_purpose.size = htonl (size - sizeof (struct GNUNET_CRYPTO_RsaSignature)); |
503 | nb->ksk_purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK_KSIG); | 496 | nb->ksk_purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK_KSIG); |
504 | dsh = GNUNET_DATASTORE_connect (h->cfg, h->sched); | 497 | dsh = GNUNET_DATASTORE_connect (h->cfg); |
505 | if (NULL == dsh) | 498 | if (NULL == dsh) |
506 | { | 499 | { |
507 | GNUNET_free (nb); | 500 | GNUNET_free (nb); |
@@ -513,7 +506,6 @@ GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, | |||
513 | ctx->cont = cont; | 506 | ctx->cont = cont; |
514 | ctx->cont_cls = cont_cls; | 507 | ctx->cont_cls = cont_cls; |
515 | ctx->dsh = dsh; | 508 | ctx->dsh = dsh; |
516 | ctx->sched = h->sched; | ||
517 | ctx->ksk_uri = GNUNET_FS_uri_dup (ksk_uri); | 509 | ctx->ksk_uri = GNUNET_FS_uri_dup (ksk_uri); |
518 | ctx->nb = nb; | 510 | ctx->nb = nb; |
519 | ctx->pt = pt; | 511 | ctx->pt = pt; |
@@ -956,7 +948,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, | |||
956 | NULL); | 948 | NULL); |
957 | return; | 949 | return; |
958 | } | 950 | } |
959 | psc->dsh = GNUNET_DATASTORE_connect (h->cfg, h->sched); | 951 | psc->dsh = GNUNET_DATASTORE_connect (h->cfg); |
960 | if (NULL == psc->dsh) | 952 | if (NULL == psc->dsh) |
961 | { | 953 | { |
962 | GNUNET_free (sb_enc); | 954 | GNUNET_free (sb_enc); |