# HG changeset patch # User Sebastien Jodogne # Date 1435738706 -7200 # Node ID 3567503c00a767c161ea3a099aed4b25861ece23 # Parent 354640db5a7f3eb2f3303c6f75e195d1fb47ab83 lua diff -r 354640db5a7f -r 3567503c00a7 OrthancServer/LuaScripting.cpp --- 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", ""));