r7066: Rename http_exception to ejs_exception.
authorTim Potter <tpot@samba.org>
Sun, 29 May 2005 04:10:22 +0000 (04:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:11 +0000 (13:17 -0500)
(This used to be commit f2e59d3adfd7813c3c2090350f8ff2a99a5533e9)

source4/lib/ejs/miniMpr.c
source4/scripting/ejs/smbscript.c
source4/web_server/http.c

index 2c6f7bea501b0cf550d2ec4b2829d741ad110df8..2094052b3933b4afca98e0a73dee958e888ec29e 100644 (file)
@@ -163,7 +163,7 @@ void mprBreakpoint(const char *file, int line, const char *cond)
        char *buf;
        mprAllocSprintf(&buf, MPR_MAX_STRING, "esp exception - ASSERT at %s:%d, %s\n", 
                                        file, line, cond);
-       http_exception(buf);
+       ejs_exception(buf);
 }
 
 #endif /* !BLD_GOAHEAD_WEBSERVER */
index f1ff03ae49430780f9ea068e6628bcf1325dc31f..0b0a4468398fc4b522062bc525758edeccce1a1e 100644 (file)
@@ -23,7 +23,7 @@
 #include "includes.h"
 #include "lib/ejs/ejs.h"
 
-void http_exception(const char *reason)
+void ejs_exception(const char *reason)
 {
        fprintf(stderr, "smbscript exception: %s", reason);
        exit(1);
@@ -61,7 +61,7 @@ static int writeProc(MprVarHandle userHandle, int argc, char **argv)
                exit(1);
        }
 
-       if (ejsEvalScript(eid, "write(\"hello\n\");", &result, &emsg) == -1) {
+       if (ejsEvalFile(eid, (char *)argv[1], &result, &emsg) == -1) {
                fprintf(stderr, "smbscript: ejsEvalScript(): %s\n", emsg);
                exit(1);
        }
index a0729705970a976119863b3c5583fe13080ab467..df53eee4e9dac927a3ef087e63c7c6442fb3a309 100644 (file)
@@ -461,17 +461,17 @@ static void http_setup_arrays(struct esp_state *esp)
    report a internal server error via http
 */
 #include <setjmp.h>
-static jmp_buf http_exception_buf;
+static jmp_buf ejs_exception_buf;
 static const char *exception_reason;
 
-void http_exception(const char *reason)
+void ejs_exception(const char *reason)
 {
        exception_reason = reason;
        DEBUG(0,("%s", reason));
-       longjmp(http_exception_buf, -1);
+       longjmp(ejs_exception_buf, -1);
 }
 #else
-void http_exception(const char *reason)
+void ejs_exception(const char *reason)
 {
        DEBUG(0,("%s", reason));
        smb_panic(reason);
@@ -497,7 +497,7 @@ static void esp_request(struct esp_state *esp)
        }
 
 #if HAVE_SETJMP_H
-       if (setjmp(http_exception_buf) != 0) {
+       if (setjmp(ejs_exception_buf) != 0) {
                http_error(web, 500, exception_reason);
                return;
        }