Compare commits

..

No commits in common. "ccba27cedd495eb4d356b6967d6ec2b80cec8e34" and "ffeaf8cced5e2c0c4f7d4b862111a74e229ebf3e" have entirely different histories.

2 changed files with 9 additions and 2 deletions

View File

@ -12,7 +12,7 @@ var absoluteMouseConfig = gadgetConfigItem{
configPath: []string{"hid.usb1"}, configPath: []string{"hid.usb1"},
attrs: gadgetAttributes{ attrs: gadgetAttributes{
"protocol": "2", "protocol": "2",
"subclass": "0", "subclass": "1",
"report_length": "6", "report_length": "6",
}, },
reportDesc: absoluteMouseCombinedReportDesc, reportDesc: absoluteMouseCombinedReportDesc,

View File

@ -21,7 +21,6 @@ func networkStateChanged() {
// always restart mDNS when the network state changes // always restart mDNS when the network state changes
if mDNS != nil { if mDNS != nil {
_ = mDNS.SetListenOptions(config.NetworkConfig.GetMDNSMode())
_ = mDNS.SetLocalNames([]string{ _ = mDNS.SetLocalNames([]string{
networkState.GetHostname(), networkState.GetHostname(),
networkState.GetFQDN(), networkState.GetFQDN(),
@ -55,6 +54,14 @@ func initNetwork() error {
OnConfigChange: func(networkConfig *network.NetworkConfig) { OnConfigChange: func(networkConfig *network.NetworkConfig) {
config.NetworkConfig = networkConfig config.NetworkConfig = networkConfig
networkStateChanged() networkStateChanged()
if mDNS != nil {
_ = mDNS.SetListenOptions(networkConfig.GetMDNSMode())
_ = mDNS.SetLocalNames([]string{
networkState.GetHostname(),
networkState.GetFQDN(),
}, true)
}
}, },
}) })