diff --git a/src/scheduler/include/Client.h b/src/scheduler/include/Client.h index 4463180988..47bad049b0 100644 --- a/src/scheduler/include/Client.h +++ b/src/scheduler/include/Client.h @@ -62,6 +62,8 @@ public: { set_one_auth(secret); set_one_endpoint(endpoint); + + xmlrpc_limit_set(XMLRPC_XML_SIZE_LIMIT_ID, 1024*MESSAGE_SIZE); } const string& get_oneauth() @@ -92,6 +94,11 @@ private: int split_secret(const string secret, string& user, string& pass); string sha1_digest(const string& pass); + + /** + * Default message size for XML data off the network + */ + static const int MESSAGE_SIZE; }; #endif /*ONECLIENT_H_*/ diff --git a/src/scheduler/src/xml/Client.cc b/src/scheduler/src/xml/Client.cc index cc66accc0f..d893023ffd 100644 --- a/src/scheduler/src/xml/Client.cc +++ b/src/scheduler/src/xml/Client.cc @@ -32,6 +32,13 @@ #include #include +/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ + +const int Client::MESSAGE_SIZE = 51200; +// +/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ void Client::set_one_auth(string secret) { @@ -65,8 +72,8 @@ void Client::set_one_auth(string secret) } } - - +/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ int Client::read_oneauth(string &secret) { @@ -150,6 +157,9 @@ int Client::split_secret(const string secret, string& user, string& pass) return rc; } +/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ + string Client::sha1_digest(const string& pass) { EVP_MD_CTX mdctx; @@ -174,6 +184,9 @@ string Client::sha1_digest(const string& pass) return oss.str(); } +/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ + void Client::set_one_endpoint(string endpoint) { one_endpoint = "http://localhost:2633/RPC2";