Changeset 14569 for trunk/FACT++


Ignore:
Timestamp:
11/06/12 10:10:38 (12 years ago)
Author:
lyard
Message:
removed constraints on QoS value and prevent from replacing descriptions once registered
File:
1 edited

Legend:

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

    r14438 r14569  
    7878
    7979#include "Description.h"
    80 #include "DimNetwork.h"
     80//#include "DimNetwork.h"
    8181
    8282#ifdef HAVE_FITS
     
    472472    if (server != "DIS_DNS")
    473473    {
     474        for (auto it=fServerDescriptionsList.begin(); it != fServerDescriptionsList.end(); it++)
     475            if ((*it)->server == server)
     476            {
     477                if (fDebugIsOn)
     478                {
     479                    ostringstream str;
     480                    str << "Already got description for server " << server << ". Ignoring." << endl;
     481                    Debug(str.str());
     482                    return;
     483                }
     484            }
    474485        DimDescriptions* d = new DimDescriptions(server);
    475486        d->SetCallbackDescriptions(bind(&DataLogger::HandleDescriptions, this, d));
     
    985996//        Debug(str.str());
    986997//    }
     998
    987999    if ((GetCurrentState() == kSM_Ready) &&  (!fAutoStarted) && fShouldAutoStart)
    9881000    {
     
    10141026            break;
    10151027    }
     1028
     1029    if (!found && fDebugIsOn)
     1030    {
     1031        ostringstream str;
     1032        str << "Service " << evt.GetName() << " not found in subscriptions" << endl;
     1033        Debug(str.str());
     1034    }
    10161035    if (!found)
    10171036        return GetCurrentState();
    10181037
     1038
     1039    if (evt.GetSize() == 0 && fDebugIsOn)
     1040    {
     1041        ostringstream str;
     1042        str << "Got 0 size for " << evt.GetName() << endl;
     1043        Debug(str.str());
     1044    }
    10191045    if (evt.GetSize() == 0)
    10201046        return GetCurrentState();
     1047
     1048    if (evt.GetFormat() == "" && fDebugIsOn)
     1049    {
     1050        ostringstream str;
     1051        str << "Got no format for " << evt.GetName() << endl;
     1052        Debug(str.str());
     1053    }
    10211054    if (evt.GetFormat() == "")
    10221055        return GetCurrentState();
     
    12081241    const Time cTime(evt.GetTime());
    12091242    fQuality = evt.GetQoS();
    1210     //I had strange surprises with the quality from Dim before. Double check that the value is indeed valid.
     1243/*    //I had strange surprises with the quality from Dim before. Double check that the value is indeed valid.
    12111244    if (fQuality != kMessage &&
    12121245        fQuality != kInfo &&
     
    12171250        fQuality != kDebug)
    12181251        fQuality = kError;
     1252*/
    12191253    fMjD = cTime.Mjd() ? cTime.Mjd()-40587 : 0;
    12201254
Note: See TracChangeset for help on using the changeset viewer.