Changeset 10932


Ignore:
Timestamp:
06/08/11 18:50:37 (13 years ago)
Author:
tbretz
Message:
Added some more const-qualifiers; replaced a local fTime by ftime; first check if it is a command before the black and white lists are checked
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/dataLogger.cc

    r10931 r10932  
    537537void DataLogger::AddService(const string& server, const string& service, const string&, bool isCmd)
    538538{
     539         //dataLogger does not subscribe to commands
     540    if (isCmd)
     541        return;
     542
    539543    //check the given subscription against black and white lists
    540544    if (!ShouldSubscribe(server, service))
    541         return;
    542 
    543          //dataLogger does not subscribe to commands
    544     if (isCmd)
    545545        return;
    546546
     
    672672        return false;
    673673
    674     if (((fBlackList.find(server + "/") != fBlackList.end()) ||
     674    if ((fBlackList.find(server + "/") != fBlackList.end()) ||
    675675         (fBlackList.find(server + "/" + service) != fBlackList.end()) ||
    676          (fBlackList.find("/" + service) != fBlackList.end())))
     676         (fBlackList.find("/" + service) != fBlackList.end()))
    677677        return false;
    678678
     
    691691       ostringstream str;
    692692       //calculate time suitable for naming files.
    693        Time fTime(time-boost::posix_time::time_duration(12,0,0));
     693       const Time ftime(time-boost::posix_time::time_duration(12,0,0));
    694694
    695695       //output it
    696        str << path << Time::fmt("/%Y/%m/%d") << fTime;
     696       str << path << Time::fmt("/%Y/%m/%d") << ftime;
    697697
    698698       //check if target directory exist
     
    701701
    702702       //output base of file name
    703        str << Time::fmt("/%Y_%m_%d") << fTime;
     703       str << Time::fmt("/%Y_%m_%d") << ftime;
    704704
    705705       //output service name
Note: See TracChangeset for help on using the changeset viewer.