summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-17 01:37:42 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-17 01:37:42 +0200
commitbbb826bdac54e3fec3426fe6d8e23790abbbc44f (patch)
treebb34465915176bd2b6568a9de94b96f4fea094ee /source4/scripting
parenta145d21de63a5cb2d347c1281ed437cab6a95569 (diff)
downloadsamba-bbb826bdac54e3fec3426fe6d8e23790abbbc44f.tar.gz
samba-bbb826bdac54e3fec3426fe6d8e23790abbbc44f.tar.bz2
samba-bbb826bdac54e3fec3426fe6d8e23790abbbc44f.zip
Add convenience function for getting at event context from ejs code.
(This used to be commit b659e83cd6b627dd0ae04064bccff7220a5bd1ce)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/ejs/ejsnet/net_ctx.c2
-rw-r--r--source4/scripting/ejs/smbcalls_auth.c2
-rw-r--r--source4/scripting/ejs/smbcalls_nbt.c2
-rw-r--r--source4/scripting/ejs/smbcalls_rpc.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/source4/scripting/ejs/ejsnet/net_ctx.c b/source4/scripting/ejs/ejsnet/net_ctx.c
index 99be1c4ef8..cbe163552e 100644
--- a/source4/scripting/ejs/ejsnet/net_ctx.c
+++ b/source4/scripting/ejs/ejsnet/net_ctx.c
@@ -50,7 +50,7 @@ static int ejs_net_context(MprVarHandle eid, int argc, struct MprVar **argv)
ejsSetErrorMsg(eid, "talloc_new() failed");
return -1;
}
- ev = event_context_find(event_mem_ctx);
+ ev = mprEventCtx();
ctx = libnet_context_init(ev, mprLpCtx());
/* IF we generated a new event context, it will be under here,
diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c
index 908a009159..8e464a5021 100644
--- a/source4/scripting/ejs/smbcalls_auth.c
+++ b/source4/scripting/ejs/smbcalls_auth.c
@@ -55,7 +55,7 @@ static int ejs_doauth(MprVarHandle eid,
msg = c->msg_ctx;
} else {
/* Hope we can find the event context somewhere up there... */
- ev = event_context_find(tmp_ctx);
+ ev = mprEventCtx();
msg = messaging_client_init(tmp_ctx, lp_messaging_path(tmp_ctx, mprLpCtx()),
lp_iconv_convenience(mprLpCtx()), ev);
}
diff --git a/source4/scripting/ejs/smbcalls_nbt.c b/source4/scripting/ejs/smbcalls_nbt.c
index 67a85414ca..8c555bf821 100644
--- a/source4/scripting/ejs/smbcalls_nbt.c
+++ b/source4/scripting/ejs/smbcalls_nbt.c
@@ -70,7 +70,7 @@ static int ejs_resolve_name(MprVarHandle eid, int argc, struct MprVar **argv)
result = 0;
- nt_status = resolve_name(lp_resolve_context(mprLpCtx()), &name, tmp_ctx, &reply_addr, event_context_find(tmp_ctx));
+ nt_status = resolve_name(lp_resolve_context(mprLpCtx()), &name, tmp_ctx, &reply_addr, mprEventCtx());
if (NT_STATUS_IS_OK(nt_status)) {
mprSetPropertyValue(argv[0], "value", mprString(reply_addr));
diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c
index d1e49b4348..94774d708b 100644
--- a/source4/scripting/ejs/smbcalls_rpc.c
+++ b/source4/scripting/ejs/smbcalls_rpc.c
@@ -73,7 +73,7 @@ static int ejs_irpc_connect(MprVarHandle eid, int argc, char **argv)
p->server_name = argv[0];
- ev = event_context_find(p);
+ ev = mprEventCtx();
/* create a messaging context, looping as we have no way to
allocate temporary server ids automatically */
@@ -158,7 +158,7 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv)
cli_credentials_set_anonymous(creds);
}
- ev = event_context_find(mprMemCtx());
+ ev = mprEventCtx();
status = dcerpc_pipe_connect(this, &p, binding, iface, creds, ev,
mprLpCtx());