From: Philipp Tölke Date: Sun, 3 Oct 2010 17:29:46 +0000 (+0000) Subject: Handle the case, that DNS-Answers come faster than the helper can accept them X-Git-Tag: initial-import-from-subversion-38251~20200 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=75b0d074214e98cacdaa8135dc4cb2c35dd1de36;p=oweals%2Fgnunet.git Handle the case, that DNS-Answers come faster than the helper can accept them --- 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)