diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-11 13:46:02 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-11 13:46:02 +0000 |
commit | 7c8f917f194f402fa1bd2ee5bf12cd9046f16ee1 (patch) | |
tree | 86d95f17b0d803a44b8f52eec48cc3f8e016635e | |
parent | c5e75397db3b88d41f1bd61b6422ddc74993f797 (diff) | |
download | gnunet-7c8f917f194f402fa1bd2ee5bf12cd9046f16ee1.tar.gz gnunet-7c8f917f194f402fa1bd2ee5bf12cd9046f16ee1.zip |
eliminate dead call from API
-rw-r--r-- | src/ats/ats_api_scheduling.c | 29 | ||||
-rw-r--r-- | src/include/gnunet_ats_service.h | 21 |
2 files changed, 8 insertions, 42 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index f02e4a9e7..a0a196d1a 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -462,7 +462,7 @@ error_handler (void *cls, | |||
462 | { | 462 | { |
463 | struct GNUNET_ATS_SchedulingHandle *sh = cls; | 463 | struct GNUNET_ATS_SchedulingHandle *sh = cls; |
464 | 464 | ||
465 | LOG (GNUNET_ERROR_TYPE_WARNING, | 465 | LOG (GNUNET_ERROR_TYPE_ERROR, |
466 | "ATS connection died (code %d), reconnecting\n", | 466 | "ATS connection died (code %d), reconnecting\n", |
467 | (int) error); | 467 | (int) error); |
468 | force_reconnect (sh); | 468 | force_reconnect (sh); |
@@ -540,9 +540,11 @@ reconnect (struct GNUNET_ATS_SchedulingHandle *sh) | |||
540 | struct GNUNET_ATS_AddressRecord *ar; | 540 | struct GNUNET_ATS_AddressRecord *ar; |
541 | 541 | ||
542 | GNUNET_assert (NULL == sh->client); | 542 | GNUNET_assert (NULL == sh->client); |
543 | sh->client = GNUNET_CLIENT_connect ("ats", sh->cfg); | 543 | sh->client = GNUNET_CLIENT_connect ("ats", |
544 | sh->cfg); | ||
544 | if (NULL == sh->client) | 545 | if (NULL == sh->client) |
545 | { | 546 | { |
547 | GNUNET_break (0); | ||
546 | force_reconnect (sh); | 548 | force_reconnect (sh); |
547 | return; | 549 | return; |
548 | } | 550 | } |
@@ -633,29 +635,6 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh) | |||
633 | 635 | ||
634 | 636 | ||
635 | /** | 637 | /** |
636 | * Test if a address and a session is known to ATS | ||
637 | * | ||
638 | * @param sh the scheduling handle | ||
639 | * @param address the address | ||
640 | * @param session the session | ||
641 | * @return #GNUNET_YES or #GNUNET_NO | ||
642 | */ | ||
643 | int | ||
644 | GNUNET_ATS_session_known (struct GNUNET_ATS_SchedulingHandle *sh, | ||
645 | const struct GNUNET_HELLO_Address *address, | ||
646 | struct Session *session) | ||
647 | { | ||
648 | if (NULL == session) | ||
649 | return GNUNET_NO; | ||
650 | if (NOT_FOUND != find_session_id (sh, | ||
651 | session, | ||
652 | address)) | ||
653 | return GNUNET_YES; /* Exists */ | ||
654 | return GNUNET_NO; | ||
655 | } | ||
656 | |||
657 | |||
658 | /** | ||
659 | * We have a new address ATS should know. Addresses have to be added | 638 | * We have a new address ATS should know. Addresses have to be added |
660 | * with this function before they can be: updated, set in use and | 639 | * with this function before they can be: updated, set in use and |
661 | * destroyed. | 640 | * destroyed. |
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 8b28f5dc7..749e604fa 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -379,20 +379,6 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh); | |||
379 | 379 | ||
380 | 380 | ||
381 | /** | 381 | /** |
382 | * Test if a address and a session is known to ATS. | ||
383 | * | ||
384 | * @param sh the scheduling handle | ||
385 | * @param address the address | ||
386 | * @param session the session | ||
387 | * @return #GNUNET_YES or #GNUNET_NO | ||
388 | */ | ||
389 | int | ||
390 | GNUNET_ATS_session_known (struct GNUNET_ATS_SchedulingHandle *sh, | ||
391 | const struct GNUNET_HELLO_Address *address, | ||
392 | struct Session *session); | ||
393 | |||
394 | |||
395 | /** | ||
396 | * Handle used within ATS to track an address. | 382 | * Handle used within ATS to track an address. |
397 | */ | 383 | */ |
398 | struct GNUNET_ATS_AddressRecord; | 384 | struct GNUNET_ATS_AddressRecord; |
@@ -485,7 +471,9 @@ struct GNUNET_ATS_PerformanceHandle; | |||
485 | * Signature of a function that is called with QoS information about an address. | 471 | * Signature of a function that is called with QoS information about an address. |
486 | * | 472 | * |
487 | * @param cls closure | 473 | * @param cls closure |
488 | * @param address the address, NULL if ATS service was disconnected | 474 | * @param address the address, NULL if ATS service was disconnected or |
475 | * when the iteration is completed in the case of | ||
476 | * #GNUNET_ATS_performance_list_addresses() | ||
489 | * @param address_active #GNUNET_YES if this address is actively used | 477 | * @param address_active #GNUNET_YES if this address is actively used |
490 | * to maintain a connection to a peer; | 478 | * to maintain a connection to a peer; |
491 | * #GNUNET_NO if the address is not actively used; | 479 | * #GNUNET_NO if the address is not actively used; |
@@ -524,7 +512,6 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
524 | void *addr_info_cb_cls); | 512 | void *addr_info_cb_cls); |
525 | 513 | ||
526 | 514 | ||
527 | |||
528 | /** | 515 | /** |
529 | * Get information about addresses known to the ATS subsystem. | 516 | * Get information about addresses known to the ATS subsystem. |
530 | * | 517 | * |
@@ -535,7 +522,7 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
535 | * @param infocb callback to call with the addresses, | 522 | * @param infocb callback to call with the addresses, |
536 | * will callback with address == NULL when done | 523 | * will callback with address == NULL when done |
537 | * @param infocb_cls closure for @a infocb | 524 | * @param infocb_cls closure for @a infocb |
538 | * @return ats performance context | 525 | * @return handle to abort the operation |
539 | */ | 526 | */ |
540 | struct GNUNET_ATS_AddressListHandle * | 527 | struct GNUNET_ATS_AddressListHandle * |
541 | GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *handle, | 528 | GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *handle, |