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/set | |
parent | 3aab63d5c50db0eb784d3b65b2bd989d3458c960 (diff) | |
download | gnunet-90c70e8315c4a366996da379f839dc84d21d5f38.tar.gz gnunet-90c70e8315c4a366996da379f839dc84d21d5f38.zip |
- fix CADET-using services
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/gnunet-service-set.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index a5baf8cfd..16f330a4d 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -1358,7 +1358,7 @@ handle_client_evaluate (void *cls, | |||
1358 | op->channel = GNUNET_CADET_channel_create (cadet, | 1358 | op->channel = GNUNET_CADET_channel_create (cadet, |
1359 | op, | 1359 | op, |
1360 | &msg->target_peer, | 1360 | &msg->target_peer, |
1361 | GNUNET_APPLICATION_TYPE_SET, | 1361 | GC_u2h (GNUNET_APPLICATION_TYPE_SET), |
1362 | GNUNET_CADET_OPTION_RELIABLE); | 1362 | GNUNET_CADET_OPTION_RELIABLE); |
1363 | op->mq = GNUNET_CADET_mq_create (op->channel); | 1363 | op->mq = GNUNET_CADET_mq_create (op->channel); |
1364 | set->vt->evaluate (op, | 1364 | set->vt->evaluate (op, |
@@ -1796,7 +1796,7 @@ static void * | |||
1796 | channel_new_cb (void *cls, | 1796 | channel_new_cb (void *cls, |
1797 | struct GNUNET_CADET_Channel *channel, | 1797 | struct GNUNET_CADET_Channel *channel, |
1798 | const struct GNUNET_PeerIdentity *initiator, | 1798 | const struct GNUNET_PeerIdentity *initiator, |
1799 | uint32_t port, | 1799 | const struct GNUNET_HashCode *port, |
1800 | enum GNUNET_CADET_ChannelOption options) | 1800 | enum GNUNET_CADET_ChannelOption options) |
1801 | { | 1801 | { |
1802 | static const struct SetVT incoming_vt = { | 1802 | static const struct SetVT incoming_vt = { |
@@ -1805,7 +1805,7 @@ channel_new_cb (void *cls, | |||
1805 | }; | 1805 | }; |
1806 | struct Operation *incoming; | 1806 | struct Operation *incoming; |
1807 | 1807 | ||
1808 | if (GNUNET_APPLICATION_TYPE_SET != port) | 1808 | if (0 != memcmp (GC_u2h (GNUNET_APPLICATION_TYPE_SET), port, sizeof (*port))) |
1809 | { | 1809 | { |
1810 | GNUNET_break (0); | 1810 | GNUNET_break (0); |
1811 | GNUNET_CADET_channel_destroy (channel); | 1811 | GNUNET_CADET_channel_destroy (channel); |
@@ -1988,7 +1988,6 @@ run (void *cls, | |||
1988 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE, 0}, | 1988 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE, 0}, |
1989 | {NULL, 0, 0} | 1989 | {NULL, 0, 0} |
1990 | }; | 1990 | }; |
1991 | static const uint32_t cadet_ports[] = {GNUNET_APPLICATION_TYPE_SET, 0}; | ||
1992 | 1991 | ||
1993 | configuration = cfg; | 1992 | configuration = cfg; |
1994 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); | 1993 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); |
@@ -1998,10 +1997,11 @@ run (void *cls, | |||
1998 | server_handlers); | 1997 | server_handlers); |
1999 | _GSS_statistics = GNUNET_STATISTICS_create ("set", cfg); | 1998 | _GSS_statistics = GNUNET_STATISTICS_create ("set", cfg); |
2000 | cadet = GNUNET_CADET_connect (cfg, NULL, | 1999 | cadet = GNUNET_CADET_connect (cfg, NULL, |
2001 | &channel_new_cb, | ||
2002 | &channel_end_cb, | 2000 | &channel_end_cb, |
2003 | cadet_handlers, | 2001 | cadet_handlers); |
2004 | cadet_ports); | 2002 | GNUNET_CADET_open_port (cadet, |
2003 | GC_u2h (GNUNET_APPLICATION_TYPE_SET), | ||
2004 | &channel_new_cb, NULL); | ||
2005 | if (NULL == cadet) | 2005 | if (NULL == cadet) |
2006 | { | 2006 | { |
2007 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2007 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |