svn commit: samba r4757 - in branches/SAMBA_4_0/source: libcli/raw libcli/util librpc/rpc ntvfs/cifs torture

tridge at samba.org tridge at samba.org
Sat Jan 15 10:38:12 GMT 2005


Author: tridge
Date: 2005-01-15 10:38:12 +0000 (Sat, 15 Jan 2005)
New Revision: 4757

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4757

Log:
added the ability of the clisocket level of libcli to handle async
socket connections. This was complicated by a few factors:

 - it meant moving the event context from clitransport to clisocket,
   so lots of structures changed

 - we need to asynchronously handle connection to lists of port
   numbers, not just one port number. The code internally tries each
   port in the list in turn, without ever blocking

 - the man page on how connect() is supposed to work asynchronously
   doesn't work in practice (now why doesn't this surprise me?). The
   getsockopt() for SOL_ERROR is supposed to retrieve the error, but
   in fact the next (unrelated) connect() call on the same socket also
   gets an error, though not the right error. To work around this I
   need to tear down the whole socket between each attempted port. I
   hate posix.

Note that clisocket.c still does a blocking name resolution call in
smbcli_sock_connect_byname(). That will be fixed when we add the async
NBT resolution code.

Also note that I arranged things so that every SMB connection is now
async internally, so using plain smbclient or smbtorture tests all the
async features of this new code.

Modified:
   branches/SAMBA_4_0/source/libcli/raw/clisocket.c
   branches/SAMBA_4_0/source/libcli/raw/clitransport.c
   branches/SAMBA_4_0/source/libcli/raw/libcliraw.h
   branches/SAMBA_4_0/source/libcli/raw/rawrequest.c
   branches/SAMBA_4_0/source/libcli/util/errormap.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c
   branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
   branches/SAMBA_4_0/source/torture/torture.c


Changeset:
Sorry, the patch is too large (557 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4757


More information about the samba-cvs mailing list