summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_manipulation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-22 00:46:03 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-22 00:46:03 +0100
commit7e9e4e320d6eee5bf6afd876b282609712cb72db (patch)
treeeda9315b99a026c9033d2db0ed7993d4e524700d /src/transport/gnunet-service-transport_manipulation.c
parent542bf871c6eebdc645884960559e15ce400939e6 (diff)
use new SCHEDULER_add_at API where applicable
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.c')
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index f198d6e49..e68753583 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -219,7 +219,6 @@ send_delayed (void *cls)
struct DelayQueueEntry *dqe = cls;
struct DelayQueueEntry *next;
struct TM_Peer *tmp = dqe->tmp;
- struct GNUNET_TIME_Relative delay;
GNUNET_break (GNUNET_YES ==
GST_neighbours_test_connected (&dqe->id));
@@ -233,9 +232,9 @@ send_delayed (void *cls)
if (NULL != next)
{
/* More delayed messages */
- delay = GNUNET_TIME_absolute_get_remaining(next->sent_at);
- tmp->send_delay_task = GNUNET_SCHEDULER_add_delayed(delay,
- &send_delayed, next);
+ tmp->send_delay_task = GNUNET_SCHEDULER_add_at (next->sent_at,
+ &send_delayed,
+ next);
}
}
else
@@ -249,10 +248,9 @@ send_delayed (void *cls)
if (NULL != next)
{
/* More delayed messages */
- delay = GNUNET_TIME_absolute_get_remaining(next->sent_at);
- generic_send_delay_task = GNUNET_SCHEDULER_add_delayed (delay,
- &send_delayed,
- next);
+ generic_send_delay_task = GNUNET_SCHEDULER_add_at (next->sent_at,
+ &send_delayed,
+ next);
}
}
GST_neighbours_send (&dqe->id,
@@ -503,9 +501,9 @@ GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer)
generic_send_delay_task = NULL;
if (NULL != generic_dqe_head)
generic_send_delay_task
- = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining(generic_dqe_head->sent_at),
- &send_delayed,
- generic_dqe_head);
+ = GNUNET_SCHEDULER_add_at (generic_dqe_head->sent_at,
+ &send_delayed,
+ generic_dqe_head);
}
}