| 753 |
|
HEADER *header; |
| 754 |
|
struct reslist *request = NULL; |
| 755 |
|
int rc; |
| 756 |
– |
int answer_count; |
| 756 |
|
socklen_t len = sizeof(struct irc_ssaddr); |
| 757 |
|
struct irc_ssaddr lsin; |
| 758 |
|
|
| 777 |
|
header->arcount = ntohs(header->arcount); |
| 778 |
|
|
| 779 |
|
/* |
| 780 |
< |
* response for an id which we have already received an answer for |
| 782 |
< |
* just ignore this response. |
| 780 |
> |
* check against possibly fake replies |
| 781 |
|
*/ |
| 782 |
< |
if (0 == (request = find_id(header->id))) |
| 782 |
> |
if (!res_ourserver(&lsin)) |
| 783 |
|
return; |
| 784 |
|
|
| 785 |
|
/* |
| 786 |
< |
* check against possibly fake replies |
| 786 |
> |
* response for an id which we have already received an answer for |
| 787 |
> |
* just ignore this response. |
| 788 |
|
*/ |
| 789 |
< |
if (!res_ourserver(&lsin)) |
| 789 |
> |
if (!(request = find_id(header->id))) |
| 790 |
|
return; |
| 791 |
|
|
| 792 |
|
if ((header->rcode != NO_ERRORS) || (header->ancount == 0)) |
| 822 |
|
* If this fails there was an error decoding the received packet, |
| 823 |
|
* try it again and hope it works the next time. |
| 824 |
|
*/ |
| 825 |
< |
answer_count = proc_answer(request, header, buf, buf + rc); |
| 827 |
< |
|
| 828 |
< |
if (answer_count) |
| 825 |
> |
if (proc_answer(request, header, buf, buf + rc)) |
| 826 |
|
{ |
| 827 |
|
if (request->type == T_PTR) |
| 828 |
|
{ |