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)
downloadgnunet-28bd1a2efc17255c7bfbb21f47ec52b83ff209e8.tar.gz
gnunet-28bd1a2efc17255c7bfbb21f47ec52b83ff209e8.zip
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 6349e0547..a9deb58ad 100644
--- a/src/vpn/gnunet-service-dns.c
+++ b/src/vpn/gnunet-service-dns.c
@@ -1135,25 +1135,27 @@ run (void *cls,
1135 {NULL, NULL, 0, 0} 1135 {NULL, NULL, 0, 0}
1136 }; 1136 };
1137 1137
1138 static struct GNUNET_MESH_MessageHandler *mesh_handlers; 1138 static const struct GNUNET_MESH_MessageHandler mesh_handlers[] = {
1139 {receive_mesh_query, GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS, 0},
1140 {receive_mesh_answer, GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS, 0},
1141 {NULL, 0, 0}
1142 };
1143
1144 static GNUNET_MESH_ApplicationType *apptypes;
1139 1145
1140 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno(cfg_, "dns", "PROVIDE_EXIT")) 1146 if (GNUNET_YES ==
1141 mesh_handlers = (struct GNUNET_MESH_MessageHandler[]) { 1147 GNUNET_CONFIGURATION_get_value_yesno (cfg_, "dns", "PROVIDE_EXIT"))
1142 {receive_mesh_query, GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS, 0}, 1148 apptypes = (GNUNET_MESH_ApplicationType[])
1143 {NULL, 0, 0} 1149 {
1144 }; 1150 GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER,
1151 GNUNET_APPLICATION_TYPE_END};
1145 else 1152 else
1146 mesh_handlers = (struct GNUNET_MESH_MessageHandler[]) { 1153 apptypes = (GNUNET_MESH_ApplicationType[])
1147 {receive_mesh_answer, GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS, 0}, 1154 {
1148 {NULL, 0, 0} 1155 GNUNET_APPLICATION_TYPE_END};
1149 };
1150
1151 static const GNUNET_MESH_ApplicationType apptypes[] =
1152 { GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER,
1153 GNUNET_APPLICATION_TYPE_END
1154 };
1155 1156
1156 mesh_handle = GNUNET_MESH_connect (cfg_, NULL, NULL, mesh_handlers, apptypes); 1157 mesh_handle =
1158 GNUNET_MESH_connect (cfg_, NULL, NULL, mesh_handlers, apptypes);
1157 1159
1158 cfg = cfg_; 1160 cfg = cfg_;
1159 1161