diff options
Diffstat (limited to 'src/util/connection.c')
-rw-r--r-- | src/util/connection.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/util/connection.c b/src/util/connection.c index f88a7b5f2..8a7be4045 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -785,16 +785,14 @@ try_connect_using_address (void *cls, | |||
785 | delay = GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT; | 785 | delay = GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT; |
786 | if (h->nth.notify_ready != NULL) | 786 | if (h->nth.notify_ready != NULL) |
787 | delay = GNUNET_TIME_relative_min (delay, | 787 | delay = GNUNET_TIME_relative_min (delay, |
788 | GNUNET_TIME_absolute_get_remaining (h-> | 788 | GNUNET_TIME_absolute_get_remaining |
789 | nth. | 789 | (h->nth.transmit_timeout)); |
790 | transmit_timeout)); | ||
791 | if (h->receiver != NULL) | 790 | if (h->receiver != NULL) |
792 | delay = GNUNET_TIME_relative_min (delay, | 791 | delay = GNUNET_TIME_relative_min (delay, |
793 | GNUNET_TIME_absolute_get_remaining (h-> | 792 | GNUNET_TIME_absolute_get_remaining |
794 | receive_timeout)); | 793 | (h->receive_timeout)); |
795 | ap->task = | 794 | ap->task = |
796 | GNUNET_SCHEDULER_add_write_net (h->sched, | 795 | GNUNET_SCHEDULER_add_write_net (h->sched, delay, ap->sock, |
797 | delay, ap->sock, | ||
798 | &connect_probe_continuation, ap); | 796 | &connect_probe_continuation, ap); |
799 | } | 797 | } |
800 | 798 | ||
@@ -813,11 +811,12 @@ retry_connect_continuation (void *cls, | |||
813 | 811 | ||
814 | GNUNET_assert (sock->dns_active == NULL); | 812 | GNUNET_assert (sock->dns_active == NULL); |
815 | sock->dns_active = GNUNET_RESOLVER_ip_get (sock->sched, | 813 | sock->dns_active = GNUNET_RESOLVER_ip_get (sock->sched, |
816 | sock->cfg, | 814 | sock->cfg, |
817 | sock->hostname, | 815 | sock->hostname, |
818 | AF_UNSPEC, | 816 | AF_UNSPEC, |
819 | GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT, | 817 | GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT, |
820 | &try_connect_using_address, sock); | 818 | &try_connect_using_address, |
819 | sock); | ||
821 | } | 820 | } |
822 | 821 | ||
823 | 822 | ||
@@ -1000,8 +999,9 @@ receive_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1000 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 999 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1001 | "Receive from `%s' encounters error: time out by %llums... (%p)\n", | 1000 | "Receive from `%s' encounters error: time out by %llums... (%p)\n", |
1002 | GNUNET_a2s (sh->addr, sh->addrlen), | 1001 | GNUNET_a2s (sh->addr, sh->addrlen), |
1003 | GNUNET_TIME_absolute_get_duration (sh->receive_timeout). | 1002 | GNUNET_TIME_absolute_get_duration (sh-> |
1004 | value, sh); | 1003 | receive_timeout).value, |
1004 | sh); | ||
1005 | #endif | 1005 | #endif |
1006 | signal_timeout (sh); | 1006 | signal_timeout (sh); |
1007 | return; | 1007 | return; |
@@ -1348,8 +1348,8 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1348 | GNUNET_assert (sock->write_buffer_pos <= sock->write_buffer_size); | 1348 | GNUNET_assert (sock->write_buffer_pos <= sock->write_buffer_size); |
1349 | RETRY: | 1349 | RETRY: |
1350 | ret = GNUNET_NETWORK_socket_send (sock->sock, | 1350 | ret = GNUNET_NETWORK_socket_send (sock->sock, |
1351 | &sock->write_buffer[sock-> | 1351 | &sock-> |
1352 | write_buffer_pos], | 1352 | write_buffer[sock->write_buffer_pos], |
1353 | have); | 1353 | have); |
1354 | if (ret == -1) | 1354 | if (ret == -1) |
1355 | { | 1355 | { |
@@ -1446,8 +1446,8 @@ GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle | |||
1446 | #endif | 1446 | #endif |
1447 | sock->write_task = GNUNET_SCHEDULER_add_write_net (sock->sched, | 1447 | sock->write_task = GNUNET_SCHEDULER_add_write_net (sock->sched, |
1448 | GNUNET_TIME_absolute_get_remaining | 1448 | GNUNET_TIME_absolute_get_remaining |
1449 | (sock->nth. | 1449 | (sock-> |
1450 | transmit_timeout), | 1450 | nth.transmit_timeout), |
1451 | sock->sock, | 1451 | sock->sock, |
1452 | &transmit_ready, | 1452 | &transmit_ready, |
1453 | sock); | 1453 | sock); |