aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorPhilipp Tölke <toelke@in.tum.de>2011-06-15 07:15:46 +0000
committerPhilipp Tölke <toelke@in.tum.de>2011-06-15 07:15:46 +0000
commit28bd1a2efc17255c7bfbb21f47ec52b83ff209e8 (patch)
tree79766b093c3c51028e671e0186b6a95a9d936f0c /src/vpn
parentc5e809eb24fdf71bda7523d2aa3b5c077a08cb4c (diff)
Correctly honor the PROVIDE_EXIT-option
We are not using the msg-types to arbitrate anymore...
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/gnunet-service-dns.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c
index 6349e0547f..a9deb58ade 100644
--- a/src/vpn/gnunet-service-dns.c
+++ b/src/vpn/gnunet-service-dns.c
@@ -1135,25 +1135,27 @@ run (void *cls,
{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}
+ };
+
+ static GNUNET_MESH_ApplicationType *apptypes;
- 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}
- };
+ 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}
- };
-
- static const GNUNET_MESH_ApplicationType apptypes[] =
- { GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER,
- GNUNET_APPLICATION_TYPE_END
- };
+ apptypes = (GNUNET_MESH_ApplicationType[])
+ {
+ 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_;