summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-06-21 16:54:26 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-06-21 16:54:26 +0200
commit1393ab1888e50cf623d22a8135daf42bda333f99 (patch)
tree14d6e396fd367c23c1a91d51d76f5431a7684827 /exports
parentb4d744a80aa79d45f8a46119920abc1279ad4f20 (diff)
FSM: Add the search server state
Diffstat (limited to 'exports')
-rw-r--r--exports/exports.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/exports/exports.go b/exports/exports.go
index 17a9a9b..1081754 100644
--- a/exports/exports.go
+++ b/exports/exports.go
@@ -174,6 +174,17 @@ func SetIdentifier(name *C.char, identifier *C.char) *C.char {
return C.CString("")
}
+//export SetSearchServer
+func SetSearchServer(name *C.char) *C.char {
+ nameStr := C.GoString(name)
+ state, stateErr := GetVPNState(nameStr)
+ if stateErr != nil {
+ return C.CString(ErrorToString(stateErr))
+ }
+ setSearchErr := state.SetSearchServer()
+ return C.CString(ErrorToString(setSearchErr))
+}
+
//export SetDisconnected
func SetDisconnected(name *C.char) *C.char {
nameStr := C.GoString(name)