summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-10-08 17:42:12 +0200
committerMattes D <github@xoft.cz>2015-10-08 17:42:12 +0200
commit86ab236b01b1aa34f94cad53b7d0747f8619269f (patch)
tree6b0381ce01c59ab52362f3e4ebd15e4db84c910a /src
parentMerge pull request #2528 from OdnetninI/master (diff)
parentFixed bindings for cTCPLink:StartTLSClient(). (diff)
downloadcuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.tar
cuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.tar.gz
cuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.tar.bz2
cuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.tar.lz
cuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.tar.xz
cuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.tar.zst
cuberite-86ab236b01b1aa34f94cad53b7d0747f8619269f.zip
Diffstat (limited to 'src')
-rw-r--r--src/Bindings/ManualBindings_Network.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/Bindings/ManualBindings_Network.cpp b/src/Bindings/ManualBindings_Network.cpp
index 99f86b500..1eec4ce53 100644
--- a/src/Bindings/ManualBindings_Network.cpp
+++ b/src/Bindings/ManualBindings_Network.cpp
@@ -626,25 +626,15 @@ static int tolua_cTCPLink_StartTLSClient(lua_State * L)
// Function signature:
// LinkInstance:StartTLSClient(OwnCert, OwnPrivKey, OwnPrivKeyPassword) -> [true] or [nil, ErrMsg]
- cLuaState S(L);
- if (
- !S.CheckParamUserType(1, "cTCPLink") ||
- !S.CheckParamString(2, 4) ||
- !S.CheckParamEnd(5)
- )
- {
- return 0;
- }
-
// Get the link:
- cLuaTCPLink * Link;
+ cLuaState S(L);
if (lua_isnil(L, 1))
{
LOGWARNING("cTCPLink:StartTLSClient(): invalid link object. Stack trace:");
S.LogStackTrace();
return 0;
}
- Link = *static_cast<cLuaTCPLink **>(lua_touserdata(L, 1));
+ auto Link = *static_cast<cLuaTCPLink **>(lua_touserdata(L, 1));
// Read the params:
AString OwnCert, OwnPrivKey, OwnPrivKeyPassword;