gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r15621 - gnunet/src/vpn


From: gnunet
Subject: [GNUnet-SVN] r15621 - gnunet/src/vpn
Date: Wed, 15 Jun 2011 09:15:46 +0200

Author: toelke
Date: 2011-06-15 09:15:46 +0200 (Wed, 15 Jun 2011)
New Revision: 15621

Modified:
   gnunet/src/vpn/gnunet-service-dns.c
Log:
Correctly honor the PROVIDE_EXIT-option

We are not using the msg-types to arbitrate anymore...

Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-06-15 07:15:45 UTC (rev 15620)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-06-15 07:15:46 UTC (rev 15621)
@@ -1135,26 +1135,28 @@
     {NULL, NULL, 0, 0}
   };
 
-  static struct GNUNET_MESH_MessageHandler *mesh_handlers;
+  static const struct GNUNET_MESH_MessageHandler mesh_handlers[] = {
+    {receive_mesh_query, GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS, 0},
+    {receive_mesh_answer, GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS, 0},
+    {NULL, 0, 0}
+  };
 
-  if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno(cfg_, "dns", 
"PROVIDE_EXIT"))
-    mesh_handlers = (struct GNUNET_MESH_MessageHandler[]) {
-          {receive_mesh_query, GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS, 0},
-          {NULL, 0, 0}
-    };
+  static GNUNET_MESH_ApplicationType *apptypes;
+
+  if (GNUNET_YES ==
+      GNUNET_CONFIGURATION_get_value_yesno (cfg_, "dns", "PROVIDE_EXIT"))
+    apptypes = (GNUNET_MESH_ApplicationType[])
+    {
+    GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER,
+    GNUNET_APPLICATION_TYPE_END};
   else
-    mesh_handlers = (struct GNUNET_MESH_MessageHandler[]) {
-          {receive_mesh_answer, GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS, 0},
-          {NULL, 0, 0}
-    };
+  apptypes = (GNUNET_MESH_ApplicationType[])
+  {
+  GNUNET_APPLICATION_TYPE_END};
 
-  static const GNUNET_MESH_ApplicationType apptypes[] =
-    { GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER,
-    GNUNET_APPLICATION_TYPE_END
-  };
+  mesh_handle =
+    GNUNET_MESH_connect (cfg_, NULL, NULL, mesh_handlers, apptypes);
 
-  mesh_handle = GNUNET_MESH_connect (cfg_, NULL, NULL, mesh_handlers, 
apptypes);
-
   cfg = cfg_;
 
   unsigned int i;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]