1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

feature #3594: set xmlrpc message size for server

This commit is contained in:
Javi Fontan 2015-02-20 15:10:57 +01:00
parent d0dc4f1524
commit 79cb05c7ca
3 changed files with 9 additions and 3 deletions

View File

@ -50,7 +50,8 @@ public:
int _keepalive_max_conn,
int _timeout,
const string _xml_log_file,
const string call_log_format);
const string call_log_format,
int message_size);
~RequestManager(){};

View File

@ -859,6 +859,7 @@ void Nebula::start(bool bootstrap_only)
bool rpc_log;
string log_call_format;
string rpc_filename = "";
int message_size;
nebula_configuration->get("PORT", rm_port);
nebula_configuration->get("MAX_CONN", max_conn);
@ -868,6 +869,7 @@ void Nebula::start(bool bootstrap_only)
nebula_configuration->get("TIMEOUT", timeout);
nebula_configuration->get("RPC_LOG", rpc_log);
nebula_configuration->get("LOG_CALL_FORMAT", log_call_format);
nebula_configuration->get("MESSAGE_SIZE", message_size);
if (rpc_log)
{
@ -876,7 +878,7 @@ void Nebula::start(bool bootstrap_only)
rm = new RequestManager(rm_port, max_conn, max_conn_backlog,
keepalive_timeout, keepalive_max_conn, timeout, rpc_filename,
log_call_format);
log_call_format, message_size);
}
catch (bad_alloc&)
{

View File

@ -63,7 +63,8 @@ RequestManager::RequestManager(
int _keepalive_max_conn,
int _timeout,
const string _xml_log_file,
const string call_log_format):
const string call_log_format,
int message_size):
port(_port),
socket_fd(-1),
max_conn(_max_conn),
@ -75,6 +76,8 @@ RequestManager::RequestManager(
{
Request::set_call_log_format(call_log_format);
xmlrpc_limit_set(XMLRPC_XML_SIZE_LIMIT_ID, message_size);
am.addListener(this);
};