Ignore:
Timestamp:
07/21/11 09:31:57 (13 years ago)
Author:
lyard
Message:
fixed a bug related to bad services formatting
File:
1 edited

Legend:

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

    r11495 r11500  
    969969    {
    970970//        dim_lock();
     971        fNightlyLogFile << endl;
    971972        fNightlyLogFile.close();
    972973//        dim_unlock();
     
    12331234            Debug("Its Noon! Closing and reopening nightly text files");
    12341235
     1236        fNightlyLogFile << endl;
    12351237        fNightlyLogFile.close();
    12361238        fNightlyReportFile.close();
     
    12461248            return;
    12471249        }
     1250        fNightlyLogFile << endl;
    12481251
    12491252        fFullNightlyReportFileName = CompileFileNameWithPath(fNightlyFilePath, "", "rep");
     
    13361339            //remove this subscription from the list.
    13371340            //because these operators use references to elements, and because they're supposed here to erase these objects on the way, I'm not too sure... so duplicate the names !
    1338             string server = sub.server;
    1339             string service = sub.service;
    1340             fServiceSubscriptions.find(server)->second.erase(service);
     1341            RemoveService(sub.server, sub.service, false);
     1342//            string server = sub.server;
     1343//            string service = sub.service;
     1344//            fServiceSubscriptions.find(server)->second.erase(service);
    13411345            return;
    13421346        }
     
    13971401            //remove this subscription from the list.
    13981402            //because these operators use references to elements, and because they're supposed here to erase these objects on the way, I'm not too sure... so duplicate the names !
    1399             string server = sub.server;
    1400             string service = sub.service;
    1401             fServiceSubscriptions.find(server)->second.erase(service);
     1403            RemoveService(sub.server, sub.service, false);
     1404//            string server = sub.server;
     1405//            string service = sub.service;
     1406//            fServiceSubscriptions.find(server)->second.erase(service);
    14021407            return;
    14031408        }
     
    17761781    }
    17771782    fFullNightlyLogFileName = CompileFileNameWithPath(fNightlyFilePath, "", "log");
     1783    bool nightlyLogOpen = fNightlyLogFile.is_open();
    17781784    if (!OpenTextFilePlease(fNightlyLogFile, fFullNightlyLogFileName))
    17791785        return kSM_BadNightlyConfig;
    1780 
     1786    if (!nightlyLogOpen)
     1787        fNightlyLogFile << endl;
    17811788
    17821789    fFullNightlyReportFileName = CompileFileNameWithPath(fNightlyFilePath, "", "rep");
     
    20022009            {
    20032010                sub.nightlyFile.Close();
     2011                RemoveService(sub.server, sub.service, false);
    20042012                GoToNightlyWriteErrorState();
    20052013                return;
     
    20122020            {
    20132021                sub.runFile.Close();
     2022                RemoveService(sub.server, sub.service, false);
    20142023                GoToRunWriteErrorState();
    20152024                return;
     
    23852394         else
    23862395         {
     2396             fNightlyLogFile << endl;
    23872397             NotifyOpenedFile(fFullNightlyLogFileName, 1, fOpenedNightlyFiles);
    23882398             for (vector<string>::iterator it=backLogBuffer.begin();it!=backLogBuffer.end();it++)
Note: See TracChangeset for help on using the changeset viewer.