Commit f1228961 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Hopefully fixed the warning now by adopting the type time_t as in

master. Not very nice though, a time period cannot be negative...
parent 47512619
......@@ -71,7 +71,7 @@ void castor::gc::SynchronizationThread::run(void*) {
unsigned int chunkInterval = DEFAULT_CHUNKINTERVAL;
unsigned int chunkSize = DEFAULT_CHUNKSIZE;
bool disableStagerSync = DEFAULT_DISABLESTAGERSYNC;
unsigned int gracePeriod = DEFAULT_GRACEPERIOD;
time_t gracePeriod = DEFAULT_GRACEPERIOD;
readConfigFile(&chunkInterval, &chunkSize, &disableStagerSync, &gracePeriod, true);
// Endless loop
......@@ -171,7 +171,7 @@ void castor::gc::SynchronizationThread::run(void*) {
continue;
} else if (!(filebuf.st_mode & S_IFREG)) {
continue; // not a file
} else if (filebuf.st_mtime > time(NULL) - (time_t)gracePeriod) {
} else if (filebuf.st_mtime > time(NULL) - gracePeriod) {
continue;
}
......@@ -265,7 +265,7 @@ void castor::gc::SynchronizationThread::readConfigFile
(unsigned int *chunkInterval,
unsigned int *chunkSize,
bool *disableStagerSync,
unsigned int *gracePeriod,
time_t *gracePeriod,
bool firstTime)
throw(castor::exception::Exception) {
......
......@@ -88,7 +88,7 @@ namespace castor {
void readConfigFile(unsigned int *chunkInterval,
unsigned int *chunkSize,
bool *disableStagerSync,
unsigned int *gracePeriod,
time_t *gracePeriod,
bool firstTime = false)
throw(castor::exception::Exception);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment