[svn] / trunk / libc / resolv / res_libc.c Repository:
ViewVC logotype

Diff of /trunk/libc/resolv/res_libc.c

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

revision 8608, Fri Jun 26 11:00:47 2009 UTC revision 9102, Sun Oct 18 18:08:37 2009 UTC
# Line 22  Line 22 
22  #include <arpa/nameser.h>  #include <arpa/nameser.h>
23  #include <resolv.h>  #include <resolv.h>
24  #include <bits/libc-lock.h>  #include <bits/libc-lock.h>
25    #include <sys/stat.h>
26    
27  /* The following bit is copied from res_data.c (where it is #ifdef'ed  /* The following bit is copied from res_data.c (where it is #ifdef'ed
28     out) since res_init() should go into libc.so but the rest of that     out) since res_init() should go into libc.so but the rest of that
# Line 94  Line 94 
94  int  int
95  __res_maybe_init (res_state resp, int preinit)  __res_maybe_init (res_state resp, int preinit)
96  {  {
97            static time_t last_mtime;
98            struct stat statbuf;
99            int ret;
100    
101          if (resp->options & RES_INIT) {          if (resp->options & RES_INIT) {
102                  if (__res_initstamp != resp->_u._ext.initstamp) {                  ret = stat (_PATH_RESCONF, &statbuf);
103                    if ((__res_initstamp != resp->_u._ext.initstamp)
104                        || ((ret == 0) && (last_mtime != statbuf.st_mtime))) {
105                            if (ret == 0)
106                                    last_mtime = statbuf.st_mtime;
107                          if (resp->nscount > 0)                          if (resp->nscount > 0)
108                                  __res_iclose (resp, true);                                  __res_iclose (resp, true);
109                          return __res_vinit (resp, 1);                          return __res_vinit (resp, 1);

Legend:
Removed from v.8608  
changed lines
  Added in v.9102

Webmaster
ViewVC Help
Powered by ViewVC 1.0.9