diff --git a/mtce/src/heartbeat/hbsUtil.cpp b/mtce/src/heartbeat/hbsUtil.cpp index c4fbe4c7..ae2a81d3 100644 --- a/mtce/src/heartbeat/hbsUtil.cpp +++ b/mtce/src/heartbeat/hbsUtil.cpp @@ -163,7 +163,7 @@ void hbs_cluster_log ( string & hostname, if ( cluster.history[h].entries == MTCE_HBS_HISTORY_ENTRIES ) { #define MAX_CLUSTER_LINE_LEN 100 -#define MAX_ENTRY_STR_LEN 10 /* "9999:9999 " */ +#define MAX_ENTRY_STR_LEN 13 /* "9999:9999 " */ mtce_hbs_cluster_entry_type e = { 0, 0 } ; char str[MAX_CLUSTER_LINE_LEN] ; string line = ""; diff --git a/mtce/src/hwmon/hwmonAlarm.cpp b/mtce/src/hwmon/hwmonAlarm.cpp index 920b59bf..15f0f56d 100644 --- a/mtce/src/hwmon/hwmonAlarm.cpp +++ b/mtce/src/hwmon/hwmonAlarm.cpp @@ -257,15 +257,7 @@ int hwmon_alarm_util ( string & hostname, "%s is reporting a '%s' out-of-tolerance reading from the '%s' sensor", hostname.c_str(), _getSev_str (severity).c_str(), sub_entity.c_str()); - if ( state == FM_ALARM_STATE_CLEAR ) - { - snprintf(alarm.reason_text, FM_MAX_BUFFER_LENGTH, - "%s:%s alarm clear\n", - alarm.alarm_id, - alarm.entity_instance_id); - hostname_prefix_in_reason = false ; - } - else if ( state == FM_ALARM_STATE_MSG ) + if ( state == FM_ALARM_STATE_MSG ) { if ( severity == FM_ALARM_SEVERITY_WARNING ) { diff --git a/mtce/src/pmon/pmonHdlr.cpp b/mtce/src/pmon/pmonHdlr.cpp index f3bf72e2..5b0e065d 100644 --- a/mtce/src/pmon/pmonHdlr.cpp +++ b/mtce/src/pmon/pmonHdlr.cpp @@ -538,6 +538,11 @@ bool service_file_exists ( string service_filename, char * path_n_name_ptr, int max_len ) { + if ( path_n_name_ptr == NULL ) { + slog ("Path for service files search is null.\n"); + return false; + } + /* load the name of the service file */ snprintf ( path_n_name_ptr, max_len, "%s/%s", SYSTEMD_SERVICE_FILE_DIR1,