diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-01-27 01:07:58 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-01-27 01:07:58 +0100 |
commit | 3db0825fdc964032a7c6ee17ccb7dedbbcfb208b (patch) | |
tree | 0fe0221028f6f127a0135f15898c38efe6257b51 /src/cadet/cadet_api_get_channel.c | |
parent | 65b339b7ce68fcbaec9df6f66e8ed45e60b39ce1 (diff) | |
download | gnunet-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.c | 16 |
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 | */ |
153 | struct GNUNET_CADET_ChannelMonitor * | 155 | struct GNUNET_CADET_ChannelMonitor * |
154 | GNUNET_CADET_get_channel (const struct GNUNET_CONFIGURATION_Handle *cfg, | 156 | GNUNET_CADET_get_channel (const struct GNUNET_CONFIGURATION_Handle *cfg, |