"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/httpserver.cpp" between
openlitespeed-1.6.3.src.tgz and openlitespeed-1.6.4.src.tgz

About: OpenLiteSpeed is a high-performance, lightweight HTTP server with optional HTTP/2 support (open sourve version of the commercial LiteSpeed Web Server). Sources.

httpserver.cpp  (openlitespeed-1.6.3.src.tgz):httpserver.cpp  (openlitespeed-1.6.4.src.tgz)
skipping to change at line 1042 skipping to change at line 1042
return p; return p;
} }
//autoupdate checking, this only do once per day, won't use much resource //autoupdate checking, this only do once per day, won't use much resource
void HttpServerImpl::checkOLSUpdate() void HttpServerImpl::checkOLSUpdate()
{ {
time_t t = time(NULL); time_t t = time(NULL);
struct tm tstm; struct tm tstm;
struct tm *tl = &tstm; struct tm *tl = &tstm;
localtime_r(&t,tl); localtime_r(&t,tl);
if (tl->tm_hour != 2) //Only check it between 2:00AM - 3:00AM
return ;
struct stat sb; struct stat sb;
AutoStr2 sAutoUpdFile; AutoStr2 sAutoUpdFile;
sAutoUpdFile.setStr(MainServerConfig::getInstance().getServerRoot()); sAutoUpdFile.setStr(MainServerConfig::getInstance().getServerRoot());
sAutoUpdFile.append("autoupdate/release", 18); sAutoUpdFile.append("autoupdate/release", 18);
if (stat(sAutoUpdFile.c_str(), &sb) != -1) if (stat(sAutoUpdFile.c_str(), &sb) != -1)
{ {
if (t - sb.st_mtime < 86400) //Less than 1 day if (t - sb.st_mtime < 86400) //Less than 1 day
return ; return ;
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)