/[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 5185 by michael, Sun Dec 28 23:52:32 2014 UTC revision 5186 by michael, Mon Dec 29 13:49:50 2014 UTC
# Line 159  firedns_init(void) Line 159  firedns_init(void)
159    struct in_addr addr4;    struct in_addr addr4;
160    struct in6_addr addr6;    struct in6_addr addr6;
161    char buf[1024];    char buf[1024];
162      char *p = NULL;
163    const char *file;    const char *file;
164    
165    i6 = 0;    i6 = 0;
# Line 188  firedns_init(void) Line 189  firedns_init(void)
189    
190      while (fgets(buf, 1024, f))      while (fgets(buf, 1024, f))
191      {      {
192          if ((p = strchr(buf, '\n')))
193            *p = '\0';
194    
195        if (strncmp(buf, "nameserver", 10) == 0)        if (strncmp(buf, "nameserver", 10) == 0)
196        {        {
197          i = 10;          i = 10;
# Line 218  firedns_init(void) Line 222  firedns_init(void)
222    
223      while (fgets(buf, 1024, f))      while (fgets(buf, 1024, f))
224      {      {
225          if ((p = strchr(buf, '\n')))
226            *p = '\0';
227    
228        buf[strspn(buf, "0123456789.")] = '\0';        buf[strspn(buf, "0123456789.")] = '\0';
229    
230        if (i6 < FDNS_MAX)        if (i6 < FDNS_MAX)

Legend:
Removed from v.5185  
changed lines
  Added in v.5186

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