~craftyguy/dnsane

cf8102dac4db6bd37d5f385f962c75f301980b64 — Clayton Craft 1 year, 4 months ago ae9fe17
netman: debug print state from NM and when nameservers are sent
1 files changed, 5 insertions(+), 0 deletions(-)

M internal/netman/netman.go
M internal/netman/netman.go => internal/netman/netman.go +5 -0
@@ 99,6 99,8 @@ func (n *NetMan) signalHandler(sig *dbus.Signal) {
	// signals...
	newState := sig.Body[0].(uint32)

	n.log.Debugf("got new state from NetworkManager: %s", nm_states[newState])

	switch nm_states[newState] {
	case "NM_DEVICE_STATE_ACTIVATED":
		fallthrough


@@ 112,7 114,10 @@ func (n *NetMan) signalHandler(sig *dbus.Signal) {
			n.log.Println("netman: timed out trying to send latest list of nameservers")
			return
		case n.ns <- n.getNS():
			n.log.Debug("netman: sent list of nameservers")
		}
	default:
		n.log.Debug("netman: ignoring state from NetworkManager: ", nm_states[newState])
	}
}