diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-19 22:53:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-19 22:53:13 +0000 |
commit | 8a5989dc2700e8d470967e51c1f3085f095aed12 (patch) | |
tree | 6a7d35fdb5c80e94eab220735827a984270b4f38 /src/consensus/consensus_api.c | |
parent | 42f625fe75fce04175965b12d1edb809b56433af (diff) | |
download | gnunet-8a5989dc2700e8d470967e51c1f3085f095aed12.tar.gz gnunet-8a5989dc2700e8d470967e51c1f3085f095aed12.zip |
avoid deprecated API, use new connecT API
Diffstat (limited to 'src/consensus/consensus_api.c')
-rw-r--r-- | src/consensus/consensus_api.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c index 7e7bb3fcf..2eebcc439 100644 --- a/src/consensus/consensus_api.c +++ b/src/consensus/consensus_api.c | |||
@@ -217,22 +217,21 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
217 | }; | 217 | }; |
218 | struct GNUNET_CONSENSUS_JoinMessage *join_msg; | 218 | struct GNUNET_CONSENSUS_JoinMessage *join_msg; |
219 | struct GNUNET_MQ_Envelope *ev; | 219 | struct GNUNET_MQ_Envelope *ev; |
220 | struct GNUNET_CLIENT_Connection *client; | ||
221 | 220 | ||
222 | consensus->cfg = cfg; | 221 | consensus->cfg = cfg; |
223 | consensus->new_element_cb = new_element_cb; | 222 | consensus->new_element_cb = new_element_cb; |
224 | consensus->new_element_cls = new_element_cls; | 223 | consensus->new_element_cls = new_element_cls; |
225 | consensus->session_id = *session_id; | 224 | consensus->session_id = *session_id; |
226 | client = GNUNET_CLIENT_connect ("consensus", cfg); | 225 | consensus->mq = GNUNET_CLIENT_connecT (cfg, |
227 | if (NULL == client) | 226 | "consensus", |
227 | mq_handlers, | ||
228 | &mq_error_handler, | ||
229 | consensus); | ||
230 | if (NULL == consensus->mq) | ||
228 | { | 231 | { |
229 | GNUNET_free (consensus); | 232 | GNUNET_free (consensus); |
230 | return NULL; | 233 | return NULL; |
231 | } | 234 | } |
232 | consensus->mq = GNUNET_MQ_queue_for_connection_client (client, | ||
233 | mq_handlers, | ||
234 | &mq_error_handler, | ||
235 | consensus); | ||
236 | ev = GNUNET_MQ_msg_extra (join_msg, | 235 | ev = GNUNET_MQ_msg_extra (join_msg, |
237 | (num_peers * sizeof (struct GNUNET_PeerIdentity)), | 236 | (num_peers * sizeof (struct GNUNET_PeerIdentity)), |
238 | GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_JOIN); | 237 | GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_JOIN); |