[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15067 - gnunet/src/vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15067 - gnunet/src/vpn |
Date: |
Thu, 21 Apr 2011 15:44:49 +0200 |
Author: toelke
Date: 2011-04-21 15:44:49 +0200 (Thu, 21 Apr 2011)
New Revision: 15067
Modified:
gnunet/src/vpn/gnunet-daemon-vpn.c
gnunet/src/vpn/gnunet-service-dns.c
Log:
cleanup
Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c 2011-04-21 13:44:49 UTC (rev 15066)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c 2011-04-21 13:44:49 UTC (rev 15067)
@@ -560,14 +560,6 @@
return GNUNET_OK;
}
-void init_mesh (void* cls, struct GNUNET_MESH_Handle* server, const struct
GNUNET_PeerIdentity* my_identity, const struct
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pubkey) {
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Connected to MESH, I am %x\n",
*((unsigned long*)my_identity));
-}
-
-void connect_mesh (void* cls, const struct GNUNET_PeerIdentity* peer, const
struct GNUNET_TRANSPORT_ATS_Information *atsi) {
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %x\n", *((unsigned
long*)peer));
-}
-
/**
* Main function that will be run by the scheduler.
*
Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-04-21 13:44:49 UTC (rev 15066)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-04-21 13:44:49 UTC (rev 15067)
@@ -257,6 +257,9 @@
static void
send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) {
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
+ return;
+
struct dns_pkt_parsed* pdns = (struct dns_pkt_parsed*) cls;
unsigned short id = pdns->s.id;
@@ -504,7 +507,8 @@
}
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Query for '%s'; namelen=%d\n",
pdns->queries[0]->name, pdns->queries[0]->namelen);
- /* The query is for a PTR of a previosly resolved virtual IP */
+
+ /* This is a PTR-Query. Check if it is for "our" network */
if (htons(pdns->queries[0]->qtype) == 12 &&
74 == pdns->queries[0]->namelen)
{
@@ -973,10 +977,11 @@
const struct GNUNET_CONFIGURATION_Handle *cfg_)
{
static const struct GNUNET_SERVER_MessageHandler handlers[] = {
- /* callback, cls, type, size */
- {&receive_query, NULL, GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS, 0},
- {&rehijack, NULL, GNUNET_MESSAGE_TYPE_REHIJACK, sizeof(struct
GNUNET_MessageHeader)},
- {NULL, NULL, 0, 0}
+ /* callback, cls, type, size */
+ {&receive_query, NULL, GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS, 0},
+ {&rehijack, NULL, GNUNET_MESSAGE_TYPE_REHIJACK,
+ sizeof (struct GNUNET_MessageHeader)},
+ {NULL, NULL, 0, 0}
};
@@ -995,20 +1000,20 @@
cfg = cfg_;
unsigned int i;
- for (i = 0; i < 65536; i++) {
+ for (i = 0; i < 65536; i++)
+ {
query_states[i].valid = GNUNET_NO;
- }
+ }
- dht = GNUNET_DHT_connect(cfg, 1024);
+ dht = GNUNET_DHT_connect (cfg, 1024);
- open_port();
+ open_port ();
GNUNET_SCHEDULER_add_now (publish_names, NULL);
GNUNET_SERVER_add_handlers (server, handlers);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &cleanup_task,
- cls);
+ &cleanup_task, cls);
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15067 - gnunet/src/vpn,
gnunet <=