diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-04 15:29:11 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-04 15:29:11 +0200 |
| commit | 5dad968aa90ded83d57211426bc186f6d609ef06 (patch) | |
| tree | 1f072a2f5af07a64d88b85e04f0bc321d921c07a /exports/exports.go | |
| parent | b950e027b3553ccc767f88be8e88a1b3acf1b383 (diff) | |
State: Rename to client to avoid confusion with the FSM
Diffstat (limited to 'exports/exports.go')
| -rw-r--r-- | exports/exports.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/exports/exports.go b/exports/exports.go index a5c008a..fdf3d94 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -22,10 +22,10 @@ import ( var P_StateCallbacks map[string]C.PythonCB -var VPNStates map[string]*eduvpn.VPNState +var VPNStates map[string]*eduvpn.Client func GetStateData( - state *eduvpn.VPNState, + state *eduvpn.Client, stateID eduvpn.FSMStateID, data interface{}, ) unsafe.Pointer { @@ -55,7 +55,7 @@ func GetStateData( } func StateCallback( - state *eduvpn.VPNState, + state *eduvpn.Client, name string, old_state eduvpn.FSMStateID, new_state eduvpn.FSMStateID, @@ -74,7 +74,7 @@ func StateCallback( // data_c gets freed by the wrapper } -func GetVPNState(name string) (*eduvpn.VPNState, error) { +func GetVPNState(name string) (*eduvpn.Client, error) { state, exists := VPNStates[name] if !exists || state == nil { @@ -94,10 +94,10 @@ func Register( nameStr := C.GoString(name) state, stateErr := GetVPNState(nameStr) if stateErr != nil { - state = &eduvpn.VPNState{} + state = &eduvpn.Client{} } if VPNStates == nil { - VPNStates = make(map[string]*eduvpn.VPNState) + VPNStates = make(map[string]*eduvpn.Client) } if P_StateCallbacks == nil { P_StateCallbacks = make(map[string]C.PythonCB) |
