Mercurial > hg > orthanc
diff OrthancServer/LuaScripting.cpp @ 1440:3567503c00a7
lua
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 01 Jul 2015 10:18:26 +0200 |
parents | 02f5a3f5c0a0 |
children | f3672356c121 |
line wrap: on
line diff
--- a/OrthancServer/LuaScripting.cpp Wed Jul 01 10:00:21 2015 +0200 +++ b/OrthancServer/LuaScripting.cpp Wed Jul 01 10:18:26 2015 +0200 @@ -58,12 +58,12 @@ } - int LuaScripting::RestApiGet(lua_State *state) + int LuaScripting::OrthancApiGet(lua_State *state) { OrthancRestApi* restApi = GetRestApi(state); if (restApi == NULL) { - LOG(ERROR) << "Lua: The REST API is unavailable"; + LOG(ERROR) << "Lua: The Orthanc API is unavailable"; lua_pushnil(state); return 1; } @@ -72,7 +72,7 @@ int nArgs = lua_gettop(state); if (nArgs != 1 || !lua_isstring(state, 1)) // URI { - LOG(ERROR) << "Lua: Bad parameters to RestApiGet()"; + LOG(ERROR) << "Lua: Bad parameters to OrthancApiGet()"; lua_pushnil(state); return 1; } @@ -86,7 +86,7 @@ } else { - LOG(ERROR) << "Lua: Error in RestApiGet() for URI " << uri; + LOG(ERROR) << "Lua: Error in OrthancApiGet() for URI " << uri; lua_pushnil(state); } @@ -246,7 +246,7 @@ LuaScripting::LuaScripting(ServerContext& context) : context_(context), restApi_(NULL) { - lua_.RegisterFunction("RestApiGet", RestApiGet); + lua_.RegisterFunction("OrthancApiGet", OrthancApiGet); lua_.Execute(Orthanc::EmbeddedResources::LUA_TOOLBOX); lua_.SetHttpProxy(Configuration::GetGlobalStringParameter("HttpProxy", ""));