Hi.
On Wednesday 15 of June 2011 03:47:18 you wrote:
> Hello!
>
> On Tue, Jun 14, 2011 at 07:52:10AM +0200, Gregor Kališnik wrote:
> > Hi.
> >
>
> I believe it would be sufficient to just check for geoipv6_t type.
>
> ngx_feature_incs="#include <GeoIP.h>"
> ...
> ngx_feature_test="geoipv6_t v6addr;
> v6addr.s6_addr[0] = 1;"
>
I've checked GeoIP.h from geoip-1.4.6 and geoip-1.4.7. Both have geoipv6_t.
But the 1.4.6 version doesn't support GeoIP City IPv6 version and check for
geoipv6_t would break compilation when using geoip-1.4.6.
Should I break GeoIP IPv6 code into two parts? First checking for geoipv6_t
and second checking for GeoCity related define/type?
>
> IMHO, something like this will be more readable:
>
> #if (NGX_HAVE_GEOIP_IPV6)
> val = gcf->country_ipv6
> ? handler_v6(gcf->country, ngx_http_geoip_addr_v6(r))
>
> : handler(gcf->country,
> : ngx_http_geoip_addr(r));
>
> #else
> val = handler(gcf->country, ngx_http_geoip_addr(r));
> #endif
>
> Just a matter of taste though.
>
Hope I got the identitation right :) .
Best regards,
Gregor Kališnik_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel