Module: kamailio
Branch: master
Commit: 69ba64e26e3876ce84053a691dee2f2ad9bb6185
URL:
https://github.com/kamailio/kamailio/commit/69ba64e26e3876ce84053a691dee2f2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-02T12:06:20+02:00
core: support for loadmodule("path") and loadmodules("path")
---
Modified: src/core/cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/69ba64e26e3876ce84053a691dee2f2…
Patch:
https://github.com/kamailio/kamailio/commit/69ba64e26e3876ce84053a691dee2f2…
---
diff --git a/src/core/cfg.y b/src/core/cfg.y
index 19ba698f27..5ec1e0a1fb 100644
--- a/src/core/cfg.y
+++ b/src/core/cfg.y
@@ -2049,6 +2049,12 @@ module_stm:
yyerror("failed to load module");
}
}
+ | LOADMODULE LPAREN STRING RPAREN {
+ LM_DBG("loading module %s\n", $3);
+ if (load_module($3)!=0) {
+ yyerror("failed to load module");
+ }
+ }
| LOADMODULE error { yyerror("string expected"); }
| LOADMODULEX STRING {
LM_DBG("loading module %s\n", $2);
@@ -2056,6 +2062,12 @@ module_stm:
yyerror("failed to load module");
}
}
+ | LOADMODULEX LPAREN STRING RPAREN {
+ LM_DBG("loading module %s\n", $3);
+ if (load_modulex($3)!=0) {
+ yyerror("failed to load module");
+ }
+ }
| LOADMODULEX error { yyerror("string expected"); }
| LOADPATH STRING {
if(mods_dir_cmd==0) {