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; |
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 |
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 |
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 |
|
{ |
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 |
|
*/ |
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 |
|
|