/[svn]/ircd-hybrid-7.2/src/irc_res.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/irc_res.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 992 by michael, Mon Aug 17 19:19:16 2009 UTC revision 994 by michael, Fri Aug 21 09:15:31 2009 UTC
# Line 753  res_readreply(fde_t *fd, void *data) Line 753  res_readreply(fde_t *fd, void *data)
753    HEADER *header;    HEADER *header;
754    struct reslist *request = NULL;    struct reslist *request = NULL;
755    int rc;    int rc;
   int answer_count;  
756    socklen_t len = sizeof(struct irc_ssaddr);    socklen_t len = sizeof(struct irc_ssaddr);
757    struct irc_ssaddr lsin;    struct irc_ssaddr lsin;
758    
# Line 778  res_readreply(fde_t *fd, void *data) Line 777  res_readreply(fde_t *fd, void *data)
777    header->arcount = ntohs(header->arcount);    header->arcount = ntohs(header->arcount);
778    
779    /*    /*
780     * response for an id which we have already received an answer for     * check against possibly fake replies
    * just ignore this response.  
781     */     */
782    if (0 == (request = find_id(header->id)))    if (!res_ourserver(&lsin))
783      return;      return;
784    
785    /*    /*
786     * check against possibly fake replies     * response for an id which we have already received an answer for
787       * just ignore this response.
788     */     */
789    if (!res_ourserver(&lsin))    if (!(request = find_id(header->id)))
790      return;      return;
791    
792    if ((header->rcode != NO_ERRORS) || (header->ancount == 0))    if ((header->rcode != NO_ERRORS) || (header->ancount == 0))
# Line 823  res_readreply(fde_t *fd, void *data) Line 822  res_readreply(fde_t *fd, void *data)
822     * If this fails there was an error decoding the received packet,     * If this fails there was an error decoding the received packet,
823     * try it again and hope it works the next time.     * try it again and hope it works the next time.
824     */     */
825    answer_count = proc_answer(request, header, buf, buf + rc);    if (proc_answer(request, header, buf, buf + rc))
   
   if (answer_count)  
826    {    {
827      if (request->type == T_PTR)      if (request->type == T_PTR)
828      {      {

Legend:
Removed from v.992  
changed lines
  Added in v.994

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.26