FreeBSD Bugzilla – Attachment 256721 Details for
Bug 283900
sysutils/apcupsd: Increase COMMLOST_TIMEOUT in pcnet.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (updated)
0001-sysutils-apcupsd-Increase-COMMLOST_TIMEOUT-in-pcnet..patch (text/plain), 3.20 KB, created by
Steven Stallion
on 2025-01-15 17:50:05 UTC
(
hide
)
Description:
Proposed patch (updated)
Filename:
MIME Type:
Creator:
Steven Stallion
Created:
2025-01-15 17:50:05 UTC
Size:
3.20 KB
patch
obsolete
>From d6dca15a634d1dda8e7dc8bf083dd1dbd2617536 Mon Sep 17 00:00:00 2001 >From: Steven Stallion <sstallion@gmail.com> >Date: Wed, 15 Jan 2025 11:44:43 -0600 >Subject: [PATCH] sysutils/apcupsd: Increase COMMLOST_TIMEOUT in pcnet.c > >The default COMMLOST_TIMEOUT is too strict for some environments. Newer >NMC firmware releases may delay status packets by more than 60 seconds, >which results in spurious COMMLOST events. > >See https://sourceforge.net/p/apcupsd/mailman/message/59114143/ for >details. >--- > sysutils/apcupsd/Makefile | 12 +++++++----- > sysutils/apcupsd/files/extra-patch-pcnet-commlost | 15 +++++++++++++++ > 2 files changed, 22 insertions(+), 5 deletions(-) > create mode 100644 sysutils/apcupsd/files/extra-patch-pcnet-commlost > >diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile >index 05ffa81769f8..993d5b9128ce 100644 >--- a/sysutils/apcupsd/Makefile >+++ b/sysutils/apcupsd/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= apcupsd > PORTVERSION= 3.14.14 >-PORTREVISION= 5 >+PORTREVISION= 6 > CATEGORIES= sysutils > MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20-%20Stable/${PORTVERSION} > >@@ -29,10 +29,10 @@ SUB_FILES= pkg-message > CONFLICTS_INSTALL= apcctrl > > OPTIONS_DEFINE= APCDUMB_DRV APCSMART_DRV CGI CLIENT_ONLY GAPCMON MODBUS \ >- MODBUS_USB PCNET_DRV SHUTDOWN_POWEROFF SNMP_DRV SNMP_DRV_OLD \ >- TCP_WRAPPERS TEST_DRV USB_DRV USB_REPORTING >-OPTIONS_DEFAULT= APCDUMB_DRV APCSMART_DRV MODBUS MODBUS_USB PCNET_DRV \ >- SNMP_DRV TCP_WRAPPERS USB_DRV >+ MODBUS_USB PCNET_COMMLOST PCNET_DRV SHUTDOWN_POWEROFF SNMP_DRV \ >+ SNMP_DRV_OLD TCP_WRAPPERS TEST_DRV USB_DRV USB_REPORTING >+OPTIONS_DEFAULT= APCDUMB_DRV APCSMART_DRV MODBUS MODBUS_USB PCNET_COMMLOST \ >+ PCNET_DRV SNMP_DRV TCP_WRAPPERS USB_DRV > OPTIONS_SUB= yes > > APCDUMB_DRV_DESC= Dumb UPS driver support >@@ -42,6 +42,7 @@ CLIENT_ONLY_DESC= Only NIS client (no network server or drivers) > GAPCMON_DESC= Build GTK GUI front-end > MODBUS_DESC= MODBUS driver support > MODBUS_USB_DESC= MODBUS USB driver support >+PCNET_COMMLOST_DESC= Experimental patch for faulty PCNET timeouts > PCNET_DRV_DESC= PowerChute Network Shutdown driver support > SHUTDOWN_POWEROFF_DESC= Shutdown behavior with Halt and Power off > SNMP_DRV_DESC= SNMP driver support >@@ -75,6 +76,7 @@ TCP_WRAPPERS_CONFIGURE_WITH= libwrap=yes > TEST_DRV_CONFIGURE_ENABLE= test > USB_DRV_CONFIGURE_ENABLE= usb > >+PCNET_COMMLOST_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-pcnet-commlost > USB_REPORTING_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-usb-reporting > > .include <bsd.port.options.mk> >diff --git a/sysutils/apcupsd/files/extra-patch-pcnet-commlost b/sysutils/apcupsd/files/extra-patch-pcnet-commlost >new file mode 100644 >index 000000000000..6e193df484b6 >--- /dev/null >+++ b/sysutils/apcupsd/files/extra-patch-pcnet-commlost >@@ -0,0 +1,15 @@ >+--- src/drivers/pcnet/pcnet.c (revision 2381) >++++ src/drivers/pcnet/pcnet.c (working copy) >+@@ -32,10 +32,10 @@ >+ >+ /* >+ * Number of seconds with no data before we declare COMMLOST. >+- * UPS should report in every 25 seconds. We allow 2 missing >++ * UPS should report in every 25 seconds. We allow 3 missing >+ * reports plus a fudge factor. >+ */ >+-#define COMMLOST_TIMEOUT 55 >++#define COMMLOST_TIMEOUT 80 >+ >+ /* Win32 needs a special close for sockets */ >+ #ifdef HAVE_MINGW >-- >2.47.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283900
:
256494
| 256721