Module: kamailio
Branch: master
Commit: f95fda89d4532ba333aed835c72f102a7c032980
URL:
https://github.com/kamailio/kamailio/commit/f95fda89d4532ba333aed835c72f102…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-24T19:50:05+01:00
app_lua: count also the special function when generating the rpc response
---
Modified: src/modules/app_lua/app_lua_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f95fda89d4532ba333aed835c72f102…
Patch:
https://github.com/kamailio/kamailio/commit/f95fda89d4532ba333aed835c72f102…
---
diff --git a/src/modules/app_lua/app_lua_mod.c b/src/modules/app_lua/app_lua_mod.c
index b4a44fab70..ac536878c9 100644
--- a/src/modules/app_lua/app_lua_mod.c
+++ b/src/modules/app_lua/app_lua_mod.c
@@ -673,12 +673,17 @@ static void app_lua_rpc_api_list(rpc_t* rpc, void* ctx)
rpc->fault(ctx, 500, "Internal error root reply");
return;
}
+
+ /* count the number of exported functions */
n = 0;
for(i=0; i<SR_KEMI_LUA_EXPORT_SIZE; i++) {
ket = sr_kemi_lua_export_get(i);
if(ket==NULL) continue;
n++;
}
+ for(i=0; sr_kemi_app_lua_rpc_exports[i].fname.s!=NULL; i++) {
+ n++;
+ }
if(rpc->struct_add(th, "d[",
"msize", n,