summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-22 10:55:37 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-22 10:55:37 +0200
commitf76e87fa5ec30c416a562c4b29689f6a3e29458c (patch)
tree1c4a0ef097a354dd61330c7bd7c09d4fad7c2f0f /exports
parent297dafbd45cd27165048262ef8ad00a8cb3e2b06 (diff)
Servers: Add initial support for multiple using a map
Diffstat (limited to 'exports')
-rw-r--r--exports/exports.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/exports/exports.go b/exports/exports.go
index c9ef41b..84cd571 100644
--- a/exports/exports.go
+++ b/exports/exports.go
@@ -86,7 +86,11 @@ func SetProfileID(data *C.char) *C.char {
// Set current profile to id
profile_id := C.GoString(data)
- state.Server.Profiles.Current = profile_id
+ server, serverErr := state.Servers.GetCurrentServer()
+ if serverErr != nil {
+ return C.CString("No server found for setting a profile ID")
+ }
+ server.Profiles.Current = profile_id
return C.CString("")
}