Skip to content

Commit

Permalink
Merge pull request #201 from alja/cpurge
Browse files Browse the repository at this point in the history
pfc: fix cache purge on timeout
  • Loading branch information
abh3 committed Feb 23, 2015
2 parents 62040d0 + 886d8fa commit f931dd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/XrdFileCache/XrdFileCacheFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ void Factory::CacheDirCleanup()
XrdOucEnv env;

XrdOss* oss = Factory::GetInstance().GetOss();
XrdOssDF* dh = oss->newDir(m_configuration.m_username.c_str());
XrdOssVSInfo sP;

while (1)
Expand Down Expand Up @@ -456,6 +455,7 @@ void Factory::CacheDirCleanup()
typedef std::map<std::string, time_t> fcmap_t;
fcmap_t fcmap;
// make a sorted map of file patch by access time
XrdOssDF* dh = oss->newDir(m_configuration.m_username.c_str());
if (dh->Opendir(m_configuration.m_cache_dir.c_str(), env) >= 0)
{
FillFileMapRecurse(dh, m_configuration.m_cache_dir, fcmap);
Expand All @@ -481,14 +481,14 @@ void Factory::CacheDirCleanup()
clLog()->Info(XrdCl::AppMsg, "Factory::CacheDirCleanup() removed %s size %lld ", path.c_str(), fstat.st_size);
}
if (bytesToRemove <= 0)
break;
break;
}
}
dh->Close();
delete dh; dh =0;
}
sleep(sleept);
}
dh->Close();
delete dh; dh =0;
}


Expand Down

0 comments on commit f931dd4

Please sign in to comment.