Improve error message for zero monitor timeout values

The error message was not 100% accurate about the value. In addition to
that, neither the value itself nor the monitor or parameter names were
printed in the error message.
This commit is contained in:
Markus Mäkelä
2017-11-17 17:09:49 +02:00
parent 84d1ea0bff
commit 07e58444f6
4 changed files with 16 additions and 12 deletions

View File

@ -474,7 +474,7 @@ bool runtime_alter_monitor(MXS_MONITOR *monitor, const char *key, const char *va
if (ival)
{
valid = true;
monitorSetNetworkTimeout(monitor, MONITOR_CONNECT_TIMEOUT, ival);
monitorSetNetworkTimeout(monitor, MONITOR_CONNECT_TIMEOUT, ival, CN_BACKEND_CONNECT_TIMEOUT);
}
}
else if (strcmp(key, CN_BACKEND_WRITE_TIMEOUT) == 0)
@ -483,7 +483,7 @@ bool runtime_alter_monitor(MXS_MONITOR *monitor, const char *key, const char *va
if (ival)
{
valid = true;
monitorSetNetworkTimeout(monitor, MONITOR_WRITE_TIMEOUT, ival);
monitorSetNetworkTimeout(monitor, MONITOR_WRITE_TIMEOUT, ival, CN_BACKEND_WRITE_TIMEOUT);
}
}
else if (strcmp(key, CN_BACKEND_READ_TIMEOUT) == 0)
@ -492,7 +492,7 @@ bool runtime_alter_monitor(MXS_MONITOR *monitor, const char *key, const char *va
if (ival)
{
valid = true;
monitorSetNetworkTimeout(monitor, MONITOR_READ_TIMEOUT, ival);
monitorSetNetworkTimeout(monitor, MONITOR_READ_TIMEOUT, ival, CN_BACKEND_READ_TIMEOUT);
}
}
else if (strcmp(key, CN_BACKEND_CONNECT_ATTEMPTS) == 0)
@ -501,7 +501,7 @@ bool runtime_alter_monitor(MXS_MONITOR *monitor, const char *key, const char *va
if (ival)
{
valid = true;
monitorSetNetworkTimeout(monitor, MONITOR_CONNECT_ATTEMPTS, ival);
monitorSetNetworkTimeout(monitor, MONITOR_CONNECT_ATTEMPTS, ival, CN_BACKEND_CONNECT_ATTEMPTS);
}
}
else if (strcmp(key, CN_JOURNAL_MAX_AGE) == 0)