Pull request: home: fix install panic
Closes #3596. Squashed commit of the following: commit e14f8795859cf775b360d4fe2f5c1d0eebb87ba6 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Sep 14 17:49:48 2021 +0300 home: fix install panic
This commit is contained in:
@@ -257,7 +257,8 @@ type applyConfigReq struct {
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
// Copy installation parameters between two configuration objects
|
||||
// copyInstallSettings copies the installation parameters between two
|
||||
// configuration structures.
|
||||
func copyInstallSettings(dst, src *configuration) {
|
||||
dst.BindHost = src.BindHost
|
||||
dst.BindPort = src.BindPort
|
||||
@@ -307,7 +308,7 @@ func (web *Web) handleInstallConfigure(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var curConfig *configuration
|
||||
curConfig := &configuration{}
|
||||
copyInstallSettings(curConfig, config)
|
||||
|
||||
Context.firstRun = false
|
||||
|
||||
Reference in New Issue
Block a user