Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix errorneous 'rails_app_spawner_idle_time directive is duplicate' p…

…roblems on 64-bit platforms.
  • Loading branch information...
commit b47593d149d6c44f547aa375da87e17d607a635d 1 parent 0e2c981
@FooBarWidget FooBarWidget authored
View
2  NEWS
@@ -24,6 +24,8 @@ Release 2.2.6
also be passed to the installer through the --apxs-path and
--apr-config-path parameters, in addition to the $APXS2 and $APR_CONFIG
environment variables. Issue #3.
+ * [Nginx] Fixed errorneous 'rails_app_spawner_idle_time directive is
+ duplicate' problems on 64-bit platforms.
Release 2.2.5
View
12 ext/nginx/Configuration.c
@@ -153,8 +153,8 @@ passenger_create_loc_conf(ngx_conf_t *cf)
conf->spawn_method.data = NULL;
conf->spawn_method.len = 0;
conf->base_uris = NGX_CONF_UNSET_PTR;
- conf->framework_spawner_idle_time = -1;
- conf->app_spawner_idle_time = -1;
+ conf->framework_spawner_idle_time = NGX_CONF_UNSET;
+ conf->app_spawner_idle_time = NGX_CONF_UNSET;
conf->upstream.store = NGX_CONF_UNSET;
conf->upstream.store_access = NGX_CONF_UNSET_UINT;
@@ -232,12 +232,8 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->use_global_queue, prev->use_global_queue, 0);
ngx_conf_merge_str_value(conf->environment, prev->environment, "production");
ngx_conf_merge_str_value(conf->spawn_method, prev->spawn_method, "smart-lv2");
- if (conf->framework_spawner_idle_time == -1 && prev->framework_spawner_idle_time != -1) {
- conf->framework_spawner_idle_time = prev->framework_spawner_idle_time;
- }
- if (conf->app_spawner_idle_time == -1 && prev->app_spawner_idle_time != -1) {
- conf->app_spawner_idle_time = prev->app_spawner_idle_time;
- }
+ ngx_conf_merge_value(conf->framework_spawner_idle_time, prev->framework_spawner_idle_time, (ngx_int_t) -1);
+ ngx_conf_merge_value(conf->app_spawner_idle_time, prev->app_spawner_idle_time, (ngx_int_t) -1);
if (prev->base_uris != NGX_CONF_UNSET_PTR) {
if (conf->base_uris == NGX_CONF_UNSET_PTR) {
View
4 ext/nginx/Configuration.h
@@ -43,8 +43,8 @@ typedef struct {
ngx_flag_t use_global_queue;
ngx_str_t environment;
ngx_str_t spawn_method;
- int framework_spawner_idle_time;
- int app_spawner_idle_time;
+ ngx_int_t framework_spawner_idle_time;
+ ngx_int_t app_spawner_idle_time;
ngx_array_t *base_uris;
} passenger_loc_conf_t;
View
8 ext/nginx/ContentHandler.c
@@ -325,14 +325,18 @@ create_request(ngx_http_request_t *r)
end = ngx_snprintf(framework_spawner_idle_time_string,
sizeof(framework_spawner_idle_time_string) - 1,
- "%d", slcf->framework_spawner_idle_time);
+ "%d",
+ (slcf->framework_spawner_idle_time == (ngx_int_t) -1) ?
+ -1 : slcf->framework_spawner_idle_time);
*end = '\0';
len += sizeof("PASSENGER_FRAMEWORK_SPAWNER_IDLE_TIME") +
ngx_strlen(framework_spawner_idle_time_string) + 1;
end = ngx_snprintf(app_spawner_idle_time_string,
sizeof(app_spawner_idle_time_string) - 1,
- "%d", slcf->app_spawner_idle_time);
+ "%d",
+ (slcf->app_spawner_idle_time == (ngx_int_t) -1) ?
+ -1 : slcf->app_spawner_idle_time);
*end = '\0';
len += sizeof("PASSENGER_APP_SPAWNER_IDLE_TIME") +
ngx_strlen(app_spawner_idle_time_string) + 1;
Please sign in to comment.
Something went wrong with that request. Please try again.