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-ecc_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-ecc_bob.c')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c index fbdf62192..7246fa6a0 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | |||
@@ -891,7 +891,7 @@ static void * | |||
891 | cb_channel_incoming (void *cls, | 891 | cb_channel_incoming (void *cls, |
892 | struct GNUNET_CADET_Channel *channel, | 892 | struct GNUNET_CADET_Channel *channel, |
893 | const struct GNUNET_PeerIdentity *initiator, | 893 | const struct GNUNET_PeerIdentity *initiator, |
894 | uint32_t port, | 894 | const struct GNUNET_HashCode *port, |
895 | enum GNUNET_CADET_ChannelOption options) | 895 | enum GNUNET_CADET_ChannelOption options) |
896 | { | 896 | { |
897 | struct CadetIncomingSession *in; | 897 | struct CadetIncomingSession *in; |
@@ -1221,10 +1221,6 @@ run (void *cls, | |||
1221 | 0}, | 1221 | 0}, |
1222 | { NULL, 0, 0} | 1222 | { NULL, 0, 0} |
1223 | }; | 1223 | }; |
1224 | static const uint32_t ports[] = { | ||
1225 | GNUNET_APPLICATION_TYPE_SCALARPRODUCT_ECC, | ||
1226 | 0 | ||
1227 | }; | ||
1228 | 1224 | ||
1229 | cfg = c; | 1225 | cfg = c; |
1230 | /* We don't really do DLOG, so we can setup with very minimal resources */ | 1226 | /* We don't really do DLOG, so we can setup with very minimal resources */ |
@@ -1241,10 +1237,8 @@ run (void *cls, | |||
1241 | cadet_sessions = GNUNET_CONTAINER_multihashmap_create (128, | 1237 | cadet_sessions = GNUNET_CONTAINER_multihashmap_create (128, |
1242 | GNUNET_YES); | 1238 | GNUNET_YES); |
1243 | my_cadet = GNUNET_CADET_connect (cfg, NULL, | 1239 | my_cadet = GNUNET_CADET_connect (cfg, NULL, |
1244 | &cb_channel_incoming, | ||
1245 | &cb_channel_destruction, | 1240 | &cb_channel_destruction, |
1246 | cadet_handlers, | 1241 | cadet_handlers); |
1247 | ports); | ||
1248 | if (NULL == my_cadet) | 1242 | if (NULL == my_cadet) |
1249 | { | 1243 | { |
1250 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1244 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -1252,6 +1246,9 @@ run (void *cls, | |||
1252 | GNUNET_SCHEDULER_shutdown (); | 1246 | GNUNET_SCHEDULER_shutdown (); |
1253 | return; | 1247 | return; |
1254 | } | 1248 | } |
1249 | GNUNET_CADET_open_port (my_cadet, | ||
1250 | GC_u2h (GNUNET_APPLICATION_TYPE_SCALARPRODUCT_ECC), | ||
1251 | &cb_channel_incoming, NULL); | ||
1255 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, | 1252 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, |
1256 | NULL); | 1253 | NULL); |
1257 | } | 1254 | } |