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/ats | |
parent | 42f625fe75fce04175965b12d1edb809b56433af (diff) |
avoid deprecated API, use new connecT API
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/ats_api_connectivity.c | 15 | ||||
-rw-r--r-- | src/ats/ats_api_scheduling.c | 14 |
2 files changed, 13 insertions, 16 deletions
diff --git a/src/ats/ats_api_connectivity.c b/src/ats/ats_api_connectivity.c index 139f50a814..790d3e4cb1 100644 --- a/src/ats/ats_api_connectivity.c +++ b/src/ats/ats_api_connectivity.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2010-2015 GNUnet e.V. + Copyright (C) 2010-2016 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -193,19 +193,18 @@ reconnect (struct GNUNET_ATS_ConnectivityHandle *ch) { { NULL, 0, 0 } }; struct GNUNET_MQ_Envelope *ev; struct ClientStartMessage *init; - struct GNUNET_CLIENT_Connection *client; GNUNET_assert (NULL == ch->mq); - client = GNUNET_CLIENT_connect ("ats", ch->cfg); - if (NULL == client) + ch->mq = GNUNET_CLIENT_connecT (ch->cfg, + "ats", + handlers, + &error_handler, + ch); + if (NULL == ch->mq) { force_reconnect (ch); return; } - ch->mq = GNUNET_MQ_queue_for_connection_client (client, - handlers, - &error_handler, - ch); ev = GNUNET_MQ_msg (init, GNUNET_MESSAGE_TYPE_ATS_START); init->start_flag = htonl (START_FLAG_CONNECTION_SUGGESTION); diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index d7e305950f..bcca89456f 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c @@ -529,21 +529,19 @@ reconnect (struct GNUNET_ATS_SchedulingHandle *sh) struct ClientStartMessage *init; unsigned int i; struct GNUNET_ATS_AddressRecord *ar; - struct GNUNET_CLIENT_Connection *client; GNUNET_assert (NULL == sh->mq); - client = GNUNET_CLIENT_connect ("ats", - sh->cfg); - if (NULL == client) + sh->mq = GNUNET_CLIENT_connecT (sh->cfg, + "ats", + handlers, + &error_handler, + sh); + if (NULL == sh->mq) { GNUNET_break (0); force_reconnect (sh); return; } - sh->mq = GNUNET_MQ_queue_for_connection_client (client, - handlers, - &error_handler, - sh); ev = GNUNET_MQ_msg (init, GNUNET_MESSAGE_TYPE_ATS_START); init->start_flag = htonl (START_FLAG_SCHEDULING); |