Changeset 144


Ignore:
Timestamp:
Jan 18, 2010, 8:41:37 AM (11 years ago)
Author:
ogrimm
Message:
Core system updates
Location:
Evidence
Files:
1 added
6 deleted
2 edited
3 moved

Legend:

Unmodified
Added
Removed
  • Evidence/Alarm.cc

    r142 r144  
    108108        if (strcmp(getInfo()->getName(),"DIS_DNS/Status") == 0) return;
    109109       
    110         // Update State if server is unavailable or with current severity of status 
     110        // Update State: unavailable or current severity of status 
    111111        if (getInfo()->getSize()==strlen(NO_LINK)+1 &&
    112112                strcmp(getInfo()->getString(), NO_LINK)==0) State[i] = 4;
    113113        else {
    114           State[i] = *(getInfo()->getString()+strlen(getInfo()->getString())+2);
     114          State[i] = *(getInfo()->getString()+getInfo()->getSize());
    115115
    116116          // Print message
     
    132132   
    133133  for (int i=0; i<NumServers; i++) {
    134     snprintf(AlarmSummary+Offset, SUMMARYSIZE-Offset, "%s: %s\n", Server[i], StateString[State[i]]);
     134    snprintf(AlarmSummary+Offset, SUMMARYSIZE-Offset, "%s: %s (%d)\n", Server[i], State[i]<=4 ? StateString[State[i]] : "unknown", State[i]);
    135135        Offset += strlen(AlarmSummary+Offset);
    136136        if (State[i] > MasterAlarm) MasterAlarm = State[i];
  • Evidence/Config.cc

    r142 r144  
    1616\********************************************************************/
    1717
    18 #define DEFAULT_CONFIG "configuration.txt"
     18#define DEFAULT_CONFIG "../../config/Evidence.conf"
    1919#define SERVER_NAME "Config"
    2020
  • Evidence/Edd/Edd.pro

    r136 r144  
    66TARGET =
    77DEPENDPATH += .
    8 INCLUDEPATH += . /usr/local/qwt-5.2.0/include ../DIM/ ..
     8INCLUDEPATH += . .. /usr/local/qwt-5.2.0/include $(DIMDIR)/dim
    99
    1010# Input
    1111HEADERS += Edd.h
    1212SOURCES += Edd.cc ../Evidence.cc
    13 LIBS += -L/usr/local/qwt-5.2.0/lib -lqwt ../DIM/libdim.a
     13LIBS += -L/usr/local/qwt-5.2.0/lib -lqwt $(DIMDIR)/linux/libdim.a
  • Evidence/Evidence.cc

    r142 r144  
    9595  va_end(ArgumentPointer);
    9696
    97   snprintf(TBuf, sizeof(TBuf), "%s (%s): %s", StatusName, StateString[Severity], Tmp);
    98   snprintf(SBuf, sizeof(SBuf), "%s\0%d", Tmp);
    99 
     97  snprintf(TBuf, sizeof(TBuf), "%s (%s): %s", StatusName, StateString[Severity], Tmp); // Normal string
     98  snprintf(SBuf, sizeof(SBuf), "%s*%c", Tmp, (char) Severity);
     99  *(strrchr(SBuf, '*')) = '\0';  // String with severity encoding
    100100  if (Tmp != ErrorString) free(Tmp);
    101101 
     
    122122 
    123123  // Check if configuration request already in list
    124   for (int i=0; i<ConfigNum; i++) {
     124  for (unsigned int i=0; i<ConfigNum; i++) {
    125125    if (strcmp(ConfigList[i].Name, Item) == 0) {
    126126          // Return original value if still up to date
Note: See TracChangeset for help on using the changeset viewer.