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/scalarproduct/gnunet-service-scalarproduct_bob.c | |
parent | 3aab63d5c50db0eb784d3b65b2bd989d3458c960 (diff) | |
download | gnunet-90c70e8315c4a366996da379f839dc84d21d5f38.tar.gz gnunet-90c70e8315c4a366996da379f839dc84d21d5f38.zip |
- fix CADET-using services
Diffstat (limited to 'src/scalarproduct/gnunet-service-scalarproduct_bob.c')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct_bob.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c index 5be0a85d1..84c831c82 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c | |||
@@ -1187,7 +1187,7 @@ static void * | |||
1187 | cb_channel_incoming (void *cls, | 1187 | cb_channel_incoming (void *cls, |
1188 | struct GNUNET_CADET_Channel *channel, | 1188 | struct GNUNET_CADET_Channel *channel, |
1189 | const struct GNUNET_PeerIdentity *initiator, | 1189 | const struct GNUNET_PeerIdentity *initiator, |
1190 | uint32_t port, | 1190 | const struct GNUNET_HashCode *port, |
1191 | enum GNUNET_CADET_ChannelOption options) | 1191 | enum GNUNET_CADET_ChannelOption options) |
1192 | { | 1192 | { |
1193 | struct CadetIncomingSession *in; | 1193 | struct CadetIncomingSession *in; |
@@ -1512,10 +1512,6 @@ run (void *cls, | |||
1512 | 0}, | 1512 | 0}, |
1513 | { NULL, 0, 0} | 1513 | { NULL, 0, 0} |
1514 | }; | 1514 | }; |
1515 | static const uint32_t ports[] = { | ||
1516 | GNUNET_APPLICATION_TYPE_SCALARPRODUCT, | ||
1517 | 0 | ||
1518 | }; | ||
1519 | 1515 | ||
1520 | cfg = c; | 1516 | cfg = c; |
1521 | /* | 1517 | /* |
@@ -1538,10 +1534,8 @@ run (void *cls, | |||
1538 | cadet_sessions = GNUNET_CONTAINER_multihashmap_create (128, | 1534 | cadet_sessions = GNUNET_CONTAINER_multihashmap_create (128, |
1539 | GNUNET_YES); | 1535 | GNUNET_YES); |
1540 | my_cadet = GNUNET_CADET_connect (cfg, NULL, | 1536 | my_cadet = GNUNET_CADET_connect (cfg, NULL, |
1541 | &cb_channel_incoming, | ||
1542 | &cb_channel_destruction, | 1537 | &cb_channel_destruction, |
1543 | cadet_handlers, | 1538 | cadet_handlers); |
1544 | ports); | ||
1545 | if (NULL == my_cadet) | 1539 | if (NULL == my_cadet) |
1546 | { | 1540 | { |
1547 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1541 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -1549,6 +1543,9 @@ run (void *cls, | |||
1549 | GNUNET_SCHEDULER_shutdown (); | 1543 | GNUNET_SCHEDULER_shutdown (); |
1550 | return; | 1544 | return; |
1551 | } | 1545 | } |
1546 | GNUNET_CADET_open_port (my_cadet, | ||
1547 | GC_u2h (GNUNET_APPLICATION_TYPE_SCALARPRODUCT), | ||
1548 | &cb_channel_incoming, NULL); | ||
1552 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, | 1549 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, |
1553 | NULL); | 1550 | NULL); |
1554 | } | 1551 | } |