/[svn]/ircd-hybrid-7.2/src/irc_res.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/irc_res.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 985 by michael, Sat Aug 15 20:31:54 2009 UTC revision 986 by michael, Sat Aug 15 21:12:34 2009 UTC
# Line 92  struct reslist Line 92  struct reslist
92  };  };
93    
94  static fde_t ResolverFileDescriptor;  static fde_t ResolverFileDescriptor;
95  static dlink_list request_list    = { NULL, NULL, 0 };  static dlink_list request_list = { NULL, NULL, 0 };
96    
97  static void rem_request(struct reslist *request);  static void rem_request(struct reslist *request);
98  static struct reslist *make_request(struct DNSQuery *query);  static struct reslist *make_request(struct DNSQuery *query);
# Line 443  do_query_name(struct DNSQuery *query, co Line 443  do_query_name(struct DNSQuery *query, co
443  {  {
444    char host_name[HOSTLEN + 1];    char host_name[HOSTLEN + 1];
445    
446    strlcpy(host_name, name, HOSTLEN);    strlcpy(host_name, name, HOSTLEN + 1);
447    add_local_domain(host_name, HOSTLEN);    add_local_domain(host_name, HOSTLEN + 1);
448    
449    if (request == NULL)    if (request == NULL)
450    {    {
451      request       = make_request(query);      request       = make_request(query);
452      request->name = (char *)MyMalloc(strlen(host_name) + 1);      request->name = MyMalloc(strlen(host_name) + 1);
453      request->type = type;      request->type = type;
454      strcpy(request->name, host_name);      strcpy(request->name, host_name);
455  #ifdef IPV6  #ifdef IPV6
# Line 514  do_query_number(struct DNSQuery *query, Line 514  do_query_number(struct DNSQuery *query,
514      request       = make_request(query);      request       = make_request(query);
515      request->type = T_PTR;      request->type = T_PTR;
516      memcpy(&request->addr, addr, sizeof(struct irc_ssaddr));      memcpy(&request->addr, addr, sizeof(struct irc_ssaddr));
517      request->name = (char *)MyMalloc(HOSTLEN + 1);      request->name = MyMalloc(HOSTLEN + 1);
518    }    }
519    
520    query_name(ipbuf, C_IN, T_PTR, request);    query_name(ipbuf, C_IN, T_PTR, request);
# Line 696  proc_answer(struct reslist *request, HEA Line 696  proc_answer(struct reslist *request, HEA
696          else if (n == 0)          else if (n == 0)
697            return(0); /* no more answers left */            return(0); /* no more answers left */
698    
699          strlcpy(request->name, hostbuf, HOSTLEN);          strlcpy(request->name, hostbuf, HOSTLEN + 1);
700    
701          return(1);          return(1);
702          break;          break;

Legend:
Removed from v.985  
changed lines
  Added in v.986

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.26