Add convenience function for getting at event context from ejs code.
[kai/samba-autobuild/.git] / source4 / lib / appweb / mpr / miniMpr.c
index 52b23608aa7e403846355e4be88c67c2b747f35b..381815eb231a9c83cdabdc73def1d6c7bbf3bcc4 100644 (file)
@@ -31,6 +31,7 @@
 
 #include       "miniMpr.h"
 #include "param/param.h"
+#include "lib/events/events.h"
 
 /************************************ Code ************************************/
 #if !BLD_APPWEB
@@ -50,6 +51,11 @@ void *mprMemCtx(void)
        return mpr_ctx;
 }
 
+struct event_context *mprEventCtx(void)
+{
+       return event_context_find(mprMemCtx());
+}
+
 /* return the loadparm context being used for all ejs variables */
 struct loadparm_context *mprLpCtx(void)
 {