Add configuration capabilities for persistent connections.

This commit is contained in:
counterpoint
2015-06-02 15:44:57 +01:00
parent 739ea82e36
commit 1a76fc141d
6 changed files with 82 additions and 33 deletions

View File

@ -619,6 +619,7 @@ hashtable_memory_fns(monitorhash,strdup,NULL,free,NULL);
}
else if (!strcmp(type, "server"))
{
SERVER *server = obj->element;
char *address;
char *port;
char *protocol;
@ -631,6 +632,8 @@ hashtable_memory_fns(monitorhash,strdup,NULL,free,NULL);
monuser = config_get_value(obj->parameters,
"monitoruser");
monpw = config_get_value(obj->parameters, "monitorpw");
server->persistpoolmax = config_get_value(obj->parameters, "persistpoolmax");
server->persistmaxtime = config_get_value(obj->parameters, "persistmaxtime");
if (address && port && protocol)
{
@ -677,6 +680,10 @@ hashtable_memory_fns(monitorhash,strdup,NULL,free,NULL);
"monitorpw")
&& strcmp(params->name,
"type")
&& strcmp(params->name,
"persistpoolmax")
&& strcmp(params->name,
"persistmaxtime")
)
{
serverAddParameter(obj->element,