diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-05-30 13:20:19 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-05-30 20:51:51 +0200 |
commit | e697253263f9c5138f71574c8f35d1e5e7d957a5 (patch) | |
tree | 96f332a88baf71b12334edcba8158e35bc7d9bd3 /source3/libsmb | |
parent | 633060f025c99c0077abb58065bf76a4f8a59f0b (diff) | |
download | samba-e697253263f9c5138f71574c8f35d1e5e7d957a5.tar.gz samba-e697253263f9c5138f71574c8f35d1e5e7d957a5.tar.bz2 samba-e697253263f9c5138f71574c8f35d1e5e7d957a5.zip |
s3:libsmb: use nb_connect_send() directly instead of doing a 0 timer for port 139
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 30 20:51:51 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/smbsock_connect.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/libsmb/smbsock_connect.c b/source3/libsmb/smbsock_connect.c index d9d3b92c0e..c5fd2c8431 100644 --- a/source3/libsmb/smbsock_connect.c +++ b/source3/libsmb/smbsock_connect.c @@ -330,7 +330,7 @@ struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx, const char *calling_name, int calling_type) { - struct tevent_req *req, *subreq; + struct tevent_req *req; struct smbsock_connect_state *state; req = tevent_req_create(mem_ctx, &state, struct smbsock_connect_state); @@ -352,11 +352,16 @@ struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx, talloc_set_destructor(state, smbsock_connect_state_destructor); if (port == NBT_SMB_PORT) { - subreq = tevent_wakeup_send(state, ev, timeval_set(0, 0)); - if (tevent_req_nomem(subreq, req)) { + state->req_139 = nb_connect_send(state, state->ev, state->addr, + state->called_name, + state->called_type, + state->calling_name, + state->calling_type); + if (tevent_req_nomem(state->req_139, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, smbsock_connect_do_139, req); + tevent_req_set_callback( + state->req_139, smbsock_connect_connected, req); return req; } if (port != 0) { |