diff --git a/include/RequestManager.h b/include/RequestManager.h index ae26a3b7a9..808d02a150 100644 --- a/include/RequestManager.h +++ b/include/RequestManager.h @@ -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(){}; diff --git a/src/nebula/Nebula.cc b/src/nebula/Nebula.cc index 89169978e4..6d7eb3d487 100644 --- a/src/nebula/Nebula.cc +++ b/src/nebula/Nebula.cc @@ -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&) { diff --git a/src/rm/RequestManager.cc b/src/rm/RequestManager.cc index 49d9cb5f27..793c3620de 100644 --- a/src/rm/RequestManager.cc +++ b/src/rm/RequestManager.cc @@ -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); };