diff options
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r-- | source4/scripting/ejs/smbcalls_config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/scripting/ejs/smbcalls_config.c b/source4/scripting/ejs/smbcalls_config.c index 7161ca49ad..8f1339db34 100644 --- a/source4/scripting/ejs/smbcalls_config.c +++ b/source4/scripting/ejs/smbcalls_config.c @@ -36,8 +36,8 @@ static int ejs_lpServices(MprVarHandle eid, int argc, char **argv) const char **list = NULL; if (argc != 0) return -1; - for (i=0;i<lp_numservices();i++) { - list = str_list_add(list, lp_servicename(lp_servicebynum(i))); + for (i=0;i<lp_numservices(global_loadparm);i++) { + list = str_list_add(list, lp_servicename(lp_servicebynum(global_loadparm, i))); } talloc_steal(mprMemCtx(), list); mpr_Return(eid, mprList("services", list)); @@ -89,7 +89,7 @@ static int ejs_lpGet(MprVarHandle eid, int argc, char **argv) if (argc == 2) { struct loadparm_service *service; /* its a share parameter */ - service = lp_service(argv[0]); + service = lp_service(global_loadparm, argv[0]); if (service == NULL) { mpr_Return(eid, mprCreateUndefinedVar()); return 0; |