diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-10 11:55:43 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-10 11:55:43 +0200 |
| commit | 557cb4aa3ecb48800957c0f9f68571a11746d9fb (patch) | |
| tree | 05f6b51dca42a2b1876adfc7a908c8a06aa2de58 /exports/exports.go | |
| parent | 93a95d4be4d754a901ab42a8174ae0e725680a01 (diff) | |
State + Python: Implement renewing a session
Diffstat (limited to 'exports/exports.go')
| -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 76c882a..ce8faa2 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -270,6 +270,17 @@ func SetConnected(name *C.char) *C.char { return C.CString(ErrorToString(setConnectedErr)) } +//export RenewSession +func RenewSession(name *C.char) *C.char { + nameStr := C.GoString(name) + state, stateErr := GetVPNState(nameStr) + if stateErr != nil { + return C.CString(ErrorToString(stateErr)) + } + renewSessionErr := state.RenewSession() + return C.CString(ErrorToString(renewSessionErr)) +} + //export ShouldRenewButton func ShouldRenewButton(name *C.char) C.int { nameStr := C.GoString(name) |
