From: Philipp Tölke Date: Fri, 8 Oct 2010 07:36:35 +0000 (+0000) Subject: if we have no connection to the service-dns, don't queue X-Git-Tag: initial-import-from-subversion-38251~20125 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18a5a28dd455e5d59673593a7f08c2ed1bfae868;p=oweals%2Fgnunet.git if we have no connection to the service-dns, don't queue --- 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