aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet_api_get_channel.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-01-27 01:07:58 +0100
committerChristian Grothoff <christian@grothoff.org>2019-01-27 01:07:58 +0100
commit3db0825fdc964032a7c6ee17ccb7dedbbcfb208b (patch)
tree0fe0221028f6f127a0135f15898c38efe6257b51 /src/cadet/cadet_api_get_channel.c
parent65b339b7ce68fcbaec9df6f66e8ed45e60b39ce1 (diff)
downloadgnunet-3db0825fdc964032a7c6ee17ccb7dedbbcfb208b.tar.gz
gnunet-3db0825fdc964032a7c6ee17ccb7dedbbcfb208b.zip
more work on #5385
Diffstat (limited to 'src/cadet/cadet_api_get_channel.c')
-rw-r--r--src/cadet/cadet_api_get_channel.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cadet/cadet_api_get_channel.c b/src/cadet/cadet_api_get_channel.c
index d41337522..1249777c2 100644
--- a/src/cadet/cadet_api_get_channel.c
+++ b/src/cadet/cadet_api_get_channel.c
@@ -121,17 +121,20 @@ reconnect (void *cls)
121{ 121{
122 struct GNUNET_CADET_ChannelMonitor *cm = cls; 122 struct GNUNET_CADET_ChannelMonitor *cm = cls;
123 struct GNUNET_MQ_MessageHandler *handlers[] = { 123 struct GNUNET_MQ_MessageHandler *handlers[] = {
124 FIXME 124 FIXME,
125 } 125 GNUNET_MQ_handler_end ()
126 };
126 struct GNUNET_MessageHeader *msg; 127 struct GNUNET_MessageHeader *msg;
127 struct GNUNET_MQ_Envelope *env; 128 struct GNUNET_MQ_Envelope *env;
128 129
130 cm->reconnect_task = NULL;
129 cm->mq = GNUNET_CLIENT_connect (cm->cfg, 131 cm->mq = GNUNET_CLIENT_connect (cm->cfg,
130 "cadet", 132 "cadet",
131 handlers, 133 handlers,
132 &error_handler, 134 &error_handler,
133 cm); 135 cm);
134 136 if (NULL == cm->mq)
137 return;
135 env = GNUNET_MQ_msg (msg, 138 env = GNUNET_MQ_msg (msg,
136 type); 139 type);
137 GNUNET_MQ_send (cm->mq, 140 GNUNET_MQ_send (cm->mq,
@@ -142,13 +145,12 @@ reconnect (void *cls)
142/** 145/**
143 * Request information about a specific channel of the running cadet peer. 146 * Request information about a specific channel of the running cadet peer.
144 * 147 *
145 * WARNING: unstable API, likely to change in the future! 148 * @param cfg configuration to use
146 *
147 * @param h Handle to the cadet peer.
148 * @param peer ID of the other end of the channel. 149 * @param peer ID of the other end of the channel.
149 * @param channel_number Channel number. 150 * @param channel_number Channel number.
150 * @param callback Function to call with the requested data. 151 * @param callback Function to call with the requested data.
151 * @param callback_cls Closure for @c callback. 152 * @param callback_cls Closure for @c callback.
153 * @return NULL on error
152 */ 154 */
153struct GNUNET_CADET_ChannelMonitor * 155struct GNUNET_CADET_ChannelMonitor *
154GNUNET_CADET_get_channel (const struct GNUNET_CONFIGURATION_Handle *cfg, 156GNUNET_CADET_get_channel (const struct GNUNET_CONFIGURATION_Handle *cfg,