@@ -20,7 +20,7 @@ struct Module;
2020
2121impl http:: HttpModule for Module {
2222 fn module ( ) -> & ' static ngx_module_t {
23- unsafe { & * :: core:: ptr:: addr_of!( ngx_http_async_module ) }
23+ unsafe { & * :: core:: ptr:: addr_of!( ngx_http_tokio_module ) }
2424 }
2525
2626 unsafe extern "C" fn postconfiguration ( cf : * mut ngx_conf_t ) -> ngx_int_t {
@@ -51,7 +51,7 @@ unsafe impl HttpModuleLocationConf for Module {
5151
5252static mut NGX_HTTP_ASYNC_COMMANDS : [ ngx_command_t ; 2 ] = [
5353 ngx_command_t {
54- name : ngx_string ! ( "async " ) ,
54+ name : ngx_string ! ( "tokio " ) ,
5555 type_ : ( NGX_HTTP_LOC_CONF | NGX_CONF_TAKE1 ) as ngx_uint_t ,
5656 set : Some ( ngx_http_async_commands_set_enable) ,
5757 conf : NGX_HTTP_LOC_CONF_OFFSET ,
@@ -75,12 +75,12 @@ static NGX_HTTP_ASYNC_MODULE_CTX: ngx_http_module_t = ngx_http_module_t {
7575// Generate the `ngx_modules` table with exported modules.
7676// This feature is required to build a 'cdylib' dynamic module outside of the NGINX buildsystem.
7777#[ cfg( feature = "export-modules" ) ]
78- ngx:: ngx_modules!( ngx_http_async_module ) ;
78+ ngx:: ngx_modules!( ngx_http_tokio_module ) ;
7979
8080#[ used]
8181#[ allow( non_upper_case_globals) ]
8282#[ cfg_attr( not( feature = "export-modules" ) , no_mangle) ]
83- pub static mut ngx_http_async_module : ngx_module_t = ngx_module_t {
83+ pub static mut ngx_http_tokio_module : ngx_module_t = ngx_module_t {
8484 ctx : std:: ptr:: addr_of!( NGX_HTTP_ASYNC_MODULE_CTX ) as _ ,
8585 commands : unsafe { & NGX_HTTP_ASYNC_COMMANDS [ 0 ] as * const _ as * mut _ } ,
8686 type_ : NGX_HTTP_MODULE as _ ,
@@ -149,7 +149,7 @@ http_request_handler!(async_access_handler, |request: &mut http::Request| {
149149 }
150150
151151 if let Some ( ctx) =
152- unsafe { request. get_module_ctx:: <RequestCTX >( & * addr_of!( ngx_http_async_module ) ) }
152+ unsafe { request. get_module_ctx:: <RequestCTX >( & * addr_of!( ngx_http_tokio_module ) ) }
153153 {
154154 if !ctx. done. load( Ordering :: Relaxed ) {
155155 return core:: Status :: NGX_AGAIN ;
@@ -162,7 +162,7 @@ http_request_handler!(async_access_handler, |request: &mut http::Request| {
162162 if ctx. is_null( ) {
163163 return core:: Status :: NGX_ERROR ;
164164 }
165- request. set_module_ctx( ctx. cast( ) , unsafe { & * addr_of!( ngx_http_async_module ) } ) ;
165+ request. set_module_ctx( ctx. cast( ) , unsafe { & * addr_of!( ngx_http_tokio_module ) } ) ;
166166
167167 let ctx = unsafe { & mut * ctx } ;
168168 ctx. event. handler = Some ( check_async_work_done) ;
0 commit comments