[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16310 - gnunet/src/vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16310 - gnunet/src/vpn |
Date: |
Tue, 2 Aug 2011 09:34:36 +0200 |
Author: toelke
Date: 2011-08-02 09:34:36 +0200 (Tue, 02 Aug 2011)
New Revision: 16310
Modified:
gnunet/src/vpn/gnunet-service-dns.c
Log:
Revert "really reuse the dns-tunnel"
This reverts commit 5e3c96a064cd8223fa50d14243c285578a7284c6.
Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-08-02 07:34:33 UTC (rev 16309)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-08-02 07:34:36 UTC (rev 16310)
@@ -48,8 +48,6 @@
*/
static struct GNUNET_MESH_Tunnel* dns_tunnel;
-char dns_tunnel_connected;
-
/**
* The UDP-Socket through which DNS-Resolves will be sent if they are not to be
* sent through gnunet. The port of this socket will not be hijacked.
@@ -232,7 +230,6 @@
struct GNUNET_MessageHeader *hdr = buf;
uint32_t *sz = cls;
struct GNUNET_MESH_Tunnel **tunnel = (struct GNUNET_MESH_Tunnel**)(sz+1);
- GNUNET_MESH_tunnel_set_data(*tunnel, NULL);
struct dns_pkt *dns = (struct dns_pkt *) (tunnel + 1);
hdr->type = htons (GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS);
hdr->size = htons (*sz + sizeof (struct GNUNET_MessageHeader));
@@ -317,18 +314,13 @@
const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__ ((unused)))
{
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "mesh_connect called with %x, %x\n",
cls, peer);
- return;
if (NULL == peer)
return;
struct tunnel_cls *cls_ = (struct tunnel_cls *) cls;
- if ((struct GNUNET_PeerIdentity*)1 != peer)
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Connected to peer %s, sending query with id %d\n",
- GNUNET_i2s (peer), ntohs (cls_->dns.s.id));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Connected to peer %s, sending query with id %d\n",
+ GNUNET_i2s (peer), ntohs (cls_->dns.s.id));
- dns_tunnel_connected = 1;
-
if (NULL == GNUNET_MESH_tunnel_get_data (cls_->tunnel))
{
struct GNUNET_MESH_TransmitHandle *th =
@@ -359,16 +351,7 @@
}
}
-static void
-call_mesh_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
-{
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
- mesh_connect (cls, (struct GNUNET_PeerIdentity *) 1, NULL);
-}
-
-
static void
send_mesh_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
@@ -377,18 +360,13 @@
struct tunnel_cls *cls_ = (struct tunnel_cls*)cls;
- if (NULL == dns_tunnel || dns_tunnel_connected == 0)
- {
- dns_tunnel = GNUNET_MESH_peer_request_connect_by_type(mesh_handle,
+ if (NULL == dns_tunnel)
+ dns_tunnel = GNUNET_MESH_peer_request_connect_by_type(mesh_handle,
GNUNET_TIME_UNIT_HOURS,
GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER,
mesh_connect,
NULL,
cls_);
- }
- else
- GNUNET_SCHEDULER_add_now(call_mesh_connect, cls_);
-
cls_->tunnel = dns_tunnel;
remote_pending[cls_->dns.s.id] = cls_;
}
@@ -433,8 +411,6 @@
/* TODo: size check */
struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "received dns-answer via %x,
id=%d/%\nd\n", tunnel, dns->s.id, ntohs(dns->s.id));
-
/* They sent us a packet we were not waiting for */
if (remote_pending[dns->s.id] == NULL
|| remote_pending[dns->s.id]->tunnel != tunnel)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16310 - gnunet/src/vpn,
gnunet <=