/**
* Application ports.
*/
- const uint32_t *ports;
+ const struct GNUNET_HashCode **ports;
};
* Peer number for the particular peer.
*/
unsigned int peer;
-
+
/**
* General context.
*/
h = GNUNET_CADET_connect (cfg,
(void *) (long) actx->peer,
- ctx->new_channel,
ctx->cleaner,
- ctx->handlers,
- ctx->ports);
+ ctx->handlers);
+ if (NULL == ctx->ports)
+ return h;
+
+ for (int i = 0; NULL != ctx->ports[i]; i++)
+ {
+ (void ) GNUNET_CADET_open_port (h, ctx->ports[i],
+ ctx->new_channel,
+ (void *) (long) actx->peer);
+ }
+
return h;
}
GNUNET_CADET_InboundChannelNotificationHandler new_channel,
GNUNET_CADET_ChannelEndHandler cleaner,
struct GNUNET_CADET_MessageHandler* handlers,
- const uint32_t *ports)
+ const struct GNUNET_HashCode **ports)
{
struct GNUNET_CADET_TEST_Context *ctx;