Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-wsgi
[nivanova/samba-autobuild/.git] / source4 / scripting / ejs / smbcalls_rpc.c
index b95681d4ef319f6263bd1f92a21611335125a378..94774d708bbb0008a6d9ea650fe4d02e9d9e6676 100644 (file)
@@ -73,12 +73,16 @@ 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 */
        for (i=0;i<10000;i++) {
-               p->msg_ctx = messaging_init(p, cluster_id(EJS_ID_BASE + i), ev);
+               p->msg_ctx = messaging_init(p, 
+                                           lp_messaging_path(p, mprLpCtx()),
+                                           cluster_id(EJS_ID_BASE, i), 
+                                           lp_iconv_convenience(mprLpCtx()),
+                                           ev);
                if (p->msg_ctx) break;
        }
        if (p->msg_ctx == NULL) {
@@ -151,13 +155,13 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv)
        }
        if (creds == NULL) {
                creds = cli_credentials_init(mprMemCtx());
-               cli_credentials_guess(creds);
                cli_credentials_set_anonymous(creds);
        }
 
-       ev = event_context_find(mprMemCtx());
+       ev = mprEventCtx();
 
-       status = dcerpc_pipe_connect(this, &p, binding, iface, creds, ev);
+       status = dcerpc_pipe_connect(this, &p, binding, iface, creds, ev,
+                                    mprLpCtx());
        if (!NT_STATUS_IS_OK(status)) goto done;
 
        /* callers don't allocate ref vars in the ejs interface */