From ce0e9759f8538751c1bd03ca005b9144b8a6ba54 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Thu, 30 Jul 2015 11:22:56 -0700 Subject: [PATCH] Fixes config merge fn for disabling coordinates and adds it to JSON. --- command/agent/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/agent/config.go b/command/agent/config.go index dd3afdc421..f59bbc9b2c 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -373,7 +373,7 @@ type Config struct { AEInterval time.Duration `mapstructure:"-" json:"-"` // DisableCoordinates controls features related to network coordinates. - DisableCoordinates bool `mapstructure:"disable_coordinates" json:"-"` + DisableCoordinates bool `mapstructure:"disable_coordinates"` // SyncCoordinateRateTarget controls the rate for sending network // coordinates to the server, in updates per second. This is the max rate @@ -1087,6 +1087,9 @@ func MergeConfig(a, b *Config) *Config { if b.AtlasEndpoint != "" { result.AtlasEndpoint = b.AtlasEndpoint } + if b.DisableCoordinates { + result.DisableCoordinates = true + } if b.SessionTTLMinRaw != "" { result.SessionTTLMin = b.SessionTTLMin result.SessionTTLMinRaw = b.SessionTTLMinRaw