Imported Upstream version 2.6.1

This commit is contained in:
Arnaud Quette 2011-06-01 22:31:49 +02:00
parent 459aaf9392
commit a367d9bc54
178 changed files with 4651 additions and 3279 deletions

View file

@ -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");
}