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/ats_api_scheduling.c | |
parent | 42f625fe75fce04175965b12d1edb809b56433af (diff) | |
download | gnunet-8a5989dc2700e8d470967e51c1f3085f095aed12.tar.gz gnunet-8a5989dc2700e8d470967e51c1f3085f095aed12.zip |
avoid deprecated API, use new connecT API
Diffstat (limited to 'src/ats/ats_api_scheduling.c')
-rw-r--r-- | src/ats/ats_api_scheduling.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index d7e305950..bcca89456 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) | |||
529 | struct ClientStartMessage *init; | 529 | struct ClientStartMessage *init; |
530 | unsigned int i; | 530 | unsigned int i; |
531 | struct GNUNET_ATS_AddressRecord *ar; | 531 | struct GNUNET_ATS_AddressRecord *ar; |
532 | struct GNUNET_CLIENT_Connection *client; | ||
533 | 532 | ||
534 | GNUNET_assert (NULL == sh->mq); | 533 | GNUNET_assert (NULL == sh->mq); |
535 | client = GNUNET_CLIENT_connect ("ats", | 534 | sh->mq = GNUNET_CLIENT_connecT (sh->cfg, |
536 | sh->cfg); | 535 | "ats", |
537 | if (NULL == client) | 536 | handlers, |
537 | &error_handler, | ||
538 | sh); | ||
539 | if (NULL == sh->mq) | ||
538 | { | 540 | { |
539 | GNUNET_break (0); | 541 | GNUNET_break (0); |
540 | force_reconnect (sh); | 542 | force_reconnect (sh); |
541 | return; | 543 | return; |
542 | } | 544 | } |
543 | sh->mq = GNUNET_MQ_queue_for_connection_client (client, | ||
544 | handlers, | ||
545 | &error_handler, | ||
546 | sh); | ||
547 | ev = GNUNET_MQ_msg (init, | 545 | ev = GNUNET_MQ_msg (init, |
548 | GNUNET_MESSAGE_TYPE_ATS_START); | 546 | GNUNET_MESSAGE_TYPE_ATS_START); |
549 | init->start_flag = htonl (START_FLAG_SCHEDULING); | 547 | init->start_flag = htonl (START_FLAG_SCHEDULING); |