diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-20 15:26:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-20 15:26:03 +0000 |
commit | d544e81283a24082e6423c8f4377939f6fefa780 (patch) | |
tree | ab8aaf264cdd6d27853ff15a2f7542c801acf721 /src/gns | |
parent | a0a09022f0d0df917465b8e71753a69f066058d3 (diff) | |
download | gnunet-d544e81283a24082e6423c8f4377939f6fefa780.tar.gz gnunet-d544e81283a24082e6423c8f4377939f6fefa780.zip |
-use the same hash function to map service name to hash, not once strlen and then strlen+1
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/Makefile.am | 2 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 36d50ac2e..79f5c0513 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -190,6 +190,7 @@ gnunet_service_gns_LDADD = \ | |||
190 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ | 190 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ |
191 | $(top_builddir)/src/dns/libgnunetdnsstub.la \ | 191 | $(top_builddir)/src/dns/libgnunetdnsstub.la \ |
192 | $(top_builddir)/src/dht/libgnunetdht.la \ | 192 | $(top_builddir)/src/dht/libgnunetdht.la \ |
193 | $(top_builddir)/src/tun/libgnunettun.la \ | ||
193 | $(top_builddir)/src/namecache/libgnunetnamecache.la \ | 194 | $(top_builddir)/src/namecache/libgnunetnamecache.la \ |
194 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 195 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
195 | $(USE_VPN) \ | 196 | $(USE_VPN) \ |
@@ -199,6 +200,7 @@ gnunet_service_gns_DEPENDENCIES = \ | |||
199 | $(top_builddir)/src/revocation/libgnunetrevocation.la \ | 200 | $(top_builddir)/src/revocation/libgnunetrevocation.la \ |
200 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 201 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
201 | $(top_builddir)/src/util/libgnunetutil.la \ | 202 | $(top_builddir)/src/util/libgnunetutil.la \ |
203 | $(top_builddir)/src/tun/libgnunettun.la \ | ||
202 | $(top_builddir)/src/dns/libgnunetdns.la \ | 204 | $(top_builddir)/src/dns/libgnunetdns.la \ |
203 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ | 205 | $(top_builddir)/src/dns/libgnunetdnsparser.la \ |
204 | $(top_builddir)/src/dht/libgnunetdht.la \ | 206 | $(top_builddir)/src/dht/libgnunetdht.la \ |
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 14e714a85..f046702e3 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "gnunet_resolver_service.h" | 41 | #include "gnunet_resolver_service.h" |
42 | #include "gnunet_revocation_service.h" | 42 | #include "gnunet_revocation_service.h" |
43 | #include "gnunet_dnsparser_lib.h" | 43 | #include "gnunet_dnsparser_lib.h" |
44 | #include "gnunet_tun_lib.h" | ||
44 | #include "gnunet_gns_service.h" | 45 | #include "gnunet_gns_service.h" |
45 | #include "gns.h" | 46 | #include "gns.h" |
46 | #include "gnunet-service-gns_resolver.h" | 47 | #include "gnunet-service-gns_resolver.h" |
@@ -1413,9 +1414,8 @@ handle_gns_resolution_result (void *cls, | |||
1413 | GNS_resolver_lookup_cancel (rh); | 1414 | GNS_resolver_lookup_cancel (rh); |
1414 | return; | 1415 | return; |
1415 | } | 1416 | } |
1416 | GNUNET_CRYPTO_hash (vname, | 1417 | GNUNET_TUN_service_name_to_hash (vname, |
1417 | strlen (vname), // FIXME: +1? | 1418 | &vhash); |
1418 | &vhash); | ||
1419 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1419 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1420 | "Attempting VPN allocation for %s-%s (AF: %d, proto %d)\n", | 1420 | "Attempting VPN allocation for %s-%s (AF: %d, proto %d)\n", |
1421 | GNUNET_i2s (&vpn->peer), | 1421 | GNUNET_i2s (&vpn->peer), |