Skip to content

Commit

Permalink
Stream phases
Browse files Browse the repository at this point in the history
  • Loading branch information
hfm committed Oct 11, 2016
1 parent 83d4acd commit b3d8a0a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/stream/ngx_stream_mruby_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,18 @@ static ngx_int_t ngx_stream_mruby_init(ngx_conf_t *cf)
{
ngx_stream_core_main_conf_t *cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module);

#if (nginx_version < 1011005)
cmcf->access_handler = ngx_stream_mruby_handler;
#else
ngx_stream_handler_pt *h;

h = ngx_array_push(&cmcf->phases[NGX_STREAM_ACCESS_PHASE].handlers);
if (h == NULL) {
return NGX_ERROR;
}

*h = ngx_stream_mruby_handler;
#endif

return NGX_OK;
}

0 comments on commit b3d8a0a

Please sign in to comment.