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

Comparing ircd-hybrid/branches/8.2.x/src/res.c (file contents):
Revision 4239 by michael, Tue Jul 15 17:40:24 2014 UTC vs.
Revision 4299 by michael, Sun Jul 20 13:51:28 2014 UTC

# Line 103 | Line 103 | struct reslist
103    char type;
104    char retries;            /* retry counter */
105    unsigned int sends;      /* number of sends (>1 means resent) */
106 <  char resend;             /* send flag. 0 == dont resend */
106 >  char resend;             /* send flag. 0 == don't resend */
107    time_t sentat;
108    time_t timeout;
109    struct irc_ssaddr addr;
# Line 343 | Line 343 | delete_resolver_queries(const void *vptr
343   * send_res_msg - sends msg to all nameservers found in the "_res" structure.
344   * This should reflect /etc/resolv.conf. We will get responses
345   * which arent needed but is easier than checking to see if nameserver
346 < * isnt present. Returns number of messages successfully sent to
346 > * isn't present. Returns number of messages successfully sent to
347   * nameservers or -1 if no successful sends.
348   */
349   static int
# Line 556 | Line 556 | resend_query(struct reslist *request)
556        do_query_name(NULL, NULL, request->name, request, request->type);
557        break;
558   #ifdef IPV6
559 <    case T_AAAA:
560 <      /* didnt work, try A */
559 >    case T_AAAA:  /* Didn't work, try A */
560        if (request->state == REQ_AAAA)
561          do_query_name(NULL, NULL, request->name, request, T_A);
562   #endif
# Line 593 | Line 592 | proc_answer(struct reslist *request, HEA
592    }
593  
594    /*
595 <   * process each answer sent to us blech.
595 >   * Process each answer sent to us blech.
596     */
597    while (header->ancount > 0 && (char *)current < eob)
598    {
# Line 602 | Line 601 | proc_answer(struct reslist *request, HEA
601      n = irc_dn_expand((unsigned char *)buf, (unsigned char *)eob, current,
602          hostbuf, sizeof(hostbuf));
603  
604 <    if (n < 0 /* Broken message */ || n == 0 /* No more answers left */)
604 >    if (n < 0  /* Broken message */ || n == 0  /* No more answers left */)
605        return 0;
606  
607      hostbuf[HOSTLEN] = '\0';
608  
609 <    /* With Address arithmetic you have to be very anal
609 >    /*
610 >     * With Address arithmetic you have to be very anal
611       * this code was not working on alpha due to that
612       * (spotted by rodder/jailbird/dianora)
613       */
# Line 670 | Line 670 | proc_answer(struct reslist *request, HEA
670  
671          n = irc_dn_expand((unsigned char *)buf, (unsigned char *)eob,
672                            current, hostbuf, sizeof(hostbuf));
673 <        if (n < 0 /* Broken message */ || n == 0 /* No more answers left */)
673 >        if (n < 0  /* Broken message */ || n == 0  /* No more answers left */)
674            return 0;
675  
676          strlcpy(request->name, hostbuf, HOSTLEN + 1);
677          return 1;
678          break;
679 <      case T_CNAME: /* first check we already havent started looking
680 <                       into a cname */
679 >      case T_CNAME:  /* First check we already haven't started looking into a cname */
680          if (request->type != T_PTR)
681            return 0;
682  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines