diff options
Diffstat (limited to 'src/ats/ats_api_connectivity.c')
-rw-r--r-- | src/ats/ats_api_connectivity.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ats/ats_api_connectivity.c b/src/ats/ats_api_connectivity.c index 139f50a81..790d3e4cb 100644 --- a/src/ats/ats_api_connectivity.c +++ b/src/ats/ats_api_connectivity.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2010-2015 GNUnet e.V. | 3 | Copyright (C) 2010-2016 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -193,19 +193,18 @@ reconnect (struct GNUNET_ATS_ConnectivityHandle *ch) | |||
193 | { { NULL, 0, 0 } }; | 193 | { { NULL, 0, 0 } }; |
194 | struct GNUNET_MQ_Envelope *ev; | 194 | struct GNUNET_MQ_Envelope *ev; |
195 | struct ClientStartMessage *init; | 195 | struct ClientStartMessage *init; |
196 | struct GNUNET_CLIENT_Connection *client; | ||
197 | 196 | ||
198 | GNUNET_assert (NULL == ch->mq); | 197 | GNUNET_assert (NULL == ch->mq); |
199 | client = GNUNET_CLIENT_connect ("ats", ch->cfg); | 198 | ch->mq = GNUNET_CLIENT_connecT (ch->cfg, |
200 | if (NULL == client) | 199 | "ats", |
200 | handlers, | ||
201 | &error_handler, | ||
202 | ch); | ||
203 | if (NULL == ch->mq) | ||
201 | { | 204 | { |
202 | force_reconnect (ch); | 205 | force_reconnect (ch); |
203 | return; | 206 | return; |
204 | } | 207 | } |
205 | ch->mq = GNUNET_MQ_queue_for_connection_client (client, | ||
206 | handlers, | ||
207 | &error_handler, | ||
208 | ch); | ||
209 | ev = GNUNET_MQ_msg (init, | 208 | ev = GNUNET_MQ_msg (init, |
210 | GNUNET_MESSAGE_TYPE_ATS_START); | 209 | GNUNET_MESSAGE_TYPE_ATS_START); |
211 | init->start_flag = htonl (START_FLAG_CONNECTION_SUGGESTION); | 210 | init->start_flag = htonl (START_FLAG_CONNECTION_SUGGESTION); |