summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-10-23 03:46:02 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-10-23 03:46:02 +0200
commite11b48f3eab5d67ffc45dd1f77a6651a1f91b2ab (patch)
treee0e62595895c33f78feb0d889bec93657e4b2ed1
parent758611ccd2a8ce105258cf766fc5aa7b0719ae95 (diff)
downloadffd-e11b48f3eab5d67ffc45dd1f77a6651a1f91b2ab.tar
ffd-e11b48f3eab5d67ffc45dd1f77a6651a1f91b2ab.zip
Simplify urgent update resend setup codeHEADmaster
-rw-r--r--ffd/update.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ffd/update.c b/ffd/update.c
index 77319bd..7ae760a 100644
--- a/ffd/update.c
+++ b/ffd/update.c
@@ -107,11 +107,9 @@ void ffd_update_enqueue(const ffd_node_id_t *node, uint16_t type, uint16_t key,
ffd_ack_request(update_request_ack, update_request_ack_free, FFD_ACK_INTERVAL, 10, update_ref(arg));
}
else {
- ffd_queue_put_delayed(&pending_updates, NULL, &now, FFD_URGENT_DELAY, update_ref(arg));
- ffd_queue_put_delayed(&pending_updates, NULL, &now, 2*FFD_URGENT_DELAY, update_ref(arg));
- ffd_queue_put_delayed(&pending_updates, NULL, &now, 3*FFD_URGENT_DELAY, update_ref(arg));
- ffd_queue_put_delayed(&pending_updates, NULL, &now, 4*FFD_URGENT_DELAY, update_ref(arg));
- ffd_queue_put_delayed(&pending_updates, NULL, &now, 5*FFD_URGENT_DELAY, update_ref(arg));
+ int i;
+ for (i = 1; i <= 5; i++)
+ ffd_queue_put_delayed(&pending_updates, NULL, &now, i*FFD_URGENT_DELAY, update_ref(arg));
}
}
else {