Should fix bug 3835.
authorderrell <derrell@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Sun, 3 Sep 2006 00:50:34 +0000 (00:50 +0000)
committerderrell <derrell@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Sun, 3 Sep 2006 00:50:34 +0000 (00:50 +0000)
commit9ce119d50cdadef004d33f9670b77022dd7d33ab
tree0ef4a99d6acb02bf4bd8360bdf0c2062e6b81d88
parenta1311effba3728ffa664ad9c0b134951e6c6f675
Should fix bug 3835.

Jeremy: requires your eyes...

If the remote connection timed out while cli_list() was retrieving its list of
files, the error was not returned to the user, e.g. via smbc_opendir(), so the
user didn't have a way to know to set the timeout longer and try again.  This
problem would occur when a very large directory is being read with a too-small
timeout on the cli.

Jeremy, although there were a couple of areas that needed to be handled, I
needed to make one change that you should bless, in libsmb/clientgen.c.  It
was setting

  cli->smb_rw_error = smb_read_error;

but smb_read_error is zero, so this had no effect.  I'm now doing

  cli->smb_rw_error = READ_TIMEOUT;

instead, and according to the OP, these (cumulative) changes (in a slightly
different form) solve the problem.

Please confirm this smb_rw_error change will have no other adverse effects
that you can see.

Derrell

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_0@18011 0c0555d6-39d7-0310-84fc-f1cc0bd64818
examples/libsmbclient/Makefile
source/libsmb/clientgen.c
source/libsmb/clilist.c
source/libsmb/libsmbclient.c