Commit a15c8988 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2564] Ajustar o protocolo para que as chaves de acesso distribuídas...

[OPENBUS-2564] Ajustar o protocolo para que as chaves de acesso distribuídas pelo núcleo sejam assinadas
- Ajustando os arquivos de compilação após remoção do suporte ao protocolo legado 1.5.

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/trunk@156043 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 68bcaae2
local _G = require "_G"
local ipairs = _G.ipairs
local array = require "table"
local unpack = array.unpack or _G.unpack
local debug = require "debug"
local traceback = debug.traceback
local makeaux = require "openbus.core.idl.makeaux"
local parsed = require "openbus.core.legacy.parsed"
local types, const, throw = {}, {}, {}
for _, parsed in ipairs(parsed) do
if parsed.name == "tecgraf" then
makeaux(parsed, types, const, throw)
end
end
local idl = {
types = types.tecgraf.openbus.core.v2_0,
const = const.tecgraf.openbus.core.v2_0,
throw = throw.tecgraf.openbus.core.v2_0,
}
local ServiceFailure
do
local failure = idl.throw.services.ServiceFailure
function ServiceFailure(fields)
fields.stacktrace = traceback()
return failure(fields)
end
idl.throw.services.ServiceFailure = ServiceFailure
end
function idl.serviceAssertion(ok, errmsg, ...)
if not ok then ServiceFailure{message = errmsg or "assertion failed"} end
return ok, errmsg, ...
end
function idl.loadto(orb)
orb.TypeRepository.registry:register(unpack(parsed))
end
return idl
local _G = require "_G"
local assert = _G.assert
local io = require "io"
local stderr = io.stderr
local luaidl = require "luaidl"
local parse = luaidl.parse
local idlspec = [[
#include "access_control.idl"
#include "offer_registry.idl"
]]
local idlpath = os.getenv("OPENBUS_IDLPATH")
if idlpath == nil then
stderr:write("OPENBUS_IDLPATH is not defined! Using '.' as default.\n")
idlpath = "."
end
local Compiler = require "oil.corba.idl.Compiler"
local options = Compiler().defaults
options.incpath = {
idlpath.."/old",
idlpath.."/scs",
}
return { assert(parse(idlspec, options)) }
......@@ -4,8 +4,7 @@ LIBNAME= $(PROJNAME)
SRC= $(PRELOAD_DIR)/$(LIBNAME).c
OPENBUSSCSIDL= ${SCS_IDL1_2_HOME}/src
OPENBUSOLDIDL= ${OPENBUS_IDL1_5_HOME}/src
OPENBUSNEWIDL= ${OPENBUS_IDL2_0_HOME}/src
OPENBUSNEWIDL= ${OPENBUS_IDL2_1_HOME}/src
OPENBUSLIBIDL= ${SDK_IDL_SOURCE_HOME}/src
LUADIR= ../lua
......@@ -16,8 +15,6 @@ LUASRC= \
$(LUADIR)/openbus/core/idl/makeaux.lua \
$(LUADIR)/openbus/core/idl/parsed.lua \
$(LUADIR)/openbus/core/idl.lua \
$(LUADIR)/openbus/core/legacy/idl.lua \
$(LUADIR)/openbus/core/legacy/parsed.lua \
$(LUADIR)/openbus/core/messages.lua \
$(LUADIR)/openbus/idl/parsed.lua \
$(LUADIR)/openbus/idl.lua \
......@@ -46,15 +43,6 @@ NEWDEPENDENTIDL= \
$(OPENBUSNEWIDL)/credential.idl \
$(OPENBUSSCSIDL)/scs.idl
OLDIDL= \
$(OPENBUSOLDIDL)/access_control_service.idl \
$(OPENBUSOLDIDL)/registry_service.idl \
$(OPENBUSOLDIDL)/fault_tolerance.idl
OLDDEPENDENTIDL= \
$(OPENBUSOLDIDL)/core.idl \
$(OPENBUSSCSIDL)/scs.idl
include ${OIL_HOME}/openbus/base.mak
$(LUADIR)/openbus/idl/parsed.lua: $(IDL2LUA) $(LIBIDL) $(NEWIDL) $(NEWDEPENDENTIDL) $(LIBDEPENDENTIDL)
......@@ -62,6 +50,3 @@ $(LUADIR)/openbus/idl/parsed.lua: $(IDL2LUA) $(LIBIDL) $(NEWIDL) $(NEWDEPENDENTI
$(LUADIR)/openbus/core/idl/parsed.lua: $(IDL2LUA) $(NEWIDL) $(NEWDEPENDENTIDL)
$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSNEWIDL) -o $@ $(NEWIDL)
$(LUADIR)/openbus/core/legacy/parsed.lua: $(IDL2LUA) $(OLDIDL) $(OLDDEPENDENTIDL)
$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSOLDIDL) -o $@ $(OLDIDL)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment