From 18a5a28dd455e5d59673593a7f08c2ed1bfae868 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Fri, 8 Oct 2010 07:36:35 +0000 Subject: [PATCH] if we have no connection to the service-dns, don't queue --- src/vpn/gnunet-daemon-vpn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 43cca9881..8790ff7f3 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -255,7 +255,8 @@ static void message_token(void *cls, void *client, const struct GNUNET_MessageHe GNUNET_CONTAINER_DLL_insert_after(mycls.head, mycls.tail, mycls.tail, query); - /* struct GNUNET_CLIENT_TransmitHandle* th = */ GNUNET_CLIENT_notify_transmit_ready(mycls.dns_connection, len, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, NULL); + if (mycls.dns_connection != NULL) + /* struct GNUNET_CLIENT_TransmitHandle* th = */ GNUNET_CLIENT_notify_transmit_ready(mycls.dns_connection, len, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, NULL); } } @@ -273,6 +274,8 @@ reconnect_to_service_dns (void *cls, GNUNET_assert (mycls.dns_connection == NULL); mycls.dns_connection = GNUNET_CLIENT_connect (mycls.sched, "dns", mycls.cfg); GNUNET_CLIENT_receive(mycls.dns_connection, &dns_answer_handler, NULL, GNUNET_TIME_UNIT_FOREVER_REL); + if (mycls.head != NULL) + /* struct GNUNET_CLIENT_TransmitHandle* th = */ GNUNET_CLIENT_notify_transmit_ready(mycls.dns_connection, ntohs(mycls.head->pkt.hdr.size), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, NULL); } static void -- 2.25.1