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

@ -6,6 +6,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"sync" "sync"
"time"
"github.com/godbus/dbus" "github.com/godbus/dbus"
"github.com/subgraph/fw-daemon/proc-coroner" "github.com/subgraph/fw-daemon/proc-coroner"
@ -195,7 +196,6 @@ func (p *prompter) processConnection(pc pendingConnection) {
} }
func (p *prompter) nextConnection() (pendingConnection, bool) { func (p *prompter) nextConnection() (pendingConnection, bool) {
fmt.Println("nextConnection()")
for { for {
if len(p.policyQueue) == 0 { if len(p.policyQueue) == 0 {
return nil, true return nil, true
@ -205,6 +205,10 @@ fmt.Println("nextConnection()")
if pc == nil && qempty { if pc == nil && qempty {
p.removePolicy(policy) p.removePolicy(policy)
} else { } 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 return pc, qempty
} }
} }

Loading…
Cancel
Save