Fix incorrect cherry-pick in previous commit.

This commit is contained in:
Eugene Bujak 2018-11-29 14:56:56 +03:00
parent 2012e707d0
commit 45ae984f3b
2 changed files with 4 additions and 4 deletions

4
app.go
View File

@ -158,7 +158,7 @@ func main() {
go func() { go func() {
refreshFiltersIfNeccessary(false) refreshFiltersIfNeccessary(false)
// Save the updated config // Save the updated config
err := writeConfig() err := config.write()
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
@ -170,7 +170,7 @@ func main() {
} }
// Save the updated config // Save the updated config
err := writeConfig() err := config.write()
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }

View File

@ -171,7 +171,7 @@ func parseConfig() error {
} }
// Saves configuration to the YAML file and also saves the user filter contents to a file // Saves configuration to the YAML file and also saves the user filter contents to a file
func writeConfig() error { func (c *configuration) write() error {
c.Lock() c.Lock()
defer c.Unlock() defer c.Unlock()
configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename) configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
@ -217,7 +217,7 @@ func writeCoreDNSConfig() error {
} }
func writeAllConfigs() error { func writeAllConfigs() error {
err := writeConfig() err := config.write()
if err != nil { if err != nil {
log.Printf("Couldn't write our config: %s", err) log.Printf("Couldn't write our config: %s", err)
return err return err