diff options
author | Mattes D <github@xoft.cz> | 2016-08-16 13:02:08 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-08-22 20:09:56 +0200 |
commit | 9493488e48c49a54e9b1ec892107735de6736c13 (patch) | |
tree | e8f2756003714cf54ebda9168016130b5c0a1432 /src/Bindings/ManualBindings_Network.cpp | |
parent | cLuaState: Added support for optional params and AStringMap values. (diff) | |
download | cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.gz cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.bz2 cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.lz cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.xz cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.zst cuberite-9493488e48c49a54e9b1ec892107735de6736c13.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/ManualBindings_Network.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings_Network.cpp b/src/Bindings/ManualBindings_Network.cpp index 68eba5870..c8565d23d 100644 --- a/src/Bindings/ManualBindings_Network.cpp +++ b/src/Bindings/ManualBindings_Network.cpp @@ -649,8 +649,7 @@ static int tolua_cTCPLink_StartTLSClient(lua_State * L) AString res = Link->StartTLSClient(OwnCert, OwnPrivKey, OwnPrivKeyPassword); if (!res.empty()) { - S.PushNil(); - S.Push(Printf("Cannot start TLS on link to %s:%d: %s", Link->GetRemoteIP().c_str(), Link->GetRemotePort(), res.c_str())); + S.Push(cLuaState::Nil, Printf("Cannot start TLS on link to %s:%d: %s", Link->GetRemoteIP().c_str(), Link->GetRemotePort(), res.c_str())); return 2; } return 1; @@ -695,10 +694,10 @@ static int tolua_cTCPLink_StartTLSServer(lua_State * L) AString res = Link->StartTLSServer(OwnCert, OwnPrivKey, OwnPrivKeyPassword, StartTLSData); if (!res.empty()) { - S.PushNil(); - S.Push(Printf("Cannot start TLS on link to %s:%d: %s", Link->GetRemoteIP().c_str(), Link->GetRemotePort(), res.c_str())); + S.Push(cLuaState::Nil, Printf("Cannot start TLS on link to %s:%d: %s", Link->GetRemoteIP().c_str(), Link->GetRemotePort(), res.c_str())); return 2; } + S.Push(true); return 1; } |