Module: kamailio
Branch: master
Commit: 4ed2449454d07594f9bc30622b7fada9d719c5a3
URL: 
https://github.com/kamailio/kamailio/commit/4ed2449454d07594f9bc30622b7fada9d719c5a3

Author: ngash <nick.g...@ccprosolutions.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-05-06T13:33:50+02:00

app_jsdt: Added dynamic buffer sizing to load bigger .js files and Added 
ability to load all JavaScript files from a specified directory

- 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 seperate .js files but load them all 
inbto the JavaScript engine.
- Updated documentation accordinglyapp_jsdt: Added dynamic buffer sizing to 
load bigger .js files and Added ability to load all JavaScript files from a 
specified directory

- 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 seperate .js files but load them all 
inbto the JavaScript engine.
- Updated documentation accordingly

---

Modified: src/modules/app_jsdt/app_jsdt_api.c
Modified: src/modules/app_jsdt/app_jsdt_mod.c
Modified: src/modules/app_jsdt/doc/app_jsdt_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/4ed2449454d07594f9bc30622b7fada9d719c5a3.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4ed2449454d07594f9bc30622b7fada9d719c5a3.patch

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to