libsmbclient/smbc_opendir problem with large directories.

Dave Daugherty dave.daugherty at centrify.com
Mon Jun 12 17:06:06 GMT 2006


On Monday, June 12, 2006 5:51 AM Henrik Zagerholm Wrote:


> Hi Samba team,
>
> I'm currently coding some C++ wrapper functions around libsmbclient.c.
>
> I experience really weird results when dealing with directories with
many dir
> entries ( With my setup/hardware around 2000+ )
>
> smbc_opendir returns a valid smbc_file but the dir entries are not
complete
> (their names are truncated to one character)
>
> It seems to be a timeout problem because when I run my testprogram
against
> the same client the problem disappears as the files get  cached on the
client.
> After flushing the file cache on the client the problem returns.
>
> Is there a more controllable way of getting dir entries?
> Are there more timeout variables other than context->timeout that I
can
> manipulate?
>
> Setting context->timeout to high values seems to solve the problem
but is
> there a better way to handle this?
> (E.g reading only a part of the entries at a time)
>
> Increasing the timeout really isn't a viable solution as I can never
be sure
> how many dir entries a client has or the performance of its  hardware.

Are you sure that the files being returned are not in Unicode, but you
think they are in ASCII? That would explain just one character.

Dave Daugherty
Centrify Corp.


More information about the samba-technical mailing list