ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/irc_res.c
(Generate patch)

Comparing ircd-hybrid-7.2/src/irc_res.c (file contents):
Revision 994 by michael, Fri Aug 21 09:15:31 2009 UTC vs.
Revision 995 by michael, Fri Aug 21 10:11:14 2009 UTC

# Line 108 | Line 108 | static int send_res_msg(const char *buf,
108   static void resend_query(struct reslist *request);
109   static int proc_answer(struct reslist *request, HEADER *header, char *, char *);
110   static struct reslist *find_id(int id);
111 – static struct DNSReply *make_dnsreply(struct reslist *request);
112 –
113 – extern struct irc_ssaddr irc_nsaddr_list[IRCD_MAXNS];
114 – extern int irc_nscount;
115 – extern char irc_domain[HOSTLEN+1];
111  
112  
113   /*
# Line 273 | Line 268 | restart_resolver(void)
268   }
269  
270   /*
276 – * add_local_domain - Add the domain to hostname, if it is missing
277 – * (as suggested by eps@TOASTER.SFSU.EDU)
278 – */
279 – void
280 – add_local_domain(char *hname, size_t size)
281 – {
282 –  /* try to fix up unqualified names
283 –   */
284 –  if (strchr(hname, '.') == NULL)
285 –  {
286 –    if (irc_domain[0])
287 –    {
288 –      size_t len = strlen(hname);
289 –
290 –      if ((strlen(irc_domain) + len + 2) < size)
291 –      {
292 –        hname[len++] = '.';
293 –        strcpy(hname + len, irc_domain);
294 –      }
295 –    }
296 –  }
297 – }
298 –
299 – /*
271   * rem_request - remove a request from the list.
272   * This must also free any memory that has been allocated for
273   * temporary storage of DNS results.
# Line 445 | Line 416 | do_query_name(dns_callback_fnc callback,
416   {
417    char host_name[HOSTLEN + 1];
418  
419 <  strlcpy(host_name, name, HOSTLEN + 1);
449 <  add_local_domain(host_name, HOSTLEN + 1);
419 >  strlcpy(host_name, name, sizeof(hostname));
420  
421    if (request == NULL)
422    {

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)