From 09e00bbdc18741c20f2eeba83da742f056115789 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 29 May 2005 12:41:59 +0000 Subject: r7078: - fix an uninitialised variable in smbscript - fixed handle passing in the smb/ejs interface calls, so they can be called safely from esp (This used to be commit 45ea1b64413de577366939b2106f657f6c47b1bd) --- source4/scripting/ejs/smbcalls.c | 8 ++++---- source4/scripting/ejs/smbscript.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/scripting/ejs/smbcalls.c b/source4/scripting/ejs/smbcalls.c index 664bb74df3..e436fc78df 100644 --- a/source4/scripting/ejs/smbcalls.c +++ b/source4/scripting/ejs/smbcalls.c @@ -252,8 +252,8 @@ failed: */ void smb_setup_ejs_functions(void) { - ejsDefineStringCFunction(-1, "lpGet", ejs_lpGet, NULL, 0); - ejsDefineStringCFunction(-1, "lpServices", ejs_lpServices, NULL, 0); - ejsDefineCFunction(-1, "typeof", ejs_typeof, NULL, 0); - ejsDefineCFunction(-1, "ldbSearch", ejs_ldbSearch, NULL, 0); + ejsDefineStringCFunction(-1, "lpGet", ejs_lpGet, NULL, MPR_VAR_SCRIPT_HANDLE); + ejsDefineStringCFunction(-1, "lpServices", ejs_lpServices, NULL, MPR_VAR_SCRIPT_HANDLE); + ejsDefineCFunction(-1, "typeof", ejs_typeof, NULL, MPR_VAR_SCRIPT_HANDLE); + ejsDefineCFunction(-1, "ldbSearch", ejs_ldbSearch, NULL, MPR_VAR_SCRIPT_HANDLE); } diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c index 3378885147..021dafa4ae 100644 --- a/source4/scripting/ejs/smbscript.c +++ b/source4/scripting/ejs/smbscript.c @@ -33,7 +33,7 @@ void ejs_exception(const char *reason) int main(int argc, const char *argv[]) { EjsId eid; - EjsHandle handle; + EjsHandle handle = 0; MprVar result; char *emsg; TALLOC_CTX *mem_ctx = talloc_new(NULL); -- cgit