From 5bcda90b0608dc098ce22dc30de355e968f367fa Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Mon, 30 Sep 2024 00:31:28 +0200 Subject: [PATCH] add debug log message to clear_cached_oid function --- snmpd-oid-daemon.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snmpd-oid-daemon.sh b/snmpd-oid-daemon.sh index 2cf2509..88a439d 100644 --- a/snmpd-oid-daemon.sh +++ b/snmpd-oid-daemon.sh @@ -365,12 +365,15 @@ declare -A OIDTYPES function clear_cached_oid() { local base_oid=$1 local oid + local count=0 for oid in ${!OIDDATA[@]}; do if [[ $oid == $base_oid.* ]]; then unset OIDDATA[$oid] unset OIDTYPES[$oid] + ((count++)) fi done + echo "cache: removed $count OIDs" >&$DEBUGLOG return 0 }