summaryrefslogtreecommitdiff
path: root/errorBox.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-01 21:47:10 -0500
committerJeff Carr <[email protected]>2024-11-01 21:47:10 -0500
commita4659ec59524279e5a80cd299491fe0a6dbf208a (patch)
tree01aa4a2e852430cc3050dd26ac2cbaaf3fc1320e /errorBox.go
parent42ca387a49857c6a179650c4296384ce74c1e3d1 (diff)
still compilesv0.22.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'errorBox.go')
-rw-r--r--errorBox.go39
1 files changed, 34 insertions, 5 deletions
diff --git a/errorBox.go b/errorBox.go
index 427b86e..3b4d432 100644
--- a/errorBox.go
+++ b/errorBox.go
@@ -103,10 +103,34 @@ func (eb *errorBox) addIPerror(kind ProblemType, action ActionType, ip string) b
}
tmp := kind.String() + " " + ip
if eb.fixes[tmp] != nil {
- log.Log(WARN, "Error is already here", kind, ip)
- log.Log(WARN, "kind =", kind)
- log.Log(WARN, "action =", action)
- log.Log(WARN, "ip =", ip)
+ log.Log(WARN, "Error is already here tmp =", tmp)
+ log.Log(WARN, "kind =", kind, "action =", action, "ip =", ip)
+ log.Log(WARN, "Need to check here if this thing is fixed")
+ thing := eb.fixes[tmp]
+ switch action {
+ case CREATE:
+ log.Log(WARN, "ValidDNS() CREATE begun =", thing.problem.begun)
+ if ValidDNS(ip) {
+ log.Log(WARN, "ValidDNS() == true begun =", thing.problem.begun)
+ if thing.problem.begun {
+ log.Log(WARN, "CREATE WORKED. IP is in DNS.", ip)
+ }
+ } else {
+ log.Log(WARN, "ValidDNS() == false. begun =", thing.problem.begun)
+ }
+ case DELETE:
+ log.Log(WARN, "ValidDNS() DELETE begun =", thing.problem.begun)
+ if ValidDNS(ip) {
+ if thing.problem.begun {
+ log.Log(WARN, "DELETE FAILED. IP is still in DNS", ip)
+ }
+ } else {
+ log.Log(WARN, "ValidDNS() == false. begun =", thing.problem.begun)
+ }
+ default:
+ log.Log(WARN, "ValidDNS() begun =", thing.problem.begun)
+ log.Log(WARN, "ValidDNS() unhandled ACTION", action)
+ }
return false
}
@@ -209,8 +233,13 @@ func (eb *errorBox) Scan() []anError {
log.Log(WARN, "Scan()", "attempted to fix has happened")
} else {
log.Log(WARN, "Scan()", "attempted to fix not yet happened")
- thing.Fix()
+ if thing.Fix() {
+ log.Log(WARN, "Scan()", "FIXED OK")
+ } else {
+ log.Log(WARN, "Scan()", "FIX FAILED")
+ }
}
+ thing.button.Disable()
}
return nil