summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-19 08:30:46 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-19 08:30:46 +0200
commit3f7a95dea59ce05ff9cd620fd51a25dd72b3827b (patch)
tree9cc27b0b2f2ccc62c094ca3de879b270c21691c0 /state.go
parentb3b78558e3d5d369f76a696e7f1b30559a16d3c7 (diff)
Server: Split CustomServer and split types into multiple files
Diffstat (limited to 'state.go')
-rw-r--r--state.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/state.go b/state.go
index 66f2de0..def8206 100644
--- a/state.go
+++ b/state.go
@@ -219,7 +219,7 @@ func (state *VPNState) addInstituteServer(url string) (server.Server, error) {
return nil, &types.WrappedErrorMessage{Message: errorMessage, Err: discoErr}
}
// Add the secure internet server
- server, serverErr := state.Servers.AddInstituteAccess(instituteServer, &state.FSM, &state.Logger)
+ server, serverErr := state.Servers.AddInstituteAccessServer(instituteServer, &state.FSM, &state.Logger)
if serverErr != nil {
return nil, &types.WrappedErrorMessage{Message: errorMessage, Err: serverErr}
@@ -233,10 +233,10 @@ func (state *VPNState) addInstituteServer(url string) (server.Server, error) {
func (state *VPNState) addCustomServer(url string) (server.Server, error) {
errorMessage := fmt.Sprintf("failed adding Custom server with url %s", url)
- instituteServer := &types.DiscoveryServer{BaseURL: url, DisplayName: map[string]string{"en": url}, Type: "custom_server"}
+ customServer := &types.DiscoveryServer{BaseURL: url, DisplayName: map[string]string{"en": url}, Type: "custom_server"}
// A custom server is just an institute access server under the hood
- server, serverErr := state.Servers.AddInstituteAccess(instituteServer, &state.FSM, &state.Logger)
+ server, serverErr := state.Servers.AddCustomServer(customServer, &state.FSM, &state.Logger)
if serverErr != nil {
return nil, &types.WrappedErrorMessage{Message: errorMessage, Err: serverErr}