diff options
author | Derrell Lipman <derrell@samba.org> | 2006-09-03 00:50:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:39:48 -0500 |
commit | 40665edf5e6043ad5a8f46731a79ec1d5835b62a (patch) | |
tree | 269714d303f19434078233e8d25a5428348c7827 /examples/libsmbclient | |
parent | fea5d59b8411244b31df7980bdcdab9ed20dc712 (diff) | |
download | samba-40665edf5e6043ad5a8f46731a79ec1d5835b62a.tar.gz samba-40665edf5e6043ad5a8f46731a79ec1d5835b62a.tar.bz2 samba-40665edf5e6043ad5a8f46731a79ec1d5835b62a.zip |
r18011: 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
(This used to be commit fa664b24b829f973156486896575c1007b6d7b01)
Diffstat (limited to 'examples/libsmbclient')
-rw-r--r-- | examples/libsmbclient/Makefile | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile index a88f4a240c..11c3b77132 100644 --- a/examples/libsmbclient/Makefile +++ b/examples/libsmbclient/Makefile @@ -6,10 +6,12 @@ EXTLIB_INCL = -I/usr/include/gtk-1.2 \ -I/usr/include/glib-1.2 \ -I/usr/lib/glib/include + DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS = -O0 -g -I$(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS) LDFLAGS = -L/usr/local/samba/lib +LIBSMBCLIENT = /usr/local/samba/lib/libsmbclient.so TESTS= testsmbc \ tree \ @@ -26,43 +28,43 @@ all: $(TESTS) smbsh testsmbc: testsmbc.o @echo Linking testsmbc - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lsmbclient + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) tree: tree.o @echo Linking tree - @$(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ `gtk-config --libs` -lsmbclient $< + @$(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ `gtk-config --libs` $(LIBSMBCLIENT) $< testacl: testacl.o @echo Linking testacl - @$(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ `gtk-config --libs` -lsmbclient -lpopt $< + @$(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ `gtk-config --libs` $(LIBSMBCLIENT) -lpopt $< testbrowse: testbrowse.o @echo Linking testbrowse - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ -lsmbclient -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< testbrowse2: testbrowse2.o @echo Linking testbrowse2 - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ -lsmbclient -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< teststat: teststat.o @echo Linking teststat - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ /usr/local/samba/lib/libsmbclient.so -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< teststat2: teststat2.o @echo Linking teststat2 - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ /usr/local/samba/lib/libsmbclient.so -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< testchmod: testchmod.o @echo Linking testchmod - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ /usr/local/samba/lib/libsmbclient.so -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< testutime: testutime.o @echo Linking testutime - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ /usr/local/samba/lib/libsmbclient.so -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< testread: testread.o @echo Linking testread - @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ /usr/local/samba/lib/libsmbclient.so -lpopt $< + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LIBSMBCLIENT) -lpopt $< smbsh: make -C smbwrapper |