@@ -24,7 +24,6 @@ const (
2424 DefaultUDPBuffer = 1 << 22 // 4MB
2525 DefaultPacketBuffer = 1 << 18 // 256KB
2626 DefaultChanBuffer = 1 << 15 // 32 thousand
27- MaxStupidValue = uint (9999999 )
2827)
2928
3029// Config is the input _and_ running data.
@@ -118,32 +117,32 @@ func (c *Config) Start() error {
118117// setup makes sure configurations are sound and sane.
119118func (c * Config ) setup () {
120119 // Protect uint->int64 conversions.
121- if c .LogFileMB > MaxStupidValue {
122- c .LogFileMB = MaxStupidValue
120+ if c .LogFileMB > httpserver . MaxStupidValue {
121+ c .LogFileMB = httpserver . MaxStupidValue
123122 }
124123
125- if c .LogFiles > MaxStupidValue {
126- c .LogFiles = MaxStupidValue
124+ if c .LogFiles > httpserver . MaxStupidValue {
125+ c .LogFiles = httpserver . MaxStupidValue
127126 }
128127
129- if c .HTTPServer .AccessLogMB > MaxStupidValue {
130- c .HTTPServer .AccessLogMB = MaxStupidValue
128+ if c .HTTPServer .AccessLogMB > httpserver . MaxStupidValue {
129+ c .HTTPServer .AccessLogMB = httpserver . MaxStupidValue
131130 }
132131
133- if c .HTTPServer .AccessLogFiles > MaxStupidValue {
134- c .HTTPServer .AccessLogFiles = MaxStupidValue
132+ if c .HTTPServer .AccessLogFiles > httpserver . MaxStupidValue {
133+ c .HTTPServer .AccessLogFiles = httpserver . MaxStupidValue
135134 }
136135
137136 if c .Processors < 1 {
138137 c .Processors = 1
139- } else if c .Processors > MaxStupidValue {
140- c .Processors = MaxStupidValue
138+ } else if c .Processors > httpserver . MaxStupidValue {
139+ c .Processors = httpserver . MaxStupidValue
141140 }
142141
143142 if c .Listeners < 1 {
144143 c .Listeners = 1
145- } else if c .Listeners > MaxStupidValue {
146- c .Listeners = MaxStupidValue
144+ } else if c .Listeners > httpserver . MaxStupidValue {
145+ c .Listeners = httpserver . MaxStupidValue
147146 }
148147
149148 if c .newBuf = buf .NewBuffer ; c .BufferPool {
0 commit comments