/[svn]/hopm/trunk/src/firedns.c
ViewVC logotype

Diff of /hopm/trunk/src/firedns.c

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

revision 8581 by michael, Sun Oct 14 15:12:50 2018 UTC revision 8582 by michael, Sun Oct 14 16:59:59 2018 UTC
# Line 367  firedns_getip(int type, const char *cons Line 367  firedns_getip(int type, const char *cons
367      if (info == NULL)      if (info == NULL)
368        xfree(s);        xfree(s);
369      else      else
370        list_add(&CONNECTIONS, &s->node);        list_add(s, &s->node, &CONNECTIONS);
371    
372      return -1;      return -1;
373    }    }
# Line 379  firedns_getip(int type, const char *cons Line 379  firedns_getip(int type, const char *cons
379      return -1;      return -1;
380    }    }
381    
382    list_add(&CONNECTIONS, &s->node);    list_add(s, &s->node, &CONNECTIONS);
383    
384    return fd;    return fd;
385  }  }
# Line 774  firedns_getresult(const int fd) Line 774  firedns_getresult(const int fd)
774    
775  /* Clean-up */  /* Clean-up */
776  cleanup:  cleanup:
777    list_remove(&CONNECTIONS, &c->node);    list_remove(&c->node, &CONNECTIONS);
778    
779    close(c->fd);    close(c->fd);
780    xfree(c);    xfree(c);
# Line 814  firedns_cycle(void) Line 814  firedns_cycle(void)
814      if (p->fd > 0 && (p->start + OptionsItem.dns_timeout) < timenow)      if (p->fd > 0 && (p->start + OptionsItem.dns_timeout) < timenow)
815      {      {
816        /* Timed out - remove from list */        /* Timed out - remove from list */
817        list_remove(&CONNECTIONS, &p->node);        list_remove(&p->node, &CONNECTIONS);
818    
819        memset(new_result.text, 0, sizeof(new_result.text));        memset(new_result.text, 0, sizeof(new_result.text));
820        new_result.info = p->info;        new_result.info = p->info;

Legend:
Removed from v.8581  
changed lines
  Added in v.8582

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