fix: function m.setvar not work in lua script

This commit is contained in:
jxm 2018-07-31 00:05:55 +08:00 committed by Victor Hora
parent c2bc695265
commit 45cdb0ed90

View File

@ -371,26 +371,32 @@ int Lua::setvar(lua_State *L) {
if (collection == "TX") {
t->m_collections.m_tx_collection->storeOrUpdateFirst(
"TX:" + variableName, "", var_value);
variableName,
var_value);
}
else if (collection == "IP") {
t->m_collections.m_ip_collection->storeOrUpdateFirst(
"IP:" + variableName, t->m_collections.m_ip_collection_key,
variableName, t->m_collections.m_ip_collection_key,
t->m_rules->m_secWebAppId.m_value,
var_value);
}
else if (collection == "GLOBAL") {
t->m_collections.m_global_collection->storeOrUpdateFirst(
"GLOBAL:" + variableName, t->m_collections.m_global_collection_key,
variableName, t->m_collections.m_global_collection_key,
t->m_rules->m_secWebAppId.m_value,
var_value);
}
else if (collection == "RESOURCE") {
t->m_collections.m_resource_collection->storeOrUpdateFirst(
"RESOURCE:" + variableName,
t->m_collections.m_resource_collection_key, var_value);
variableName,
t->m_collections.m_resource_collection_key,
t->m_rules->m_secWebAppId.m_value,
var_value);
}
else if (collection == "SESSION") {
t->m_collections.m_session_collection->storeOrUpdateFirst(
"SESSION:" + variableName, t->m_collections.m_session_collection_key,
variableName, t->m_collections.m_session_collection_key,
t->m_rules->m_secWebAppId.m_value,
var_value);
}