diff -urNbp nginx-mogilefs-module-master/ngx_http_mogilefs_module.c nginx-mogilefs-module/ngx_http_mogilefs_module.c --- nginx-mogilefs-module-master/ngx_http_mogilefs_module.c 2012-10-14 21:52:03.000000000 +0600 +++ nginx-mogilefs-module/ngx_http_mogilefs_module.c 2017-07-12 08:36:46.685944104 +0500 @@ -316,9 +316,6 @@ ngx_http_mogilefs_handler(ngx_http_reque u->peer.log = r->connection->log; u->peer.log_error = NGX_ERROR_ERR; -#if (NGX_THREADS) - u->peer.lock = &r->connection->lock; -#endif u->output.tag = (ngx_buf_tag_t) &ngx_http_mogilefs_module; @@ -745,7 +742,10 @@ ngx_http_mogilefs_create_request(ngx_htt ngx_buf_t *b; ngx_chain_t *cl; ngx_http_mogilefs_loc_conf_t *mgcf; - ngx_str_t request, domain; +#if (NGX_DEBUG) + ngx_str_t request; +#endif + ngx_str_t domain; ngx_http_mogilefs_ctx_t *ctx; ngx_http_mogilefs_aux_param_t *a; ngx_uint_t i; @@ -872,11 +872,13 @@ ngx_http_mogilefs_create_request(ngx_htt } } +#if (NGX_DEBUG) request.data = b->pos; request.len = b->last - b->pos; ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "mogilefs request: \"%V\"", &request); +#endif *b->last++ = CR; *b->last++ = LF; @@ -1538,7 +1540,7 @@ ngx_http_mogilefs_create_spare_location( ngx_uint_t i; ngx_http_module_t *module; void *mconf; - ngx_http_core_loc_conf_t *clcf, *pclcf, *rclcf; + ngx_http_core_loc_conf_t *clcf, *rclcf; ngx_http_core_srv_conf_t *cscf; ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t)); @@ -1573,8 +1575,6 @@ ngx_http_mogilefs_create_spare_location( } } - pclcf = pctx->loc_conf[ngx_http_core_module.ctx_index]; - clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; mgcf = ctx->loc_conf[ngx_http_mogilefs_module.ctx_index];