diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-05 14:03:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-05 14:03:17 +0000 |
commit | cedace4f43101e97c35226d8f3a44a20cd4e7665 (patch) | |
tree | 872dd82ce9d871b48771232ffe8cfd41bd0ccca1 /src/gns | |
parent | 99f235f53998fcefa56cf9690241d3c709d69364 (diff) | |
download | gnunet-cedace4f43101e97c35226d8f3a44a20cd4e7665.tar.gz gnunet-cedace4f43101e97c35226d8f3a44a20cd4e7665.zip |
-make gns independent of vpn on W32
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/Makefile.am | 6 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index cd997dbdc..030529d2a 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -21,6 +21,8 @@ if MINGW | |||
21 | DO_W32_NSP = libw32nsp.la | 21 | DO_W32_NSP = libw32nsp.la |
22 | DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve | 22 | DO_W32_NSPTOOLS = w32nsp-install w32nsp-uninstall w32nsp-resolve |
23 | DO_W32_HS_CONF = gns-helper-service-w32.conf | 23 | DO_W32_HS_CONF = gns-helper-service-w32.conf |
24 | else | ||
25 | USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la | ||
24 | endif | 26 | endif |
25 | 27 | ||
26 | if USE_COVERAGE | 28 | if USE_COVERAGE |
@@ -131,7 +133,7 @@ gnunet_service_gns_LDADD = \ | |||
131 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ | 133 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ |
132 | $(top_builddir)/src/dht/libgnunetdht.la \ | 134 | $(top_builddir)/src/dht/libgnunetdht.la \ |
133 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 135 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
134 | $(top_builddir)/src/vpn/libgnunetvpn.la \ | 136 | $(USE_VPN) \ |
135 | $(GN_LIBINTL) | 137 | $(GN_LIBINTL) |
136 | gnunet_service_gns_DEPENDENCIES = \ | 138 | gnunet_service_gns_DEPENDENCIES = \ |
137 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 139 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
@@ -141,7 +143,7 @@ gnunet_service_gns_DEPENDENCIES = \ | |||
141 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ | 143 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ |
142 | $(top_builddir)/src/dht/libgnunetdht.la \ | 144 | $(top_builddir)/src/dht/libgnunetdht.la \ |
143 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 145 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
144 | $(top_builddir)/src/vpn/libgnunetvpn.la | 146 | $(USE_VPN) |
145 | 147 | ||
146 | 148 | ||
147 | 149 | ||
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 058d0c971..9d77cf902 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include "gnunet_dns_service.h" | 29 | #include "gnunet_dns_service.h" |
30 | #include "gnunet_dht_service.h" | 30 | #include "gnunet_dht_service.h" |
31 | #include "gnunet_namestore_service.h" | 31 | #include "gnunet_namestore_service.h" |
32 | #include "gnunet_vpn_service.h" | ||
33 | #include "gnunet_dns_service.h" | 32 | #include "gnunet_dns_service.h" |
34 | #include "gnunet_resolver_service.h" | 33 | #include "gnunet_resolver_service.h" |
35 | #include "gnunet_dnsparser_lib.h" | 34 | #include "gnunet_dnsparser_lib.h" |
@@ -39,6 +38,10 @@ | |||
39 | #include "block_gns.h" | 38 | #include "block_gns.h" |
40 | #include "gns.h" | 39 | #include "gns.h" |
41 | #include "gnunet-service-gns_resolver.h" | 40 | #include "gnunet-service-gns_resolver.h" |
41 | #ifndef WINDOWS | ||
42 | #include "gnunet_vpn_service.h" | ||
43 | #endif | ||
44 | |||
42 | 45 | ||
43 | /** | 46 | /** |
44 | * Default DHT timeout | 47 | * Default DHT timeout |
@@ -56,10 +59,12 @@ | |||
56 | */ | 59 | */ |
57 | static struct GNUNET_NAMESTORE_Handle *namestore_handle; | 60 | static struct GNUNET_NAMESTORE_Handle *namestore_handle; |
58 | 61 | ||
62 | #ifndef WINDOWS | ||
59 | /** | 63 | /** |
60 | * Our handle to the vpn service | 64 | * Our handle to the vpn service |
61 | */ | 65 | */ |
62 | static struct GNUNET_VPN_Handle *vpn_handle; | 66 | static struct GNUNET_VPN_Handle *vpn_handle; |
67 | #endif | ||
63 | 68 | ||
64 | /** | 69 | /** |
65 | * Resolver handle to the dht | 70 | * Resolver handle to the dht |
@@ -1240,6 +1245,7 @@ process_record_result_ns (void* cls, | |||
1240 | } | 1245 | } |
1241 | 1246 | ||
1242 | 1247 | ||
1248 | #ifndef WINDOWS | ||
1243 | /** | 1249 | /** |
1244 | * VPN redirect result callback | 1250 | * VPN redirect result callback |
1245 | * | 1251 | * |
@@ -1305,6 +1311,7 @@ process_record_result_vpn (void* cls, int af, const void *address) | |||
1305 | rh->id); | 1311 | rh->id); |
1306 | rh->proc (rh->proc_cls, rh, 0, NULL); | 1312 | rh->proc (rh->proc_cls, rh, 0, NULL); |
1307 | } | 1313 | } |
1314 | #endif | ||
1308 | 1315 | ||
1309 | 1316 | ||
1310 | /** | 1317 | /** |
@@ -1804,6 +1811,7 @@ resolve_record_vpn (struct ResolverHandle *rh, | |||
1804 | af = AF_INET; | 1811 | af = AF_INET; |
1805 | else | 1812 | else |
1806 | af = AF_INET6; | 1813 | af = AF_INET6; |
1814 | #ifndef WINDOWS | ||
1807 | if (NULL == vpn_handle) | 1815 | if (NULL == vpn_handle) |
1808 | { | 1816 | { |
1809 | vpn_handle = GNUNET_VPN_connect (cfg); | 1817 | vpn_handle = GNUNET_VPN_connect (cfg); |
@@ -1824,6 +1832,11 @@ resolve_record_vpn (struct ResolverHandle *rh, | |||
1824 | GNUNET_TIME_UNIT_FOREVER_ABS, //FIXME | 1832 | GNUNET_TIME_UNIT_FOREVER_ABS, //FIXME |
1825 | &process_record_result_vpn, | 1833 | &process_record_result_vpn, |
1826 | rh); | 1834 | rh); |
1835 | #else | ||
1836 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
1837 | "Error connecting to VPN (not available on W32 yet)\n"); | ||
1838 | finish_lookup (rh, rh->proc_cls, 0, NULL); | ||
1839 | #endif | ||
1827 | } | 1840 | } |
1828 | 1841 | ||
1829 | 1842 | ||