﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
46	Can't compile on drive mounted by NetDrive/Samba	bart		"As described in :
http://bugs.ecomstation.nl/view.php?id=1008

Vitalli had a look at this and wrote:

Hi Bart,

the log shows that this is a problem in the smb client.
It can not receive listings which require 3 or more smb packets.
It is >200 files per directory.

Here is the excerpt from the log:

Client request 13 paramlen 1805 len 131072, reconnect 1. State 006ba1c0
Filelist <\blondeguy\cubic\tools\PVCS\*> on master <WORKGROUP> wgrp <>
server <littlebopeep> share <jfs> clidev <A:>
list_files level 2. mask <\cubic\tools\PVCS\echo..COM>
list_files 103 0 80889 1
received 103 entries (eos=0)
list_files 101 0 80889 0
Error: Looping in FIND_NEXT as name WORKSTN.INI has already been seen?
received 101 entries (eos=1)

Note the 'list_files level 2' which indicates an old server.
I've tested with a XP server (level 260) and the problem is not reproducible.

The bad code is in smbwrp.c:
static int list_files(struct cli_state *cli, const char *Mask, uint16
attribute,
void (*fn)(const char*, smbwrp_fileinfo *, const char *,
void *), void *state)

The following happens:
the client receives first part of the listing and then issues
a find_next request. The second part of the listing is also received
and in the log it is seen that EndOfListing is false: 'list_files 101 0'.
But then the client goes to the
Error: Looping in FIND_NEXT as name %s has already been seen?\n""
statement and ends the listing.

That is probably confuses the system and the hang occurs.

To fix the problem one have to reproduce it:
just try to list a directory with a lot of files (>300)
on a OS/2 share.

Then a bit more debugging is needed to find out why the client
receives the duplicate filename and how to deal with it: skip or what.

I believe Paul or Yuri can fix the problem. Ask them.

Best regards,
Vitali."	defect	closed	blocker	Netdrive plugin 1.0	Samba Client Plugin		fixed		
