svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_conf.c
| From: | Jérôme Loyet | Date: | Sat, 08 May 2010 08:52:32 +0000 |
| Subject: | svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_conf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62586@lists.php.net to get a copy of this message | ||
fat Sat, 08 May 2010 08:52:32 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=299141
Log:
Fix #51736, wrong checks on dynamic parameters
Bug: http://bugs.php.net/51736 (Assigned) configuration
parsing problem
Changed paths:
U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c
Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c
===================================================================
--- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-05-08 06:40:45 UTC (rev 299140)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-05-08 08:52:32 UTC (rev 299141)
@@ -441,25 +441,26 @@
return -1;
}
- if (config->pm_max_spare_servers > config->pm_max_children ||
+ if (config->pm_min_spare_servers > config->pm_max_children ||
config->pm_max_spare_servers > config->pm_max_children) {
zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] min_spare_servers(%d) and max_spare_servers(%d)
cannot be greater than max_children(%d)",
- wp->config->name, config->pm_max_spare_servers, config->pm_max_spare_servers,
config->pm_max_children);
+ wp->config->name, config->pm_min_spare_servers, config->pm_max_spare_servers,
config->pm_max_children);
return -1;
}
- if (config->pm_max_spare_servers < config->pm_max_spare_servers) {
- zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] max_spare_servers(%d) must not be less than
min_spare_servers(%d)", wp->config->name, config->pm_max_spare_servers,
config->pm_max_spare_servers);
+ if (config->pm_max_spare_servers < config->pm_min_spare_servers) {
+ zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] max_spare_servers(%d) must not be less than
min_spare_servers(%d)", wp->config->name, config->pm_max_spare_servers,
config->pm_min_spare_servers);
return -1;
}
if (config->pm_start_servers <= 0) {
config->pm_start_servers = config->pm_min_spare_servers +
((config->pm_max_spare_servers - config->pm_min_spare_servers) / 2);
zlog(ZLOG_STUFF, ZLOG_WARNING, "[pool %s] start_servers is not set. It's been set to
%d.", wp->config->name, config->pm_start_servers);
- } else if (config->pm_start_servers < config->pm_max_spare_servers ||
config->pm_start_servers > config->pm_max_spare_servers) {
- zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than
min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name,
config->pm_start_servers, config->pm_max_spare_servers, config->pm_max_spare_servers);
+ } else if (config->pm_start_servers < config->pm_min_spare_servers ||
config->pm_start_servers > config->pm_max_spare_servers) {
+ zlog(ZLOG_STUFF, ZLOG_ALERT, "[pool %s] start_servers(%d) must not be less than
min_spare_servers(%d) and not greater than max_spare_servers(%d)", wp->config->name,
config->pm_start_servers, config->pm_min_spare_servers, config->pm_max_spare_servers);
return -1;
}
+
}