r7078: - fix an uninitialised variable in smbscript
authorAndrew Tridgell <tridge@samba.org>
Sun, 29 May 2005 12:41:59 +0000 (12:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:13 +0000 (13:17 -0500)
- fixed handle passing in the smb/ejs interface calls, so they can be called
  safely from esp

source/scripting/ejs/smbcalls.c
source/scripting/ejs/smbscript.c

index 664bb74df32d3c6403435252fa3baa45a220aa10..e436fc78dffc64f9b02e44f3c6d4c83e177338e7 100644 (file)
@@ -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);
 }
index 33788851475c755806b7195183bc03993ca9b02f..021dafa4aef5fd59b7d2a3acdd6b3be925701779 100644 (file)
@@ -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);