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

 - adequações no build do busadmin e busservices para linkar com luaiconv

(cherry picked from commit cc40bcc2)
parent 69a921f6
......@@ -34,6 +34,9 @@ local running = cothread.running
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
......@@ -84,6 +87,7 @@ return function(...)
WrongAlternateAddress = 18,
InvalidMaximumCacheSize = 19,
InvalidOrbCallsTimeout = 20,
CharsetNotSupported = 21,
}
local reloadConfigs = {
......@@ -123,6 +127,8 @@ return function(...)
nodnslookup = false,
noipaddress = false,
alternateaddr = {},
nativecharset = "",
}
for k, v in pairs(reloadConfigs) do
defConfigs[k] = v
......@@ -298,6 +304,8 @@ Options:
-noipaddress desativa o uso de endereos IP para compor as referncias IOR
-alternateaddr <address> endereo de rede (host:port) alternativo para compor as referncias IOR
-nativecharset <name> codificao dos caracteres usada quando um sistema solicita a converso automtica
-configs <path> arquivo de configuraes adicionais do barramento
]])
......@@ -501,6 +509,24 @@ Options:
orbcfg.objrefaddr = objrefaddr
log:config(msg.AdditionalInternetAddressConfiguration:tag(orbcfg.objrefaddr))
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
orbcfg.charset = Configs.nativecharset
-- setup bus access
local orb = access.initORB(orbcfg)
......
......@@ -44,6 +44,7 @@ LIBS:= \
luacothread \
luaidl \
oil \
luaiconv \
luavararg \
lfs \
luuid \
......@@ -65,6 +66,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 \
......@@ -81,6 +83,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) \
......
......@@ -53,6 +53,7 @@ LIBS:= \
luacothread \
luaidl \
oil \
luaiconv \
luavararg \
lfs \
luuid \
......@@ -74,6 +75,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 \
......@@ -90,6 +92,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