- Timestamp:
- 01/18/10 08:41:37 (15 years ago)
- Location:
- Evidence
- Files:
-
- 1 added
- 6 deleted
- 2 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
Evidence/Alarm.cc
r142 r144 108 108 if (strcmp(getInfo()->getName(),"DIS_DNS/Status") == 0) return; 109 109 110 // Update State if server is unavailable or withcurrent severity of status110 // Update State: unavailable or current severity of status 111 111 if (getInfo()->getSize()==strlen(NO_LINK)+1 && 112 112 strcmp(getInfo()->getString(), NO_LINK)==0) State[i] = 4; 113 113 else { 114 State[i] = *(getInfo()->getString()+ strlen(getInfo()->getString())+2);114 State[i] = *(getInfo()->getString()+getInfo()->getSize()); 115 115 116 116 // Print message … … 132 132 133 133 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]); 135 135 Offset += strlen(AlarmSummary+Offset); 136 136 if (State[i] > MasterAlarm) MasterAlarm = State[i]; -
Evidence/Config.cc
r142 r144 16 16 \********************************************************************/ 17 17 18 #define DEFAULT_CONFIG " configuration.txt"18 #define DEFAULT_CONFIG "../../config/Evidence.conf" 19 19 #define SERVER_NAME "Config" 20 20 -
Evidence/Edd/Edd.pro
r136 r144 6 6 TARGET = 7 7 DEPENDPATH += . 8 INCLUDEPATH += . /usr/local/qwt-5.2.0/include ../DIM/ ..8 INCLUDEPATH += . .. /usr/local/qwt-5.2.0/include $(DIMDIR)/dim 9 9 10 10 # Input 11 11 HEADERS += Edd.h 12 12 SOURCES += Edd.cc ../Evidence.cc 13 LIBS += -L/usr/local/qwt-5.2.0/lib -lqwt ../DIM/libdim.a13 LIBS += -L/usr/local/qwt-5.2.0/lib -lqwt $(DIMDIR)/linux/libdim.a -
Evidence/Evidence.cc
r142 r144 95 95 va_end(ArgumentPointer); 96 96 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 100 100 if (Tmp != ErrorString) free(Tmp); 101 101 … … 122 122 123 123 // Check if configuration request already in list 124 for ( int i=0; i<ConfigNum; i++) {124 for (unsigned int i=0; i<ConfigNum; i++) { 125 125 if (strcmp(ConfigList[i].Name, Item) == 0) { 126 126 // Return original value if still up to date
Note:
See TracChangeset
for help on using the changeset viewer.