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

Comparing ircd-hybrid-7.2/src/irc_res.c (file contents):
Revision 993 by michael, Mon Aug 17 19:19:16 2009 UTC vs.
Revision 994 by michael, Fri Aug 21 09:15:31 2009 UTC

# Line 753 | Line 753 | res_readreply(fde_t *fd, void *data)
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  
# Line 778 | Line 777 | res_readreply(fde_t *fd, void *data)
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))
# Line 823 | Line 822 | res_readreply(fde_t *fd, void *data)
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      {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines