Initialize disk_space_checked
Was reading an uninitialized value.
This commit is contained in:
@ -110,6 +110,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual json_t* diagnostics_json() const;
|
virtual json_t* diagnostics_json() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current time from the monotonic clock.
|
||||||
|
*
|
||||||
|
* @return Current time
|
||||||
|
*/
|
||||||
|
static int64_t get_time_ms();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MonitorInstance(MXS_MONITOR* pMonitor);
|
MonitorInstance(MXS_MONITOR* pMonitor);
|
||||||
|
|
||||||
@ -141,8 +148,6 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void update_disk_space_status(MXS_MONITORED_SERVER* pMonitored_server);
|
void update_disk_space_status(MXS_MONITORED_SERVER* pMonitored_server);
|
||||||
|
|
||||||
static int64_t get_time_ms();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure the monitor.
|
* @brief Configure the monitor.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -367,6 +367,9 @@ bool monitor_add_server(MXS_MONITOR* mon, SERVER* server)
|
|||||||
db->next = NULL;
|
db->next = NULL;
|
||||||
db->mon_err_count = 0;
|
db->mon_err_count = 0;
|
||||||
db->log_version_err = true;
|
db->log_version_err = true;
|
||||||
|
// Pretend disk space was just checked.
|
||||||
|
db->disk_space_checked = maxscale::MonitorInstance::get_time_ms();
|
||||||
|
|
||||||
|
|
||||||
/** Server status is uninitialized */
|
/** Server status is uninitialized */
|
||||||
db->mon_prev_status = -1;
|
db->mon_prev_status = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user