aboutsummaryrefslogtreecommitdiff
path: root/src/util/resolver_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/resolver_api.c')
-rw-r--r--src/util/resolver_api.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c
index 81ec01af4..e7a836f03 100644
--- a/src/util/resolver_api.c
+++ b/src/util/resolver_api.c
@@ -532,11 +532,9 @@ handle_response (void *cls,
532 * numeric addresses. 532 * numeric addresses.
533 * 533 *
534 * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request 534 * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request
535 * @param tc unused scheduler context
536 */ 535 */
537static void 536static void
538numeric_resolution (void *cls, 537numeric_resolution (void *cls)
539 const struct GNUNET_SCHEDULER_TaskContext *tc)
540{ 538{
541 struct GNUNET_RESOLVER_RequestHandle *rh = cls; 539 struct GNUNET_RESOLVER_RequestHandle *rh = cls;
542 struct sockaddr_in v4; 540 struct sockaddr_in v4;
@@ -600,11 +598,9 @@ numeric_resolution (void *cls,
600 * respective loopback numeric addresses. 598 * respective loopback numeric addresses.
601 * 599 *
602 * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request 600 * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request
603 * @param tc unused scheduler context
604 */ 601 */
605static void 602static void
606loopback_resolution (void *cls, 603loopback_resolution (void *cls)
607 const struct GNUNET_SCHEDULER_TaskContext *tc)
608{ 604{
609 struct GNUNET_RESOLVER_RequestHandle *rh = cls; 605 struct GNUNET_RESOLVER_RequestHandle *rh = cls;
610 struct sockaddr_in v4; 606 struct sockaddr_in v4;
@@ -658,8 +654,7 @@ loopback_resolution (void *cls,
658 * Task executed on system shutdown. 654 * Task executed on system shutdown.
659 */ 655 */
660static void 656static void
661shutdown_task (void *cls, 657shutdown_task (void *cls)
662 const struct GNUNET_SCHEDULER_TaskContext *tc)
663{ 658{
664 s_task = NULL; 659 s_task = NULL;
665 GNUNET_RESOLVER_disconnect (); 660 GNUNET_RESOLVER_disconnect ();
@@ -728,15 +723,16 @@ process_requests ()
728 * Now try to reconnect to the resolver service. 723 * Now try to reconnect to the resolver service.
729 * 724 *
730 * @param cls NULL 725 * @param cls NULL
731 * @param tc scheduler context
732 */ 726 */
733static void 727static void
734reconnect_task (void *cls, 728reconnect_task (void *cls)
735 const struct GNUNET_SCHEDULER_TaskContext *tc)
736{ 729{
730 const struct GNUNET_SCHEDULER_TaskContext *tc;
731
737 r_task = NULL; 732 r_task = NULL;
738 if (NULL == req_head) 733 if (NULL == req_head)
739 return; /* no work pending */ 734 return; /* no work pending */
735 tc = GNUNET_SCHEDULER_get_task_context ();
740 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 736 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
741 return; 737 return;
742 LOG (GNUNET_ERROR_TYPE_DEBUG, 738 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -802,11 +798,9 @@ reconnect ()
802 * A DNS resolution timed out. Notify the application. 798 * A DNS resolution timed out. Notify the application.
803 * 799 *
804 * @param cls the `struct GNUNET_RESOLVER_RequestHandle *` 800 * @param cls the `struct GNUNET_RESOLVER_RequestHandle *`
805 * @param tc scheduler context
806 */ 801 */
807static void 802static void
808handle_lookup_timeout (void *cls, 803handle_lookup_timeout (void *cls)
809 const struct GNUNET_SCHEDULER_TaskContext *tc)
810{ 804{
811 struct GNUNET_RESOLVER_RequestHandle *rh = cls; 805 struct GNUNET_RESOLVER_RequestHandle *rh = cls;
812 806
@@ -902,11 +896,9 @@ GNUNET_RESOLVER_ip_get (const char *hostname,
902 * conversion and invoke the callback. 896 * conversion and invoke the callback.
903 * 897 *
904 * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request 898 * @param cls `struct GNUNET_RESOLVER_RequestHandle` for the request
905 * @param tc unused scheduler context
906 */ 899 */
907static void 900static void
908numeric_reverse (void *cls, 901numeric_reverse (void *cls)
909 const struct GNUNET_SCHEDULER_TaskContext *tc)
910{ 902{
911 struct GNUNET_RESOLVER_RequestHandle *rh = cls; 903 struct GNUNET_RESOLVER_RequestHandle *rh = cls;
912 char *result; 904 char *result;