From 058de59a8e197f6bd9de95dd5de709f018cce6d1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 22 Jan 2011 16:22:42 +0100 Subject: s3: Fix connecting to port-139 only servers When the TCP RST came before the 5 msecs timeout kicked in, we viewed this as final, as state->req_139 was not set yet. Autobuild-User: Volker Lendecke Autobuild-Date: Sat Jan 22 17:42:41 CET 2011 on sn-devel-104 --- source3/libsmb/smbsock_connect.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/smbsock_connect.c b/source3/libsmb/smbsock_connect.c index 174d2aae57..352de85fd2 100644 --- a/source3/libsmb/smbsock_connect.c +++ b/source3/libsmb/smbsock_connect.c @@ -253,12 +253,14 @@ struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx, /* * After 5 msecs, fire the 139 request */ - subreq = tevent_wakeup_send(state, ev, timeval_current_ofs(0, 5000)); - if (tevent_req_nomem(subreq, req)) { + state->req_139 = tevent_wakeup_send( + state, ev, timeval_current_ofs(0, 5000)); + if (tevent_req_nomem(state->req_139, req)) { TALLOC_FREE(state->req_445); 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_do_139, + req); return req; } -- cgit