diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-06-16 10:09:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-06-16 10:09:47 +0000 |
commit | 007b8443b0cb0d67bf8b176a1a175ad4bc37f1f3 (patch) | |
tree | b42d56110ae349eb2977673690c072dcf75b32a4 /src/transport | |
parent | 94c41ff98d293d8c041c4bbbe8d19dbf8ccd6f3f (diff) | |
download | gnunet-007b8443b0cb0d67bf8b176a1a175ad4bc37f1f3.tar.gz gnunet-007b8443b0cb0d67bf8b176a1a175ad4bc37f1f3.zip |
resolver API change
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 10 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 7 | ||||
-rw-r--r-- | src/transport/plugin_transport_unix.c | 4 |
3 files changed, 6 insertions, 15 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 11b7bc3f1..42eaeb9b2 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1670,7 +1670,6 @@ tcp_plugin_address_pretty_printer (void *cls, | |||
1670 | GNUNET_TRANSPORT_AddressStringCallback asc, | 1670 | GNUNET_TRANSPORT_AddressStringCallback asc, |
1671 | void *asc_cls) | 1671 | void *asc_cls) |
1672 | { | 1672 | { |
1673 | struct Plugin *plugin = cls; | ||
1674 | struct PrettyPrinterContext *ppc; | 1673 | struct PrettyPrinterContext *ppc; |
1675 | const void *sb; | 1674 | const void *sb; |
1676 | size_t sbs; | 1675 | size_t sbs; |
@@ -1715,8 +1714,7 @@ tcp_plugin_address_pretty_printer (void *cls, | |||
1715 | ppc->asc = asc; | 1714 | ppc->asc = asc; |
1716 | ppc->asc_cls = asc_cls; | 1715 | ppc->asc_cls = asc_cls; |
1717 | ppc->port = port; | 1716 | ppc->port = port; |
1718 | GNUNET_RESOLVER_hostname_get (plugin->env->cfg, | 1717 | GNUNET_RESOLVER_hostname_get (sb, |
1719 | sb, | ||
1720 | sbs, | 1718 | sbs, |
1721 | !numeric, timeout, &append_port, ppc); | 1719 | !numeric, timeout, &append_port, ppc); |
1722 | } | 1720 | } |
@@ -3167,16 +3165,14 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
3167 | _("TCP transport advertises itself as being on port %llu\n"), | 3165 | _("TCP transport advertises itself as being on port %llu\n"), |
3168 | aport); | 3166 | aport); |
3169 | 3167 | ||
3170 | plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (env->cfg, | 3168 | plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (AF_UNSPEC, |
3171 | AF_UNSPEC, | ||
3172 | HOSTNAME_RESOLVE_TIMEOUT, | 3169 | HOSTNAME_RESOLVE_TIMEOUT, |
3173 | &process_hostname_ips, | 3170 | &process_hostname_ips, |
3174 | plugin); | 3171 | plugin); |
3175 | 3172 | ||
3176 | if (plugin->external_address != NULL) | 3173 | if (plugin->external_address != NULL) |
3177 | { | 3174 | { |
3178 | plugin->ext_dns = GNUNET_RESOLVER_ip_get (env->cfg, | 3175 | plugin->ext_dns = GNUNET_RESOLVER_ip_get (plugin->external_address, |
3179 | plugin->external_address, | ||
3180 | AF_INET, | 3176 | AF_INET, |
3181 | GNUNET_TIME_UNIT_MINUTES, | 3177 | GNUNET_TIME_UNIT_MINUTES, |
3182 | &process_external_ip, | 3178 | &process_external_ip, |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 8f95b9ee6..2366a2e16 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -2001,7 +2001,6 @@ udp_plugin_address_pretty_printer (void *cls, | |||
2001 | GNUNET_TRANSPORT_AddressStringCallback asc, | 2001 | GNUNET_TRANSPORT_AddressStringCallback asc, |
2002 | void *asc_cls) | 2002 | void *asc_cls) |
2003 | { | 2003 | { |
2004 | struct Plugin *plugin = cls; | ||
2005 | struct PrettyPrinterContext *ppc; | 2004 | struct PrettyPrinterContext *ppc; |
2006 | const void *sb; | 2005 | const void *sb; |
2007 | size_t sbs; | 2006 | size_t sbs; |
@@ -2046,8 +2045,7 @@ udp_plugin_address_pretty_printer (void *cls, | |||
2046 | ppc->asc = asc; | 2045 | ppc->asc = asc; |
2047 | ppc->asc_cls = asc_cls; | 2046 | ppc->asc_cls = asc_cls; |
2048 | ppc->port = port; | 2047 | ppc->port = port; |
2049 | GNUNET_RESOLVER_hostname_get (plugin->env->cfg, | 2048 | GNUNET_RESOLVER_hostname_get (sb, |
2050 | sb, | ||
2051 | sbs, | 2049 | sbs, |
2052 | !numeric, timeout, &append_port, ppc); | 2050 | !numeric, timeout, &append_port, ppc); |
2053 | } | 2051 | } |
@@ -2358,8 +2356,7 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2358 | GNUNET_OS_network_interfaces_list (&process_interfaces, plugin); | 2356 | GNUNET_OS_network_interfaces_list (&process_interfaces, plugin); |
2359 | } | 2357 | } |
2360 | 2358 | ||
2361 | plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (env->cfg, | 2359 | plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (AF_UNSPEC, |
2362 | AF_UNSPEC, | ||
2363 | HOSTNAME_RESOLVE_TIMEOUT, | 2360 | HOSTNAME_RESOLVE_TIMEOUT, |
2364 | &process_hostname_ips, | 2361 | &process_hostname_ips, |
2365 | plugin); | 2362 | plugin); |
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index c72de6ca6..835f01611 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -1062,7 +1062,6 @@ unix_plugin_address_pretty_printer (void *cls, | |||
1062 | GNUNET_TRANSPORT_AddressStringCallback asc, | 1062 | GNUNET_TRANSPORT_AddressStringCallback asc, |
1063 | void *asc_cls) | 1063 | void *asc_cls) |
1064 | { | 1064 | { |
1065 | struct Plugin *plugin = cls; | ||
1066 | struct PrettyPrinterContext *ppc; | 1065 | struct PrettyPrinterContext *ppc; |
1067 | const void *sb; | 1066 | const void *sb; |
1068 | size_t sbs; | 1067 | size_t sbs; |
@@ -1107,8 +1106,7 @@ unix_plugin_address_pretty_printer (void *cls, | |||
1107 | ppc->asc = asc; | 1106 | ppc->asc = asc; |
1108 | ppc->asc_cls = asc_cls; | 1107 | ppc->asc_cls = asc_cls; |
1109 | ppc->port = port; | 1108 | ppc->port = port; |
1110 | GNUNET_RESOLVER_hostname_get (plugin->env->cfg, | 1109 | GNUNET_RESOLVER_hostname_get (sb, |
1111 | sb, | ||
1112 | sbs, | 1110 | sbs, |
1113 | !numeric, timeout, &append_port, ppc); | 1111 | !numeric, timeout, &append_port, ppc); |
1114 | } | 1112 | } |