From: Nozomi Anzai Date: Wed, 12 Oct 2011 07:38:33 +0000 (+0000) Subject: remove the parameter "pcp_timeout" and set default timeout seconds : 10s. X-Git-Tag: V3_1_1~10 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=9dcd2c5d60e0bb0996cd191e4bf52d7dc82b0cca;p=pgpooladmin.git remove the parameter "pcp_timeout" and set default timeout seconds : 10s. --- diff --git a/command.php b/command.php index f316bad..ce64a80 100644 --- a/command.php +++ b/command.php @@ -25,6 +25,10 @@ require_once('common.php'); +// timeout seconds +// (The parameter "pcp_timeout" existed till V3.0.) +define('PCP_TIMEOUT', 10); + /** * Execute pcp command * @@ -55,7 +59,7 @@ function execPcp($command, $num = '') $param = readPcpInfo(); $param['hostname'] = _PGPOOL2_PCP_HOSTNAME; - $args = " " . $param['pcp_timeout'] . + $args = " " . PCP_TIMEOUT. " " . $param['hostname'] . " " . $param['pcp_port'] . " ". $_SESSION[SESSION_LOGIN_USER] . @@ -163,7 +167,7 @@ function execPcp($command, $num = '') */ function readPcpInfo() { - $params = readConfigParams(array('pcp_port', 'pcp_timeout')); + $params = readConfigParams(array('pcp_port')); return $params; } ?> diff --git a/definePgpoolConfParam.php b/definePgpoolConfParam.php index b402910..51bff57 100644 --- a/definePgpoolConfParam.php +++ b/definePgpoolConfParam.php @@ -75,12 +75,6 @@ $pgpoolConfigParam[$key]['default'] = 9898; $pgpoolConfigParam[$key]['min'] = 1024; $pgpoolConfigParam[$key]['max'] = NUM_MAX; -$key = 'pcp_timeout'; -$pgpoolConfigParam[$key]['type'] = 'N'; -$pgpoolConfigParam[$key]['default'] = 10; -$pgpoolConfigParam[$key]['min'] = 0; -$pgpoolConfigParam[$key]['max'] = NUM_MAX; - $key = 'pcp_socket_dir'; $pgpoolConfigParam[$key]['type'] = 'C'; $pgpoolConfigParam[$key]['default'] = '/tmp'; diff --git a/templates/pgconfig.tpl b/templates/pgconfig.tpl index 270de8b..e487677 100644 --- a/templates/pgconfig.tpl +++ b/templates/pgconfig.tpl @@ -159,16 +159,6 @@ function cancelNode() { - {if $error.pcp_timeout != null} - -
pcp_timeout (integer) - {else} - -
pcp_timeout (integer) - {/if} - - - {if $error.pcp_socket_dir != null}
pcp_socket_dir (string) *