ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/branches/newio/src/s_bsd.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/s_bsd.c (file contents):
Revision 1649 by michael, Sat Nov 10 19:27:13 2012 UTC vs.
Revision 1858 by michael, Thu Apr 25 15:00:52 2013 UTC

# Line 302 | Line 302 | add_connection(struct Listener *listener
302                sizeof(new_client->sockhost), NULL, 0, NI_NUMERICHOST);
303    new_client->localClient->aftype = new_client->localClient->ip.ss.ss_family;
304  
305 + #ifdef HAVE_LIBGEOIP
306 +  /* XXX IPV6 SUPPORT XXX */
307 +  if (irn->ss.ss_family == AF_INET && geoip_ctx)
308 +  {
309 +    const struct sockaddr_in *v4 = (const struct sockaddr_in *)&new_client->localClient->ip;
310 +    new_client->localClient->country_id = GeoIP_id_by_ipnum(geoip_ctx, (unsigned long)ntohl(v4->sin_addr.s_addr));
311 +  }
312 + #endif
313 +
314    if (new_client->sockhost[0] == ':' && new_client->sockhost[1] == ':')
315    {
316      strlcpy(new_client->host, "0", sizeof(new_client->host));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines