Pre-Submission Checklist
Type Of Change
Checklist:
Description
- The code that loaded a JavaScript file used a fix buffer length of 128K on the stack. This has been changed so that the file size is determined and an attempt to allocate an appropriate buffer size temporarily is made. The file contents are then loaded into that buffer before being passed to the duktape engine.
- In addition a new module param 'loaddir' has been added that allows you to specify a directory containing .js files rather than specifying a single .js file to load with the existing 'load' param. If loaddir is set it will take a higher priority than load. All .js files in the directory are loaded into a temporary buffer and combined before passing to the duktape engine. This allows you to split logic/routes into separate .js files but load them all into the JavaScript engine.
- Updated documentation
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4221
Commit Summary
- fb55eb1 app_jstd: Added dynamic buffer sizing to load bigger .js files and Added ability to load all JavaScript files from a specified directory
File Changes
(3 files)
Patch Links:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4221@github.com>