[njs] Stream: linking ngx object to the module missed in d7f6e719af98.

Dmitry Volyntsev xeioex at nginx.com
Tue Nov 17 13:22:24 UTC 2020


details:   https://hg.nginx.org/njs/rev/24717ec294b8
branches:  
changeset: 1566:24717ec294b8
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue Nov 17 13:16:47 2020 +0000
description:
Stream: linking ngx object to the module missed in d7f6e719af98.

diffstat:

 nginx/ngx_stream_js_module.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r d7f6e719af98 -r 24717ec294b8 nginx/ngx_stream_js_module.c
--- a/nginx/ngx_stream_js_module.c	Fri Oct 02 18:38:12 2020 +0000
+++ b/nginx/ngx_stream_js_module.c	Tue Nov 17 13:16:47 2020 +0000
@@ -1457,6 +1457,12 @@ ngx_stream_js_init_main_conf(ngx_conf_t 
     }
 
     jmcf->proto = proto;
+
+    rc = ngx_js_core_init(jmcf->vm, cf->log);
+    if (njs_slow_path(rc != NJS_OK)) {
+        return NGX_CONF_ERROR;
+    }
+
     end = start + size;
 
     rc = njs_vm_compile(jmcf->vm, &start, end);


More information about the nginx-devel mailing list