diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-15 14:29:29 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-15 14:29:29 +0200 |
| commit | 28ef64c0721e00780a6276cee33af259c7752c39 (patch) | |
| tree | 11a23fd70710eb0ad8ae5f53d2196c051a92e360 /exports | |
| parent | 4067d4d8a476797d0e62b5f5f890cbccf7c8d67c (diff) | |
FSM + State + Python: Add a connecting state and improve back transitions
Diffstat (limited to 'exports')
| -rw-r--r-- | exports/exports.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/exports/exports.go b/exports/exports.go index 331270f..a00fa15 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -260,6 +260,17 @@ func SetDisconnected(name *C.char) *C.char { return C.CString(ErrorToString(setDisconnectedErr)) } +//export SetConnecting +func SetConnecting(name *C.char) *C.char { + nameStr := C.GoString(name) + state, stateErr := GetVPNState(nameStr) + if stateErr != nil { + return C.CString(ErrorToString(stateErr)) + } + setConnectingErr := state.SetConnecting() + return C.CString(ErrorToString(setConnectingErr)) +} + //export SetConnected func SetConnected(name *C.char) *C.char { nameStr := C.GoString(name) |
