/[svn]/hopm/branches/1.0.x/src/firedns.c
ViewVC logotype

Diff of /hopm/branches/1.0.x/src/firedns.c

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

revision 5187 by michael, Mon Dec 29 13:49:50 2014 UTC revision 5188 by michael, Mon Dec 29 13:57:05 2014 UTC
# Line 160  firedns_init(void) Line 160  firedns_init(void)
160    struct in6_addr addr6;    struct in6_addr addr6;
161    char buf[1024];    char buf[1024];
162    char *p = NULL;    char *p = NULL;
   const char *file;  
163    
164    i6 = 0;    i6 = 0;
165    i4 = 0;    i4 = 0;
# Line 185  firedns_init(void) Line 184  firedns_init(void)
184        return;        return;
185      }      }
186    
187      file = FDNS_CONFIG_FBCK;      while (fgets(buf, sizeof(buf), f))
   
     while (fgets(buf, 1024, f))  
188      {      {
189        if ((p = strchr(buf, '\n')))        if ((p = strchr(buf, '\n')))
190          *p = '\0';          *p = '\0';
# Line 218  firedns_init(void) Line 215  firedns_init(void)
215    }    }
216    else    else
217    {    {
218      file = FDNS_CONFIG_PREF;      while (fgets(buf, sizeof(buf), f))
   
     while (fgets(buf, 1024, f))  
219      {      {
220        if ((p = strchr(buf, '\n')))        if ((p = strchr(buf, '\n')))
221          *p = '\0';          *p = '\0';
222    
       buf[strspn(buf, "0123456789.")] = '\0';  
   
223        if (i6 < FDNS_MAX)        if (i6 < FDNS_MAX)
224        {        {
225          if (inet_pton(AF_INET6, buf, &addr6) > 0)          if (inet_pton(AF_INET6, buf, &addr6) > 0)

Legend:
Removed from v.5187  
changed lines
  Added in v.5188

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