diff options
| -rw-r--r-- | exports/exports.go | 8 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/types.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/exports/exports.go b/exports/exports.go index 724185a..be53079 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -78,7 +78,7 @@ func StateCallback( dataC := C.CString(d) handled := C.call_callback(PStateCallback, oldStateC, newStateC, unsafe.Pointer(dataC)) FreeString(dataC) - return handled == C.int(1) + return handled != C.int(0) } func getVPNState() (*client.Client, error) { @@ -108,7 +108,7 @@ func Register( C.GoString(version), C.GoString(configDirectory), StateCallback, - debug == 1, + debug != 0, ) return getCError(registerErr) @@ -257,7 +257,7 @@ func GetConfig(_type C.int, id *C.char, pTCP C.int, tokens *C.char) (*C.char, *C if stateErr != nil { return nil, getCError(stateErr) } - preferTCPBool := pTCP == 1 + preferTCPBool := pTCP != 0 tok, err := getTokens(tokens) if err != nil { return nil, getCError(err) @@ -367,7 +367,7 @@ func SetSupportWireguard(support C.int) *C.char { if stateErr != nil { return getCError(stateErr) } - state.SupportsWireguard = support == 1 + state.SupportsWireguard = support != 0 return nil } diff --git a/wrappers/python/eduvpn_common/types.py b/wrappers/python/eduvpn_common/types.py index ea5bbd2..4e54ad3 100644 --- a/wrappers/python/eduvpn_common/types.py +++ b/wrappers/python/eduvpn_common/types.py @@ -107,4 +107,4 @@ def get_bool(lib: CDLL, boolInt: c_int) -> bool: :return: The boolean converted to Python :rtype: bool """ - return boolInt == 1 + return boolInt != 0 |
