libsmbclient API for querying LMB?

Derrell.Lipman at UnwiredUniverse.com Derrell.Lipman at UnwiredUniverse.com
Tue Nov 11 02:58:03 GMT 2003


Richard Sharpe <rsharpe at richardsharpe.com> writes:

> On Mon, 10 Nov 2003 Derrell.Lipman at UnwiredUniverse.com wrote:
>
>> smbc_opendir() does all of the work on the LAN, and can take a looonnnnggggg
>> time if reading a large folder (not an issue for your browsing usage).
>> smbc_readdir() just returns data from the cache.  smbc_closedir() frees the
>> cache.
>
> This was one of the aspects of the underlying libsmb routines that I was 
> unhappy with, but have never had time to fix it. It really should work 
> more like findfirst and findnext.

Agreed, although I believe that once an entry is retrieved, it should be
cached until smbc_closedir() so that smbc_rewinddir() doesn't cause each entry
to be reread.

Also, for tree displays and the like, retrieving multiple entries with a
single LAN request (if that's in fact what currently happens at the lower
level) is still desirable.  Maybe some sort of flag should be provided (how?)
to indicate that the entire directory contents will be read and to enable some
efficiency improvements.

Derrell



More information about the samba-technical mailing list