Ignore:
Timestamp:
Dec 13, 2010, 5:10:38 PM (15 years ago)
Author:
Silvan Scherrer
Message:

samba client 2.1: caching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/src/smbwrp.c

    r494 r499  
    11051105
    11061106        ZERO_STRUCTP(finfo);
    1107         debuglocal(9,"fname %s (serverzone %d, level %d)\n",finfo->fname, cli->serverzone, level);
    11081107       
    11091108        switch (level) {
     
    13031302                return -1;
    13041303        }
     1304
     1305        /* Try to get the listing from cache. */
     1306        if (dircache_list_files(fn, state, &total_received))
     1307        {
     1308                /* Got from cache. */
     1309                return(total_received);
     1310        }
    13051311
    13061312        while (ff_eos == 0) {
     
    15141520                total_received = -1;
    15151521        } else {
     1522                void *dircachectx = dircache_write_begin(state, total_received);
     1523
    15161524                /* no connection problem.  let user function add each entry */
    15171525                rdata_end = dirlist + dirlist_len;
     
    15251533                        }
    15261534                        fn( mnt,&finfo, Mask, state );
     1535
     1536                        /* Also add the entry to the cache. */
     1537                        dircache_write_entry(dircachectx, &finfo);
    15271538                }
     1539
     1540                dircache_write_end(dircachectx);
     1541
    15281542        }
    15291543
Note: See TracChangeset for help on using the changeset viewer.