Commit 82b41e59 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2603] (Lua) Evitar que as chamadas para objetos cujo login se tornou...

[OPENBUS-2603] (Lua) Evitar que as chamadas para objetos cujo login se tornou inválido lançem NO_PERMISSIN{InvalidTarget} indefinidamente

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/02_00_00@157632 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 9d41ac32
......@@ -281,7 +281,8 @@ function Interceptor:sendrequest(request)
local chain = context.joinedChainOf[running()]
if chain==nil or chain.signature~=nil then -- no legacy chain (OpenBus 1.5)
local sessionid, ticket, hash = 0, 0, NullHash
local target = self.profile2login:get(request.profile_data)
local profile2login = self.profile2login
local target = profile2login:get(request.profile_data)
if target ~= nil then -- known IOR profile, so it supports OpenBus 2.0
legacy = nil -- do not send legacy credential (OpenBus 1.5)
local ok, result = pcall(self.signChainFor, self, target, chain or NullChain)
......@@ -291,8 +292,13 @@ function Interceptor:sendrequest(request)
target = target,
chain = chain,
})
local minor = loginconst.BusUnavailableCode
local minor = loginconst.UnavailableBusCode
if result._repid == InvalidLoginsException then
for profile_data, profile_target in pairs(profile2login.map) do
if target == profile_target then
profile2login:remove(profile_data)
end
end
minor = loginconst.InvalidTargetCode
end
setNoPermSysEx(request, minor)
......
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