Imported Upstream version 2.6.1
This commit is contained in:
parent
459aaf9392
commit
a367d9bc54
178 changed files with 4651 additions and 3279 deletions
|
|
@ -186,7 +186,7 @@ static int blazer_status(const char *cmd)
|
|||
* 01234567890123456789012345678901234567890123456
|
||||
* 0 1 2 3 4
|
||||
*/
|
||||
if (blazer_command(cmd, buf, sizeof(buf)) < 47) {
|
||||
if (blazer_command(cmd, buf, sizeof(buf)) < 46) {
|
||||
upsdebugx(2, "%s: short reply", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -691,6 +691,9 @@ void upsdrv_updateinfo(void)
|
|||
if (blazer_status(command[proto].status)) {
|
||||
|
||||
if (retry < MAXTRIES) {
|
||||
upsdebugx(1, "Communications with UPS lost: status read failed!");
|
||||
retry++;
|
||||
} else if (retry == MAXTRIES) {
|
||||
upslogx(LOG_WARNING, "Communications with UPS lost: status read failed!");
|
||||
retry++;
|
||||
} else {
|
||||
|
|
@ -723,7 +726,7 @@ void upsdrv_updateinfo(void)
|
|||
lastpoll = now;
|
||||
}
|
||||
|
||||
if (retry) {
|
||||
if (retry > MAXTRIES) {
|
||||
upslogx(LOG_NOTICE, "Communications with UPS re-established");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue