mirror of
https://github.com/samba-team/samba.git
synced 2025-11-20 08:23:50 +03:00
r9702: r9680@blu: tridge | 2005-08-27 18:45:08 +1000
- fixed ncacn_ip_tcp to use the generic async name resolution methods, so NBT names now work (as requested several times by abartlet!) - changed resolve_name() to take an event_context, so it doesn't cause the whole process to block - cleaned up the talloc_find_parent_bytype() calls to go via a cleaner event_context_find() call
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
1cd62944f1
commit
b3d491b210
@@ -24,6 +24,7 @@
|
||||
#include "scripting/ejs/smbcalls.h"
|
||||
#include "lib/appweb/ejs/ejs.h"
|
||||
#include "librpc/gen_ndr/ndr_nbt.h"
|
||||
#include "lib/events/events.h"
|
||||
|
||||
/*
|
||||
look up a netbios name
|
||||
@@ -69,7 +70,7 @@ static int ejs_resolve_name(MprVarHandle eid, int argc, struct MprVar **argv)
|
||||
|
||||
result = 0;
|
||||
|
||||
nt_status = resolve_name(&name, tmp_ctx, &reply_addr);
|
||||
nt_status = resolve_name(&name, tmp_ctx, &reply_addr, event_context_find(tmp_ctx));
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
mprSetPropertyValue(argv[0], "value", mprString(reply_addr));
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "lib/messaging/irpc.h"
|
||||
#include "scripting/ejs/ejsrpc.h"
|
||||
#include "dlinklist.h"
|
||||
#include "lib/events/events.h"
|
||||
|
||||
/*
|
||||
state of a irpc 'connection'
|
||||
@@ -69,7 +70,7 @@ static int ejs_irpc_connect(MprVarHandle eid, int argc, char **argv)
|
||||
|
||||
p->server_name = argv[0];
|
||||
|
||||
ev = talloc_find_parent_bytype(mprMemCtx(), struct event_context);
|
||||
ev = event_context_find(p);
|
||||
|
||||
/* create a messaging context, looping as we have no way to
|
||||
allocate temporary server ids automatically */
|
||||
@@ -150,7 +151,7 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv)
|
||||
cli_credentials_set_anonymous(creds);
|
||||
}
|
||||
|
||||
ev = talloc_find_parent_bytype(mprMemCtx(), struct event_context);
|
||||
ev = event_context_find(mprMemCtx());
|
||||
|
||||
status = dcerpc_pipe_connect(this, &p, binding,
|
||||
iface->uuid, iface->if_version,
|
||||
|
||||
Reference in New Issue
Block a user