From 75b0d074214e98cacdaa8135dc4cb2c35dd1de36 Mon Sep 17 00:00:00 2001 From: Philipp Tölke Date: Sun, 3 Oct 2010 17:29:46 +0000 Subject: Handle the case, that DNS-Answers come faster than the helper can accept them --- src/vpn/gnunet-daemon-vpn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vpn') diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 1c30e965a..a078747a0 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -192,7 +192,8 @@ static void helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* t /* FIXME */ GNUNET_DISK_file_write(mycls.fh_to_helper, pkt, pkt_len); - /* TODO: if still in dll, reschedule */ + if (mycls.answer_head != NULL) + GNUNET_SCHEDULER_add_write_file (mycls.sched, GNUNET_TIME_UNIT_FOREVER_REL, mycls.fh_to_helper, &helper_write, NULL); } size_t send_query(void* cls, size_t size, void* buf) -- cgit v1.2.3