summaryrefslogtreecommitdiff
path: root/source4/lib/appweb/mpr
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-21 18:21:44 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-21 18:21:44 +0100
commite11c61bc5cd487dce06fc38bb0ee8c4e24b04e8c (patch)
tree5e7dd6c56c9886c4f8530faf92293d4a22684215 /source4/lib/appweb/mpr
parent3c20b3eebafe46127a7b69cca573c6a128f8de89 (diff)
downloadsamba-e11c61bc5cd487dce06fc38bb0ee8c4e24b04e8c.tar.gz
samba-e11c61bc5cd487dce06fc38bb0ee8c4e24b04e8c.tar.bz2
samba-e11c61bc5cd487dce06fc38bb0ee8c4e24b04e8c.zip
Introduce mprLpCtx() similar to mprMemCtx() for loadparm_context used by
all EJS code. (This used to be commit 184988866fe8e740f58e3683eefcaa70f8b51d11)
Diffstat (limited to 'source4/lib/appweb/mpr')
-rw-r--r--source4/lib/appweb/mpr/miniMpr.c7
-rw-r--r--source4/lib/appweb/mpr/miniMpr.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/appweb/mpr/miniMpr.c b/source4/lib/appweb/mpr/miniMpr.c
index 949d64fcf1..52b23608aa 100644
--- a/source4/lib/appweb/mpr/miniMpr.c
+++ b/source4/lib/appweb/mpr/miniMpr.c
@@ -30,6 +30,7 @@
*/
#include "miniMpr.h"
+#include "param/param.h"
/************************************ Code ************************************/
#if !BLD_APPWEB
@@ -49,6 +50,12 @@ void *mprMemCtx(void)
return mpr_ctx;
}
+/* return the loadparm context being used for all ejs variables */
+struct loadparm_context *mprLpCtx(void)
+{
+ return global_loadparm;
+}
+
void mprFree(void *ptr)
{
talloc_free(ptr);
diff --git a/source4/lib/appweb/mpr/miniMpr.h b/source4/lib/appweb/mpr/miniMpr.h
index 836fdab9f2..15ce30c8df 100644
--- a/source4/lib/appweb/mpr/miniMpr.h
+++ b/source4/lib/appweb/mpr/miniMpr.h
@@ -272,6 +272,8 @@ extern int mprMemcpy(char *dest, int destMax, const char *src, int nbytes);
extern void mprSetCtx(void *ctx);
extern void *mprMemCtx(void);
+struct loadparm_context;
+extern struct loadparm_context *mprLpCtx(void);
/* This function needs to be provided by anyone using ejs */
void ejs_exception(const char *reason);