diff options
author | Bart Polot <bart@net.in.tum.de> | 2016-07-20 17:13:26 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2016-07-20 17:13:26 +0000 |
commit | 90c70e8315c4a366996da379f839dc84d21d5f38 (patch) | |
tree | 0bfd73d2da8b8efb8de888c09ea4dd5bfc4cdb0f /src/fs | |
parent | 3aab63d5c50db0eb784d3b65b2bd989d3458c960 (diff) | |
download | gnunet-90c70e8315c4a366996da379f839dc84d21d5f38.tar.gz gnunet-90c70e8315c4a366996da379f839dc84d21d5f38.zip |
- fix CADET-using services
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs_cadet_client.c | 8 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_cadet_server.c | 20 |
2 files changed, 12 insertions, 16 deletions
diff --git a/src/fs/gnunet-service-fs_cadet_client.c b/src/fs/gnunet-service-fs_cadet_client.c index 90a0c3b7f..5b24b3116 100644 --- a/src/fs/gnunet-service-fs_cadet_client.c +++ b/src/fs/gnunet-service-fs_cadet_client.c | |||
@@ -236,7 +236,7 @@ reset_cadet (struct CadetHandle *mh) | |||
236 | mh->channel = GNUNET_CADET_channel_create (cadet_handle, | 236 | mh->channel = GNUNET_CADET_channel_create (cadet_handle, |
237 | mh, | 237 | mh, |
238 | &mh->target, | 238 | &mh->target, |
239 | GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER, | 239 | GC_u2h (GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER), |
240 | GNUNET_CADET_OPTION_RELIABLE); | 240 | GNUNET_CADET_OPTION_RELIABLE); |
241 | transmit_pending (mh); | 241 | transmit_pending (mh); |
242 | } | 242 | } |
@@ -547,7 +547,7 @@ get_cadet (const struct GNUNET_PeerIdentity *target) | |||
547 | mh->channel = GNUNET_CADET_channel_create (cadet_handle, | 547 | mh->channel = GNUNET_CADET_channel_create (cadet_handle, |
548 | mh, | 548 | mh, |
549 | &mh->target, | 549 | &mh->target, |
550 | GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER, | 550 | GC_u2h (GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER), |
551 | GNUNET_CADET_OPTION_RELIABLE); | 551 | GNUNET_CADET_OPTION_RELIABLE); |
552 | GNUNET_assert (mh == | 552 | GNUNET_assert (mh == |
553 | GNUNET_CONTAINER_multipeermap_get (cadet_map, | 553 | GNUNET_CONTAINER_multipeermap_get (cadet_map, |
@@ -719,10 +719,8 @@ GSF_cadet_start_client () | |||
719 | cadet_map = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES); | 719 | cadet_map = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES); |
720 | cadet_handle = GNUNET_CADET_connect (GSF_cfg, | 720 | cadet_handle = GNUNET_CADET_connect (GSF_cfg, |
721 | NULL, | 721 | NULL, |
722 | NULL, | ||
723 | &cleaner_cb, | 722 | &cleaner_cb, |
724 | handlers, | 723 | handlers); |
725 | NULL); | ||
726 | } | 724 | } |
727 | 725 | ||
728 | 726 | ||
diff --git a/src/fs/gnunet-service-fs_cadet_server.c b/src/fs/gnunet-service-fs_cadet_server.c index 21874b674..32fe4191a 100644 --- a/src/fs/gnunet-service-fs_cadet_server.c +++ b/src/fs/gnunet-service-fs_cadet_server.c | |||
@@ -472,7 +472,8 @@ static void * | |||
472 | accept_cb (void *cls, | 472 | accept_cb (void *cls, |
473 | struct GNUNET_CADET_Channel *channel, | 473 | struct GNUNET_CADET_Channel *channel, |
474 | const struct GNUNET_PeerIdentity *initiator, | 474 | const struct GNUNET_PeerIdentity *initiator, |
475 | uint32_t port, enum GNUNET_CADET_ChannelOption options) | 475 | const struct GNUNET_HashCode *port, |
476 | enum GNUNET_CADET_ChannelOption options) | ||
476 | { | 477 | { |
477 | struct CadetClient *sc; | 478 | struct CadetClient *sc; |
478 | 479 | ||
@@ -561,11 +562,6 @@ GSF_cadet_start_server () | |||
561 | { &request_cb, GNUNET_MESSAGE_TYPE_FS_CADET_QUERY, sizeof (struct CadetQueryMessage)}, | 562 | { &request_cb, GNUNET_MESSAGE_TYPE_FS_CADET_QUERY, sizeof (struct CadetQueryMessage)}, |
562 | { NULL, 0, 0 } | 563 | { NULL, 0, 0 } |
563 | }; | 564 | }; |
564 | static const uint32_t ports[] = { | ||
565 | GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER, | ||
566 | 0 | ||
567 | }; | ||
568 | |||
569 | if (GNUNET_YES != | 565 | if (GNUNET_YES != |
570 | GNUNET_CONFIGURATION_get_value_number (GSF_cfg, | 566 | GNUNET_CONFIGURATION_get_value_number (GSF_cfg, |
571 | "fs", | 567 | "fs", |
@@ -576,11 +572,13 @@ GSF_cadet_start_server () | |||
576 | "Initializing cadet FS server with a limit of %llu connections\n", | 572 | "Initializing cadet FS server with a limit of %llu connections\n", |
577 | sc_count_max); | 573 | sc_count_max); |
578 | listen_channel = GNUNET_CADET_connect (GSF_cfg, | 574 | listen_channel = GNUNET_CADET_connect (GSF_cfg, |
579 | NULL, | 575 | NULL, |
580 | &accept_cb, | 576 | &cleaner_cb, |
581 | &cleaner_cb, | 577 | handlers); |
582 | handlers, | 578 | GNUNET_assert (NULL != listen_channel); |
583 | ports); | 579 | GNUNET_CADET_open_port (listen_channel, |
580 | GC_u2h (GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER), | ||
581 | &accept_cb, NULL); | ||
584 | } | 582 | } |
585 | 583 | ||
586 | 584 | ||