OPENBUS-3112 Novo parâmetro para configurar nativecharset no busservices

 - adequações no build do busadmin e busservices para linkar com luaiconv
parent 31dcaebf
......@@ -48,6 +48,9 @@ local oil = require "oil"
local writeto = oil.writeto
local oillog = require "oil.verbose"
local CharsetContext = require("oil.corba.giop.CharsetContext")
local CORBACharsets = CharsetContext.known
local log = require "openbus.util.logger"
local dbconverter = require "openbus.util.database_converter"
local dbconvert = dbconverter.convert
......@@ -125,6 +128,7 @@ return function(...)
InvalidMaximumCacheSize = 29,
InvalidOrbCallsTimeout = 30,
MissingAuditServiceEndpoint = 31,
CharsetNotSupported = 32,
}
-- configuration parameters parser
......@@ -188,6 +192,8 @@ return function(...)
auditfifolimit = 1000000,
auditapplication = "OPENBUS",
auditinstance = "",
nativecharset = "",
}
log:level(Configs.loglevel)
......@@ -296,6 +302,8 @@ Options:
-auditapplication <name> identificao do cdigo da soluo no servio de auditoria
-auditinstance <name> identificao da instncia do barramento no servio de auditoria
-nativecharset <name> codificao dos caracteres usada quando um sistema solicita a converso automtica
-configs <path> arquivo de configuraes adicionais do barramento
-help exibe essa mensagem e encerra a execuo
......@@ -690,12 +698,30 @@ Options:
end
end
end
-- validate charsets supported
Configs.nativecharset = Configs.nativecharset:lower()
local nativecharset = Configs.nativecharset
if nativecharset ~= "" then
if not CORBACharsets[nativecharset] then
local list = {}
for name in pairs(CORBACharsets) do
if type(name) == "string" then
list[#list+1] = name
end
end
log:misconfig(msg.CharsetNotSupported:tag{supported=list, parameter=nativecharset})
return errcode.CharsetNotSupported
else
log:config(msg.NativeCharsetCodeSetConfigured:tag{charset=nativecharset})
end
end
-- build orb instance
local orb = initorb{
host = Configs.host,
port = getoptcfg(Configs, "port", 0),
sslport = getoptcfg(Configs, "sslport", 0),
maxchannels = getoptcfg(Configs, "maxchannels", 0),
charset = getoptcfg(Configs, "nativecharset", ""),
flavor = orbflv,
options = orbopt,
objrefaddr = objrefaddr,
......
......@@ -49,6 +49,7 @@ LIBS:= \
luacothread \
luaidl \
oil \
luaiconv \
luavararg \
lfs \
luuid \
......@@ -66,6 +67,7 @@ INCLUDES+= . $(SRCLUADIR) \
$(LUACOTHREAD_HOME)/obj/$(TEC_UNAME) \
$(LUAIDL_HOME)/obj/$(TEC_UNAME) \
$(OIL_HOME)/obj/$(TEC_UNAME) \
$(LUAICONV_HOME)/include \
$(LUAVARARG_HOME)/src \
$(LUAFILESYSTEM_HOME)/include \
$(LUUID_HOME)/include \
......@@ -84,6 +86,7 @@ LDIR+= \
$(LUACOTHREAD_HOME)/lib/$(TEC_UNAME) \
$(LUAIDL_HOME)/lib/$(TEC_UNAME) \
$(OIL_HOME)/lib/$(TEC_UNAME) \
$(LUAICONV_HOME)/lib/$(TEC_UNAME) \
$(LUAVARARG_HOME)/lib/$(TEC_UNAME) \
$(LUAFILESYSTEM_HOME)/lib/$(TEC_UNAME) \
$(LUUID_HOME)/lib/$(TEC_UNAME) \
......
......@@ -58,6 +58,7 @@ LIBS:= \
luacothread \
luaidl \
oil \
luaiconv \
luavararg \
lfs \
luuid \
......@@ -76,6 +77,7 @@ INCLUDES+= . \
$(LUACOTHREAD_HOME)/obj/$(TEC_UNAME) \
$(LUAIDL_HOME)/obj/$(TEC_UNAME) \
$(OIL_HOME)/obj/$(TEC_UNAME) \
$(LUAICONV_HOME)/include \
$(LUAVARARG_HOME)/src \
$(LUAFILESYSTEM_HOME)/include \
$(LUUID_HOME)/include \
......@@ -95,6 +97,7 @@ LDIR+= \
$(LUACOTHREAD_HOME)/lib/$(TEC_UNAME) \
$(LUAIDL_HOME)/lib/$(TEC_UNAME) \
$(OIL_HOME)/lib/$(TEC_UNAME) \
$(LUAICONV_HOME)/lib/$(TEC_UNAME) \
$(LUAVARARG_HOME)/lib/$(TEC_UNAME) \
$(LUAFILESYSTEM_HOME)/lib/$(TEC_UNAME) \
$(LUUID_HOME)/lib/$(TEC_UNAME) \
......
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