Squashed (some) noisy debug output.

shw_dev
shw 8 years ago
parent 0f2b2413ea
commit 515c4eb3ee

@ -236,7 +236,6 @@ fmt.Println("processPromptResult(): p.promptInProgress = ", p.promptInProgress)
func (p *Policy) nextPending() (pendingConnection, bool) {
p.lock.Lock()
fmt.Println("nextPending(): len = ", len(p.pendingQueue))
defer p.lock.Unlock()
if !DoMultiPrompt {
if len(p.pendingQueue) == 0 {
@ -250,17 +249,13 @@ fmt.Println("nextPending(): len = ", len(p.pendingQueue))
}
// for len(p.pendingQueue) != 0 {
fmt.Println("nextPending() loop: len = ", len(p.pendingQueue))
for i := 0; i < len(p.pendingQueue); i++ {
fmt.Printf("pendingqueue %v: %v\n", i, p.pendingQueue[i].getPrompting())
if !p.pendingQueue[i].getPrompting() {
return p.pendingQueue[i], false
}
}
// }
fmt.Println("nextPending() returning")
return nil, false
}

@ -6,6 +6,7 @@ import (
"strconv"
"strings"
"sync"
"time"
"github.com/godbus/dbus"
"github.com/subgraph/fw-daemon/proc-coroner"
@ -195,7 +196,6 @@ func (p *prompter) processConnection(pc pendingConnection) {
}
func (p *prompter) nextConnection() (pendingConnection, bool) {
fmt.Println("nextConnection()")
for {
if len(p.policyQueue) == 0 {
return nil, true
@ -205,6 +205,10 @@ fmt.Println("nextConnection()")
if pc == nil && qempty {
p.removePolicy(policy)
} else {
if pc == nil && !qempty {
fmt.Println("FIX ME: I NEED TO SLEEP ON A WAKEABLE CONDITION PROPERLY!!")
time.Sleep(time.Millisecond * 300)
}
return pc, qempty
}
}

Loading…
Cancel
Save