The branch, v3-6-test has been updated via 4572b33 s3: Remove unused code via 60b2215 s3: Move setting the name_query timeout from e4f6038 No longer need to call SMB_VFS_LSTAT - check name hasn't changed above is sufficient.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log ----------------------------------------------------------------- commit 4572b3334f3a24facae6842087ac5cf649a6b0a2 Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 25 18:29:59 2011 +0200 s3: Remove unused code This is done in name_query_send these days Autobuild-User: Volker Lendecke <vlen...@samba.org> Autobuild-Date: Mon Apr 25 19:24:58 CEST 2011 on sn-devel-104 (cherry picked from commit 80c395aef44785497387d8c41eb767efa435bf3e) commit 60b221587baeb6ced2ef2bf0559802c3756b1c74 Author: Volker Lendecke <v...@samba.org> Date: Mon Apr 25 17:37:08 2011 +0200 s3: Move setting the name_query timeout An async caller might want a different timeout behaviour (cherry picked from commit a3d35ac44b53b8a79eac5c927ff771c1c6ceec12) ----------------------------------------------------------------------- Summary of changes: source3/libsmb/namequery.c | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index ef7aab6..752b4b1 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -1177,7 +1177,6 @@ struct tevent_req *name_query_send(TALLOC_CTX *mem_ctx, struct packet_struct p; struct nmb_packet *nmb = &p.packet.nmb; struct sockaddr_in *in_addr; - struct timeval timeout; req = tevent_req_create(mem_ctx, &state, struct name_query_state); if (req == NULL) { @@ -1243,14 +1242,6 @@ struct tevent_req *name_query_send(TALLOC_CTX *mem_ctx, DEBUG(10, ("nb_trans_send failed\n")); return tevent_req_post(req, ev); } - if (bcast) { - timeout = timeval_current_ofs(0, 250000); - } else { - timeout = timeval_current_ofs(2, 0); - } - if (!tevent_req_set_endtime(req, ev, timeout)) { - return tevent_req_post(req, ev); - } tevent_req_set_callback(subreq, name_query_done, req); return req; } @@ -1433,6 +1424,7 @@ NTSTATUS name_query(const char *name, int name_type, TALLOC_CTX *frame = talloc_stackframe(); struct tevent_context *ev; struct tevent_req *req; + struct timeval timeout; NTSTATUS status = NT_STATUS_NO_MEMORY; ev = tevent_context_init(frame); @@ -1443,6 +1435,14 @@ NTSTATUS name_query(const char *name, int name_type, if (req == NULL) { goto fail; } + if (bcast) { + timeout = timeval_current_ofs(0, 250000); + } else { + timeout = timeval_current_ofs(2, 0); + } + if (!tevent_req_set_endtime(req, ev, timeout)) { + goto fail; + } if (!tevent_req_poll_ntstatus(req, ev, &status)) { goto fail; } @@ -1494,7 +1494,6 @@ NTSTATUS name_resolve_bcast(const char *name, int i; int num_interfaces = iface_count(); struct sockaddr_storage *ss_list; - struct sockaddr_storage ss; NTSTATUS status = NT_STATUS_NOT_FOUND; if (lp_disable_netbios()) { @@ -1513,11 +1512,6 @@ NTSTATUS name_resolve_bcast(const char *name, DEBUG(3,("name_resolve_bcast: Attempting broadcast lookup " "for name %s<0x%x>\n", name, name_type)); - if (!interpret_string_addr(&ss, lp_socket_address(), - AI_NUMERICHOST|AI_PASSIVE)) { - zero_sockaddr(&ss); - } - /* * Lookup the name on all the interfaces, return on * the first successful match. -- Samba Shared Repository